cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
GDL
About building parametric objects with GDL.
SOLVED!

UI Autotext menu

DNU
Booster

I have a fully automated office stamp object that is placed on the Master Layouts. I am now being asked to also include the layout number within a subset. This is possible using autotexts in regular text boxes. However, I want to incorporate this into my object. Is it possible to obtain the 'autotext list' in a user interface of a GDL object?

 

DNU_0-1705939656538.png

AC 14 - 28
WIN 11
GDL
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Yves
Expert

Hi,

Here is a small example

 

Yves Houssier
Belgium
Archicad 19 -> 24
iMac - Mac Os 10,13

View solution in original post

4 REPLIES 4
Solution
Yves
Expert

Hi,

Here is a small example

 

Yves Houssier
Belgium
Archicad 19 -> 24
iMac - Mac Os 10,13

Thank you Yves!

I was clearly overthinking it. This was simpler than I thought.

AC 14 - 28
WIN 11
GDL

Dear Yves,

 

Can you please, do an altered code, which is for getting a property of the parent object?

 

p.s.: it would be long to explain the purpose, but I'm sure I need a gdl object like this

unfortunately, the REQUEST("PROPERTIES_OF_PARENT" and the details of the UI scripts are not 100% clear for me

 

 

Hi talmacsi_petrolterv

I think this is wat you need...

Parameter: "PropertyValue" > Text type
Master script:

myProperty = PropertyValue

Interface script:

! Define array to hold parent properties
dim _parentProperties[]
n = REQUEST("Properties_Of_Parent", "", _parentProperties)  ! Get all properties available from the parent object

! Initialize display name for the selected property
_displayName = ""

! Retrieve readable name parts for the currently selected property (type, group, and property name)
n = REQUEST("Property_Name", myProperty, _typeName, _groupName, _propertyName)

! Build display name by combining available parts
if _typeName # "" then _displayName = _typeName + " : "
if _groupName # "" then _displayName = _displayName + _groupName + " : "
_displayName = _displayName + _propertyName     ! Always add property name (it's never empty)

! Create dropdown menu to list all properties
ui_custom_popup_infield "PropertyValue",

    5, 5, 100, 20,         ! Position and size: x, y, width, height
    1,                     ! Store hidden ID (internal reference)
    3,                     ! Tree depth for grouping (use 3 for full hierarchy: type > group > name)
    1,                     ! Grouping method (1 = group by type and group)
    _displayName,          ! Description of selected item
    _parentProperties      ! The list of available properties
AC 14 - 28
WIN 11
GDL