The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Everything about GDL - Doors/Windows/Objects/Stairs etc. (Example: I created an object that prints an error message in 3D all the time, please help!)

Moderators: Barry Kelly, Karl Ottenstein, LaszloNagy, ejrolon, gkmethy, Gergely Feher

User avatar
By Zbigniew
#298027
Hi!


I would like to create zone which shows information according to the name of the view. It's needed for ceiling plans. I would like to make the same zone which displays differently into different views. Default UI gives a chance to create only scale dependent stamp.

I found a fragment of the code responsible for displaying specific information.
Code: Select all
if usedRows[orderIdx]	= ORDER_ZONE_NAME		then showGroupDisplay[ORDER_ZONE_NAME] = 1
if usedRows[orderIdx]	= ORDER_ZONE_NUMBER		then showGroupDisplay[ORDER_ZONE_NUMBER] = 1


Then, i would like make it drawing-name-dependent

So I tried to use global parameters like:
Code: Select all
ac_drawingName
ac_drawingNumber
ac_storyName

So it could look like:
Code: Select all
IF ac_drawingName = Ceiling Plan THEN

if usedRows[orderIdx]	= ORDER_ZONE_NAME		then showGroupDisplay[ORDER_ZONE_NAME] = 1

ENDIF

It would give a chance to call my view "Ceiling Plan" and disable name of the zone (ORDER_ZONE_NAME)
It works when I use local parameters but when I use global ones (mentioned above) says that is either
"Uninitialized variable" or "Numeric type expression required".
It's strange, because global parameter "ac_drawingName" is decribed as a String.
User avatar
By Lingwisyer
#298052
Code: Select all
IF ac_drawingName = "Ceiling Plan" THEN

Not a variable, so it should be in quotations. Whether that is the issue is a different question...



Ling.
User avatar
By Lingwisyer
#298065
Ah, that is another thing... While ac_drawingname is not an autotext but a global variable, it is only available for Drawing Title objects. Piotr's suggestion of using MVO states is probably your best alternative.



Ling.
User avatar
By Zbigniew
#298085
I don't know exactly what did you meant, saying about MVO trigger. I didn't found any global gdl parameter, so I used this method:

https://gdl.graphisoft.com/tips-and-tri ... ons-object

I added my custom Zone Stamp to Library Global Settings subtype.
Then, I created part of MVO interface and now I am trying to stick my custom parameters to it. It gives a way to make it MVO-profile-dependent. It is not really what I meant to create from the very beginning, but seems like it's going to work! (:

Thank you guys, I will put my complete solution when I finish (:
User avatar
By Zbigniew
#298346
Yes, I did it, Piotr Dobrowolski helped me a lot. He gave me zone stamp which was ready to work, but I decided to make something simple on my own.

Its really simple.

1. I created myCustom.gsm file and saved it as a library global settings subtype.
2. Inside the file I made bloolean parameter bNameMVO
3. In Zone Stamp file I created next parameter bNameSwitch
4. Then I used this scheme:

Code: Select all
success = LIBRARYGLOBAL ("MyCustom", "bNameMVO", bNameSwitch)
if success > 0 then
elsetext2 0, 0, det
    text2 0, 0, "Not available"
endif

I attached variables needed and created switch in MyCustom.gsm Interface script.

This is basic way of communicate MVO interface with library part objects. For me it was important to create zone stamp which was easy to change without scale-dependency. It works! (: