The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Topics specific to the scripting and development of Library Parts and Libraries using Param-O or the Geometric Description Language – GDL. (Example: How do you use “REQUEST” GDL commands?)

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, Gordana Radonic, nbalogh, mnguyen, gkmethy, rmasaki, Akos Somorjai, Csilla Mai, Peter Baksa

User avatar
By Narska
#321323
I want to use an existing archicad metal door library part, but I want to edit its symbol.

How do I turn off the existing symbol and script my own. Adding to the 2D script seems to only draw on top of the existing symbol, it does not override it.
User avatar
By Peter Baksa
#321332
Hi Narska,

There is a macro call in the master script that is executed before each 2d script. Add a condition based on GLOB_SCRIPT_TYPE to skip it in 2d.
User avatar
By Narska
#321338
can you elaborate please.

Is the conditional suppose to be in the 2D script or the master script?

I see in the master script at the end:
Code: Select all
if GLOB_SCRIPT_TYPE = 7 | GLOB_SCRIPT_TYPE = 8 then goto "MasterEnd"	! forward migration, backward migration

call "gs_general_door_macro_USA" parameters all gs_doorcode = "D1 Commercial"
Peter Baksa wrote: Tue Jan 19, 2021 6:01 pm Hi Narska,

There is a macro call in the master script that is executed before each 2d script. Add a condition based on GLOB_SCRIPT_TYPE to skip it in 2d.
User avatar
By Peter Baksa
#321358
It has to be in the master script because the master script would call the macro before executing the first line of the 2d script, and thus the macro 2d script would be executed before the object's.
if GLOB_SCRIPT_TYPE = 7 | GLOB_SCRIPT_TYPE = 8 | GLOB_SCRIPT_TYPE = 2 then goto "MasterEnd" ! forward migration, backward migration, 2D

call "gs_general_door_macro_USA" parameters all gs_doorcode = "D1 Commercial"
User avatar
By Narska
#322148
Thank you, reporting back that this worked perfectly.
Peter Baksa wrote: Wed Jan 20, 2021 8:57 am It has to be in the master script because the master script would call the macro before executing the first line of the 2d script, and thus the macro 2d script would be executed before the object's.
if GLOB_SCRIPT_TYPE = 7 | GLOB_SCRIPT_TYPE = 8 | GLOB_SCRIPT_TYPE = 2 then goto "MasterEnd" ! forward migration, backward migration, 2D

call "gs_general_door_macro_USA" parameters all gs_doorcode = "D1 Commercial"