We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-04-03 06:25 PM - last edited on 2024-09-24 10:28 AM by Doreena Deng
Hi All,
I have a pretty simple GDL question. I want to modify the Out of the Box lamp objects in GDL code, however I am having trouble pinpointing which parameter(s) control for the symbol line extensions for the RCP Symbol. See example below.
to this:
Here is where I have left the same:
Here is where I have played with the parameter numbers, but still have not changed the extension lines.
Solved! Go to Solution.
2023-04-03 07:15 PM - edited 2023-04-03 07:17 PM
In the 2D script, there is a Call to the "Lamp_symbol" macro in case the symbol is for RCP and that's where the linework you want to change is. Open Lamp_symbol then on line 140, there is a block of code that should be the following :
if gs_symbtype_2D_m = SYMBOL_RCP then ! RCP Symbol
if bDirect and rx > -89.99 then
gosub "arrow"
else
if bCeilingLamp then
line2 0, r*sqr(2), 0, -(r)*sqr(2)
line2 -(r)*sqr(2), 0, r*sqr(2), 0
else
if NOT(bRectSymbol) then
gosub "sun"
else
if iSymbolType = 8 then line2 -a / 2, 0, a / 2, 0
endif
endif
endif
endif
You need to change the two lines where the 'line2' commands are.
Don't forget to duplicate both the macro and the ceiling lamp .gsms so you do not modify the default library.
2023-04-03 08:25 PM
Thanks @MetalFingerz!
I have found I found Lamp_Symbol in the Library manager, but I not sure how to open it for editing from here:
2023-04-03 07:15 PM - edited 2023-04-03 07:17 PM
In the 2D script, there is a Call to the "Lamp_symbol" macro in case the symbol is for RCP and that's where the linework you want to change is. Open Lamp_symbol then on line 140, there is a block of code that should be the following :
if gs_symbtype_2D_m = SYMBOL_RCP then ! RCP Symbol
if bDirect and rx > -89.99 then
gosub "arrow"
else
if bCeilingLamp then
line2 0, r*sqr(2), 0, -(r)*sqr(2)
line2 -(r)*sqr(2), 0, r*sqr(2), 0
else
if NOT(bRectSymbol) then
gosub "sun"
else
if iSymbolType = 8 then line2 -a / 2, 0, a / 2, 0
endif
endif
endif
endif
You need to change the two lines where the 'line2' commands are.
Don't forget to duplicate both the macro and the ceiling lamp .gsms so you do not modify the default library.
2023-04-03 08:25 PM
Thanks @MetalFingerz!
I have found I found Lamp_Symbol in the Library manager, but I not sure how to open it for editing from here:
2023-04-04 11:11 AM
When in a script, you can open another script by selecting its name (between the quotes usually but you can write it somewher as well) and then clicking on "Open Object" under Files / Library and Object menu. Or alternatively, you can use the shortcut that is assigned to that command, usually something like CMD + OPT + O (I think).
For our case, just write Lamp_symbol somewhere or select it in the CALL command to do so.
Then once upon, after you did the changes needed, do a Save As for that macro and rename it. After that, you will also need to rename the macro in the CALL command (in the Ceiling Lamp .gsm) so it directs to the newly modified macro. Don't forget to Save As the Ceiling Lamp as well so there is no duplicated names in your project and also to reload your library once everything is done.
2023-04-04 05:04 PM
@MetalFingerz Thanks so much for helping get this to work! And starting to understand how to navigate round GDL files.