BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
GDL
About building parametric objects with GDL.
SOLVED!

Archicad 24 - GDL Lamp - Symbol Modification

jaswrigh
Booster

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.

image.png

to this: 

jaswrigh_1-1680538719060.png

Here is where I have left the same: 

jaswrigh_2-1680538946408.png

Here is where I have played with the parameter numbers, but still have not changed the extension lines. 

jaswrigh_3-1680539009746.png

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Solution
MetalFingerz
Advocate

@jaswrigh ,

 

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.

View solution in original post

Solution
jaswrigh
Booster

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: 

jaswrigh_0-1680545475710.png

 

View solution in original post

4 REPLIES 4
Solution
MetalFingerz
Advocate

@jaswrigh ,

 

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.

Solution
jaswrigh
Booster

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: 

jaswrigh_0-1680545475710.png

 

MetalFingerz
Advocate

@jaswrigh ,

 

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.

@MetalFingerz Thanks so much for helping get this to work! And starting to understand how to navigate round GDL files. 

Learn and get certified!