We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

GDL
About building parametric objects with GDL.

GDL - How can I get user-defined properties?

LeeJaeYoung
Virtuoso

1. create DoorStyleName

LeeJaeYoung_1-1681406038600.png

 

2.

LeeJaeYoung_2-1681406187054.png

LeeJaeYoung_3-1681406205753.png

 

LeeJaeYoung_4-1681406263000.pngLeeJaeYoung_5-1681406363625.png

 

Displaying Properties with Labels | GRAPHISOFT GDL Center

 

I am trying to read this value from Marker.

Is it possible?
However, even if you look at the contents, the solution is not explained, so I would appreciate it if you could tell me where to start studying.

AC27 on window 11
12 REPLIES 12

I couldn't change the value in the schedule because I used parameters to select characters such as PD, ASD, and WD.
So, I used the property to select the type in the schedule. But there is a downside here.
In the Marker, even if property values such as PD can be read, if they cannot be read in the Door, the options that must be entered by the type such as FSD cannot be used....

You have to wait for the parameterized character selection to be available in the schedule, or wait for the property to be read in door.gsm. So thanks for the answers.

AC27 on window 11

I am trying in something similar.
However, with a label, I want to access the self-created properties of a building material, however, I do not manage to do so
My question is on the one hand, where do I find the property ID?
Further the question arises for me, what I do wrong in the following line
n = REQUEST("COMPONENT_PROPERTY_VALUES_OF_PARENT", inputProp, compPropVals)

Code:

 

dict parent
dict collectSkins ! Create input dict for components
collectSkins.collectMode = 1 ! All BM Components should be collected

cIDRes = request ("Component_IDs_Of_Parent", collectSkins, parent)
dict inputProp

dict parent
dict collectSkins ! Create input dict for components
collectSkins.collectMode = 1 ! All BM Components should be collected

cIDRes = request("Component_IDs_Of_Parent", collectSkins, parent)
dict inputProp

if cIDRes and HASKEY(parent.componentIds) then
_nParentComponents = vardim1(parent.componentIds)

for iBmat = 1 to _nParentComponents
inputProp.componentId.id = parent.componentIds[iBmat]

! Set the desired property ID
inputProp.propertyIds[1].id = "C1F93BB6-BBCB-4934-BCE2-4EE9372BD48A"

dict compPropVals
n = REQUEST("COMPONENT_PROPERTY_VALUES_OF_PARENT", inputProp, compPropVals)

if n = 1 then

String = compPropVals.propertyValues[1].value[1]
text2 0, 0, String
else
! Die Abfrage ist fehlgeschlagen
text2 0, 0, "Fehler bei der Abfrage"
endif
next iBmat
endif
Peter Baksa
Graphisoft
Graphisoft

Hi,

Use the Library developer menu / always send GDL messages to get all available error messages.

For your code I get "Invalid request input. Error in dictionary: COMPONENTID.ID: not accepted type"
The output of Component_IDs_Of_Parent has more structure, you need to use

 

inputProp.componentId.id = parent.componentIds[iBmat].id

 

 

You can get the component property IDs with request(COMPONENT_PROPERTIES_OF_PARENT) or request(COMPONENT_PROPERTY_TREE_OF_PARENT).

COMPONENT_PROPERTY_TREE_OF_PARENT used with ui_custom_popup_infield can store the ID of one selected property in a string parameter, see example 2 in the GDL reference guide.

Using data from COMPONENT_PROPERTIES_OF_PARENT you can search for the ID of a known property name.

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest