cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 

Add Object Parameter to Label

Hi there, 

 

I have two questions -

Q1 is about technical skills in AC. E.g "how do I do 'Thing X' in AC?"

Q2 is about documentation philosophy. E.g. "is doing 'Thing X' an appropriate way to approach the problem in light of how AC is intended to be used?"  

 

Q1: Technical Skill 

is it possible to edit the parameters of a label to be able to read any chosen parameter within an object?

 

For example - in the screenshot below, the mixer tap has a 'product code' parameter which I would like to be able to label on drawings. 

LewisatFlourish_0-1770789008367.png

 

I have inspected the parameters of the 'Classifications & Properties Label' but need direction on how to amend the script to display the parameters of the object in screenshot 1.   

LewisatFlourish_1-1770789190409.png

 

Q1 - Philosophy

To my mind, labelling an object based on a parameter that is 'baked' into the object leaves much less room for contradictions between your model and your schedule. For example, I love the Skin List label because it can report on BMAT IDs, and if I change the BMAT ID of a certain material, the text in all the labels will update automatically.

 

I come from Revit-land, and I struggle with the idea that there isn't a way (for example) to change 'Mixer Type 1' to 'Mixer Type 2' and for the label to automatically change from the predefined code associated with Mixer 1, to the predefined code associated with Mixer 2.

 

This might not be a big deal on small jobs, but labelling contradictions creep-in on big jobs when (for example) a handful of mixers are being changed to a different product selection, but the code does not update with it.  

 

 

Operating system used: Windows 3001.3000

AC27 INT 3001
Windows 11 Pro 10.0.26100 Build 26100
MSI Vector 16 HX AI A2XWHG
32GB RAM | Intel Core Ultra 9 275HX, 2700 Mhz, 24 Core(s), 24 Logical Processor(s)
Setup info provided by author
12 Replies 12
Barry Kelly
Moderator

It can be done but you really need to know a bit of GDL scripting to control how you want the label to look.

 

In the 2D script of the label, you will need the following command....

 

rrr=REQUEST ("ASSOCLP_PARVALUE", "actual_parameter_name", name_or_index, type, flags, dim1, dim2, p_values)

 

"actual_parameter_name" is the actual name (in quotes) of the parameter for what you want to get the value of.

You will need to open the tap object to find that parameter name.

The command will place the value in the 'p_values' argument.

So you will then need to manipulate the 2D script to output text for the 'p_values' (without quotes)

 

BarryKelly_0-1770793585840.png

You will need to do the same for your second parameter but the argument will be 'p_values_2' (without the quotes) so it doesn't get mixed up with the first p_values argument.

 

But you will need to be able to script the label to show the output as you want it.

Something I don't have time to explain just at the moment.

 

Barry.

 

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Barry Kelly
Moderator

And I should say that this will not work with any other library object, unless they have exactly the same parameters you are looking for.

 

It is a shame that the auto-text label can not access object parameters.

It can access object properties, but object properties can not access object parameters either.

So you could label a property, but you would have to manually change the value of the property in the object.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Ahmed_K
Mentor

In the IFC translator settings , go to the properties mapping dialog , 

Create new property and assign the correct object parameter , 

then you can label that ifc property using the classification and properties label

AMD Ryzen 9 3900X, 32 GB RAM, RTX 3080 10 GB
Archicad 27
Windows 11 professional
https://www.behance.net/Nuance-Architects
Jochen Suehlo
Moderator Emeritus

In the GER forum there was a question for a label that can automatically read all Object Parameters.
Frank Beister had such a label created in his BIM-All-Doors.
I extracted the label and streamlined it a bit with a prefix-filter for faster Parameter-Search.
See attachement.

Jochen Suehlo . AC12-29 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de

these are excellent responses @Barry Kelly , @Jochen Suehlo @Ahmed_K thank you for the direction. I will look into each of them. 

 

I'm interested to know from long-term users such as yourselves -  do you have any thoughts on Part 2 of my post? Am I approaching documentation in Archicad the 'wrong' way, or is this a legitimate problem faced by other users also?   

AC27 INT 3001
Windows 11 Pro 10.0.26100 Build 26100
MSI Vector 16 HX AI A2XWHG
32GB RAM | Intel Core Ultra 9 275HX, 2700 Mhz, 24 Core(s), 24 Logical Processor(s)
easyDoesIt
Enthusiast

Hi Lewis,

 

At Archibites we have a label that will label parameters of any object. You can get more details here and download a trial version to see if it meets what you want.

Cheers, Mark
archibites.tech | Wet Area Tool | Door Circulation Compliance | Multi-Label | Roof Slope | Wall Type Label
Brisbane, Australia
Windows based system on all versions of Archicad
Lingwisyer
Guru

As a consolation, all of the Caroma objects use common parameters, so a label that works for one should work for all of them.

AC22-29 AUS 3200Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win11 | R5 2600 | 16GB | GTX1660
Aaron Bourgoin
Virtuoso

Tim, have you got a link for the GDL versions? Can't seem to find them.

Think Like a Spec Writer
MacBook M4Pro - 24Gb RAM
AC4.55 through 29 / AC29.1.0 USA
Rhino 8.30 Mac
MacOS Tahoe 26.4.1
Claudiu Serban
Booster

Here is how i achieved this:

 

1. For each property i needed to label, i set up a string based parameter that holds the UUID of that property

 
 

props.jpg

 

2. Set up a property holding dict in the master script

dict propertyData
_actProperty = ""
dim _sLocalization[]
	_sLocalization[1] = "<" + `ID` + ">"
	_sLocalization[2] = "<" + `Custom Name` + ">"
	_sLocalization[3] = "<" + `Name` + ">"
	_sLocalization[4] = "<" + `None` + ">"
	_sLocalization[5] = "<" + `Hotlink ID` + ">"
	_sLocalization[6] = `Custom`
	_sLocalization[7] = "<" + `Custom Text` + ">"
	_sLocalization[8] = "<" + `no content defined` + ">"
	_sLocalization[9] = "---"
 
3. Prepare the UI for the new settings
TABID_ROOT				= -1
_idxTab = 1

dim stTabTitles[1]
	stTabTitles[1] = `Content`

ui_current_page 0

itemID = 10
xEnd	= 444
yEnd	= 266
UIGroup = 1
! ------------------------------------------------------------------------------

dict propertyRequestIn, propertyRequestOut
n = request ("Property_Tree_Of_Parent", propertyRequestIn, propertyRequestOut)

if n <= 0 then
	! Make sure these fields exist in the DICT
	dim emptyArray[]
	propertyRequestOut.propertyTree = emptyArray
	propertyRequestOut.treeDepth = 3
endif

dim _propertyTreeItemForNone[]
for iCol = 1 to propertyRequestOut.treeDepth
	_propertyTreeItemForNone[iCol] = ""
next iCol
_propertyTreeItemForNone[propertyRequestOut.treeDepth + 1] = `None`

ui_listfield UIGroup, 0, 0, xEnd, yEnd, 0
				
ui_listitem itemID, UIGroup, "grpProps", 0, "", ""

 

4. For each property, set up a custom listitem

itemID = itemID + 1
r = REQUEST ("Property_Name", propFloor, _typeName, _groupName, _propertyName)
ui_custom_popup_listitem itemID, UIGroup, "propFloor", 	1, "" , "", 1, propertyRequestOut.treeDepth, 1, _propertyName,
				_propertyTreeItemForNone,
				propertyRequestOut.propertyTree

 

5. Now that property holds the UUID of the property you want to read. You can then easily use this to read it:

n = request ("Property_Value_Of_Parent", propFloor, type, dim1, dim2, fTxt)

 

My label here is a zone label and reads the finishes of floor, walls and ceiling, but you can generalize it. Saving it as a favorite or opt-picking it will retain the stored UUID so you can use same label to display different properties in the same text2 if you want.

Archicad 28/29, macOS 26

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!