We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Rotate Lamp Object

Anonymous
Not applicable
Does anyone know how to rotate a standard archiCAD library lamp object (ie. Fluorescent Recessed 02 13) along the x-axis to accommodate a sloped ceiling?

Based on reading other threads about similar topics, I'm not too optimistic. I've read its possible if you modify the GDL script of the object, but this is a bit beyond me. If modifying the GDL script is rather straightforward and someone could walk me through it, I'd really appreciate the help.

Thank you.
16 REPLIES 16
Anonymous
Not applicable
Dwight wrote:
How is it that five minutes after I post the answer, thirty people have looked at these rudimentary code tidbits?

Is this really that arcane a skill?
Dwight -

Success! Thanks for the help and step by step directions - it worked like a charm.

What would be the steps to include all the original 2D script rather than to delete it? So we would have the options for fills, overhead lines, etc.? Or is this too much trouble than its worth? Seems like maybe I should really look into Objective...

Also, I'm assuming we could use the same steps to modify diffusers, speakers, etc.?

And yes, I think we could consider the topic of modifying GDL script slightly arcane, especially for those of us who know how to use a powerful software tool like archiCAD, but have little idea as to HOW it actually functions and operates. I am trained as an architect... not a software engineer... I will admit, I do find the script of an object rather intimidating and fear I'll do catastrophic damage to an object rather achieve any desired goal. I suppose more experiments will help ease this concern. But, this very reason is what makes this forum such a useful knowledge base.

It makes you wonder though, why wouldn't a simple parameter to rotate and object on all axis be included in the default object? We're certainly not the only ones working w/ slope ceilings are we? This would be an entirely different conversation though.

In any case. Thanks for the tips - I'm glad someone was able to help me out!
Dwight
Newcomer
I gave you a 'hack' that applies to simple rectangular boxes like lights. The PROJECT2 command in 2D is a bad one since it requires CPU power to rebuild a 2D projection for each instance on the plan, slowing redraw. These are 'heavy' work relative to executing parametric 2D scripts.

This approach works with almost everything that doesn't already use the command code and the variables I chose in its 3D script.

Someone with more patience than me would need to analyze code changes to fix the 2D code to a sophisticated level...

Many users are intimidated by GDL, but it is a very simple and obedient language lacking irregular grammar, eh? And as for being trained as an architect and not a programmer, I sympathize, since to progress as an architect you need to be good at waving your arms and delegating the real work while you vacuum [euphemism] up to clients.

You could learn a lot of GDL in an afternoon with David Nicholson-Cole's "Object Making with Archicad."
Dwight Atkinson
David Maudlin
Rockstar
BenY_Boston wrote:
What would be the steps to include all the original 2D script rather than to delete it? So we would have the options for fills, overhead lines, etc.? Or is this too much trouble than its worth?
Ben:

You would need to use some trigonometry to calculate the points of the rotated object onto a horizontal surface, not too hard for a rectangle rotated on one axis. With these points, you can then use the 2D commands for lines and fills to get the 2D symbol that meets your needs. As Dwight mentioned, the PROJECT2 command is ok for a few objects, but tremendous overhead if applied to many parts.

This would not be a bad exercise for dipping into GDL, but it does take some time and study.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
ztaskai
Graphisoft Alumni
Graphisoft Alumni
One more little addtion.

Instead of replacing the 2D script you can add the following lines at the start of it:
if abs(rtx)>5 or abs(rty)>5 then
    project2 3, 270, 2
    end
endif
This will leave the normal (and fast!) 2D for the normal placement but use the slower projection for rotated cases.

OK, one other thing. If you find objects in the ArchiCAD Library which are usually used in a tilted way report them to GS. For example, we changed the cars for AC13 cause of this.

Regs,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
Dwight
Newcomer
All of them.

Except sinks. Sinks need to be level. Unless you are building one of these:

Rube Goldberg Paint Ball
Dwight Atkinson
Anonymous
Not applicable
Halo guys am relatively new in gdl scripting would like to for someone to lead in scripting as which menu will i click to view the window to change a code so as to rotate an object e.g in a flythrough
Achille Pavlidis
Enthusiast
Thanks Dwight!

Great tip!
Mac OSX 13.6.6 | AC 27 INT 5003 FULL