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
Jochen Suehlo
Moderator

Do you mean the actual property which is set in the building component or do you mean the 4 Values from the options setup?
GS says: Only the actual property value can be accessed from GDL, the other choices aren’t visible.

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

I want to bring only the values I selected.

 

LeeJaeYoung_1-1681430350464.png

 

AC27 on window 11

Displaying Properties with Labels | GRAPHISOFT GDL Center

 

   ui_custom_popup_infield "myProperty",
               70, 30, 370, 20, ! X Position, Y Position, Width, Height
                                       1, ! Store Hidden ID
                                      3, ! Tree Depth
                                      1, ! Grouping Method
               _displayName, ! Created value description

              _parentProperties

 

Here in myProperty parameter function
_parentProperties with ui_custom_popup_infield
You can manually select what you want from among the
It looks like you put it in the myProperty parameter function.

Among the values in dim _parentProperties, I want to search for "DoorStyleName" and automatically insert that value into the myProperty parameter.

AC27 on window 11
Peter Baksa
Graphisoft
Graphisoft
If the name of the property is known, ui_custom_popup_infield is not needed.
REQUEST ("Properties_Of_Parent") returns all the available properties: using that you can match the known name to an ID, which can be used with REQUEST ( "Property_Value_Of_Parent") to get the value.
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

I think it will be easier to understand if you see the code. Please excuse me if I am not rude.

AC27 on window 11
kuvbur
Enthusiast

If you whant seach property by name - you can try this macro. Macro find all gdl parameter or property name in string and replace it with value. You can also see a sample code for reading a search by properties (by the label "getPropertyValue").

Exemple of door marker here

1.png5.png

Structural engineer, developer of free addon for sync GDL param and properties

Maker.gsm was successful.

 

I am testing on door.gsm's mater stript.

What's wrong?

 

n = REQUEST ("Property_Value_Of_Parent", nID, _type, _dim1, _dim2, _propertyValues)
!!! n is 0

 

or

 

propInputIds.propertyIds[1].id = nID
n = REQUEST ("Property_Values_Of_Parent", propInputIds, propOutputVals)
!!! n is 0
text2 0,0,propOutputVals.propertyValues[1].value[1]

 

LeeJaeYoung_0-1682878066577.png

 

 

Is it possible to access Properties inside GDL? - Graphisoft Community

Solved: Getting all property values of type 'Door' from A... - Graphisoft Community

AC27 on window 11

("Properties_Of_Parent") also works with door / window GDL.
By the way, REQUEST("Property_Value_Of_Parent") only works for markers.
Is there a function that can obtain property values in door / window GDL? Or is it not possible to get property values from door/ window GDL?

AC27 on window 11
Peter Baksa
Graphisoft
Graphisoft

It is not possible to get an element's own properties, except IFC properties with

application_query("OwnCustomParameters")
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest