We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-06-12 09:35 AM
Hello everyone!
I'm working on a mark for a door that behaves differently if the door is inside or outside.
I've seen that you can display the parameter interior/exterior in a label, but when opening the GDL of the label, the corresponding macro is too complicated for me as it displays all the properties, so I can't get this one piece of information.
How can I retrieve the interior/exterior information simply in GDL?
Thanks a lot!
Solved! Go to Solution.
2023-06-12 01:30 PM
It is a REQUEST.
The position is a Core Property.
I found out is is a Core Property called ... Main.Position
You can use this REQUEST to get is value ...
n = REQUEST ("Property_Value_Of_Parent", "Main.Position", type, dim1, dim2, propertyValues)
print propertyValues
propertyValues will contain the value you want.
Barry.
2023-06-12 09:48 AM
There really is no interior/exterior.
It is all a bit of a trick, so long as you place your windows and doors consistently with the reveal on the 'outside' of the wall, and then the second click to place the door/window selects the swing/opening direction - you click either out side (the same as the reveal side - WIDO_REVEAL_SIDE value will = 0), or the inside (opposite side to the reveal side - WIDO_REVEAL_SIDE value will = 1)
Then it is a case of checking the value of the Global parameter ... WIDO_REVEAL_SIDE in your script.
Barry.
2023-06-12 09:55 AM
Thanks Barry,
I wasn't talking about the interior/exterior face of the door, but the parameter that you manually check and that is exported in IFC (Position Category for Ifc).
2023-06-12 10:47 AM
@Mathias Jonathan wrote:
I wasn't talking about the interior/exterior face of the door, but the parameter that you manually check and that is exported in IFC (Position Category for Ifc).
Ah, you mean this setting.
It is not an actual object parameter.
I think you have to get that with a REQUEST in GDL.
What label is it you were using?
I might be able to help track it down for you.
Barry.
2023-06-12 11:38 AM
Yes, it's this one!
I found the info in the label " Classification and Property Label"
But when I open the object, it refers to the macro:
call "PropertyParamRequest_m"
Which is a macro that calls alls parameters, so it is difficult for me to find this specific info.
Thanks!
2023-06-12 01:30 PM
It is a REQUEST.
The position is a Core Property.
I found out is is a Core Property called ... Main.Position
You can use this REQUEST to get is value ...
n = REQUEST ("Property_Value_Of_Parent", "Main.Position", type, dim1, dim2, propertyValues)
print propertyValues
propertyValues will contain the value you want.
Barry.
2023-06-12 02:48 PM
It works well, thank you!
I want to use this request in order to have different representation of the door marker when the door is inside or outside the building
I have an error message when saving the GDL object, but It works.
Here is what i wrote:
In Master Script:
n = REQUEST ("Property_Value_Of_Parent", "Main.Position", type, dim1, dim2, propertyValues)
In Master Script:
IF propertyValues= "Extérieur" THEN
TEXT2 0,0,"It works"
ENDIF
How can I avoid this error message?
Thanks
2023-06-13 03:05 AM
Did you forget to attach the error message?
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2023-06-13 11:17 AM
It says " The 2D script has errors. In the project, the library part will be shown with its 2D symbol"
2023-06-13 11:20 AM
Hi Mathias,
To avoid the error message you can do this
Part of script taken from this example on GDL Center
https://gdl.graphisoft.com/tips-and-tricks/display-properties-with-labels
I removed the gosub which is not needed with a string
_valueToConvert = ""
_valueString = "Value: "
dim _propertyValues[][]
_dim1 = 0
_dim2 = 0
_stringPropValue = ""
n = REQUEST ("Property_Value_Of_Parent", "Main.Position" , _type, _dim1, _dim2, _propertyValues)
if n then
! change zeros to ones - it is easier to handle all possible arrays in a double loop
if _dim1 = 0 then _dim1 = 1
if _dim2 = 0 then _dim2 = 1
for i = 1 to _dim1
for j = 1 to _dim2
if (i + j) > 2 then _valueString = _valueString + "; "
if _type = 4 then ! Type is string - no conversion needed
_stringPropValue = _propertyValues[j][i]
else ! bool, real, integer types - conversion needed to string
_valueToConvert = _propertyValues[j][i]
!!! gosub "convertToString"
endif
_valueString = _stringPropValue
next j
next i
endif
if _stringPropValue = "Extérieur" THEN
TEXT2 0,0,"It works"
endif