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

#293045
Hi Tsepov,

Here is how to do it:
You need to create Graphic Override Rules. One to override the Pen (to Black color) of those Object type elements that do not come from a Hotlinked Module (Image 1), and another to override the Pen (to Yellow color) of those Object type elements that DO come from a Hotlinked Module (Image 2).
In the Criteria panel you can use either the "Hotlink Source" or the "Hotlinked Module" criterion, both will work.

Then create a new Graphic Override Combination (GOC) and add both Override Rules, then apply the GOC to the Viewpoint (Image 3).
Attachments
GraphicOverrideRule-01.png
GraphicOverrideRule-02.png
GraphicOverrideRule-03.png
#293094
So you want the GDL Object to know whether it is in the Project File itself or coming from a Hotlinked Module?
I looked through the GDL Reference Guide but I did not find any specific command for this.
There is a REQUEST command:
n = REQUEST ("Full_ID_of_parent", "", id_string)
For annotation elements linked or hotlinked on the floor plan, returns all identifiers (Master ID) of the linked modules and the parent library parts’ identifier set in the tool’s settings dialog box in the id_string variable (otherwise empty string). Expression returns 0 and contains dummy return values (emtpy string or 0) if used in parameter script, causing additional warning.


So this may be used somehow. For example, if the user always provides a Master ID to a Hotlinked Module when they are placed, then the Full ID of the GDL Object within the Hotlinked Module will be different from its Element ID (User ID). This difference could be checked and then the Pen of the GDL Object could be set in its 2D Script to change accordingly. This is in theory, I have not tried it, you would have to modify the 2D Script of the GDL Object.