Search the Knowledge Base Report a bug
Post new topic   Reply to topic   printer-friendly view   .    ArchiCAD-Talk Forum Index >>> Libraries / Library Parts / GDL >>> Rotate Lamp Object Goto page 1, 2  Next
View previous topic :: View next topic
Author Message
BenY_Boston
New member
New member

Joined: 02 Feb 2010
Posts: 11
Location: Boston

PostPosted: Tue Jun 15, 2010 10:35 pm    Post subject: Rotate Lamp Object Reply with quote

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.

_________________
ArchiCAD 12 & 13
MacBook Pro w/ 2.8GHz Intel Core Duo Processor
8GB Memory
Mac OSX 10.6.5
Back to top
View user's profile Send private message    
Dwight
Senior member
Senior member

Joined: 27 Oct 2003
Posts: 7263
Location: Vancouver, BC, Canada

PostPosted: Wed Jun 16, 2010 4:11 am    Post subject: Re: Rotate Lamp Object Reply with quote

Adding a Rotation Parameter:

1: Make the new Object so as not to ruin the original:

Place the original object in the plan view, select it and "File>Libraries and Objects>Open Object"

"Save As" a new name. Place the new file in a new library folder. Keep the object parameter/script dialog box open.

2: Add Parameter:

Open the Parameter List, add two parameter values and make them look like this attachment. Play with the bits - you are making an angle parameter for the x and y planes.



step 1 - parameters.jpg
 Description:
 Filesize:  12.39 KB
 Viewed:  12446 Time(s)

step 1 - parameters.jpg



_________________
Dwight Atkinson
Back to top
View user's profile Send private message    
Dwight
Senior member
Senior member

Joined: 27 Oct 2003
Posts: 7263
Location: Vancouver, BC, Canada

PostPosted: Wed Jun 16, 2010 4:13 am    Post subject: Re: Rotate Lamp Object Reply with quote

3: Fixing the 3D script:

This is a raw hack, but make the lead-in for the 3D script look like this attachment



step 2 3D script.jpg
 Description:
 Filesize:  7.97 KB
 Viewed:  12453 Time(s)

step 2 3D script.jpg



_________________
Dwight Atkinson
Back to top
View user's profile Send private message    
Dwight
Senior member
Senior member

Joined: 27 Oct 2003
Posts: 7263
Location: Vancouver, BC, Canada

PostPosted: Wed Jun 16, 2010 4:19 am    Post subject: Re: Rotate Lamp Object Reply with quote

Change the 2D script:

Throw away the existing script.

Add the attached line of code.

This merely gives you a modelled representation of the object, not a proper dotted overhead line like you should have.
That needs more specific scripting.


Others can help you better than me, but these quick changes will get you a tilted light fixture.



step 3 2D script.jpg
 Description:
 Filesize:  13.32 KB
 Viewed:  12462 Time(s)

step 3 2D script.jpg



_________________
Dwight Atkinson


Last edited by Dwight on Wed Jun 16, 2010 4:21 am; edited 1 time in total
Back to top
View user's profile Send private message    
Dwight
Senior member
Senior member

Joined: 27 Oct 2003
Posts: 7263
Location: Vancouver, BC, Canada

PostPosted: Wed Jun 16, 2010 4:20 am    Post subject: Re: Rotate Lamp Object Reply with quote

NOTE: adding parameters at the end of the parameter list makes the tilt parameters appear beneath the Parameters for Listing Area.

If i knew more about this newfangled stuff I could direct you better.



step 4 seeing the result.jpg
 Description:
 Filesize:  63.54 KB
 Viewed:  618 Time(s)

step 4 seeing the result.jpg



_________________
Dwight Atkinson
Back to top
View user's profile Send private message    
Dwight
Senior member
Senior member

Joined: 27 Oct 2003
Posts: 7263
Location: Vancouver, BC, Canada

PostPosted: Wed Jun 16, 2010 4:40 am    Post subject: Re: Rotate Lamp Object Reply with quote

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 Atkinson
Back to top
View user's profile Send private message    
cartann
Junior member
Junior member

Joined: 21 Apr 2009
Posts: 171
Location: Brasil

PostPosted: Wed Jun 16, 2010 6:48 am    Post subject: Re: Rotate Lamp Object Reply with quote

Maybe not, but we always appreciate your posts. Laughing
hope I can buy your book soon.

_________________
Paulo
"If it is not broken, do not fix it Smile"

MacIntel 20" OS 10.6.8 4gig AC16
MacBook pro OS 10.6.8 4Gig
Back to top
View user's profile Send private message    
vistasp
Veteran member
Veteran member

Joined: 30 May 2006
Posts: 825
Location: Bombay, India

PostPosted: Wed Jun 16, 2010 8:04 am    Post subject: Re: Rotate Lamp Object Reply with quote

Dwight wrote:
NOTE: adding parameters at the end of the parameter list makes the tilt parameters appear beneath the Parameters for Listing Area.

In the parameters page when you're editing the object there are double-headed arrows to drag a parameter up or down in the list to the desired location.

Dwight wrote:
If i knew more about this newfangled stuff I could direct you better.

Laughing

_________________
= v i s t a s p =
bT Square Peg

http://archicadstuff.blogspot.com
http://www.btsquarepeg.com

| AC 9-21 INT | Win10 | i7 4770 | 16 GB | Quadro K620 |

Back to top
View user's profile Send private message Visit poster's website   Facebook ID (Not full URL, just ID!) LinkedIn Profile Link (Full URL, please)
Ralph Wessel
Senior member
Senior member

Joined: 06 Nov 2003
Posts: 1493
Location: United Kingdom

PostPosted: Wed Jun 16, 2010 11:59 am    Post subject: Re: Rotate Lamp Object Reply with quote

BenY_Boston wrote:
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?

Try OBJECTiVE if you want a simple, intuitive way to rotate objects like lamps. To rotate, do the following (referring to the attached image):
    1. Select the lamp and use the menu OBJECTiVE > Tools > Rotate. Click twice to define the axis to rotate the lamp around.

    2. Then click a third time to define the rotation angle (you can use the standard coordinate input to type an angle too).

    3. The result in 3D (before and after).

Note that you can also rotate several lamps at once, and rotate the lamps in section/elevation views (which is often easier because you can align to the ceiling angle).



rotate.jpg
 Description:
 Filesize:  43.66 KB
 Viewed:  591 Time(s)

rotate.jpg



_________________
Ralph Wessel
Cadimage
Back to top
View user's profile Send private message Visit poster's website    
Dwight
Senior member
Senior member

Joined: 27 Oct 2003
Posts: 7263
Location: Vancouver, BC, Canada

PostPosted: Wed Jun 16, 2010 6:10 pm    Post subject: Re: Rotate Lamp Object Reply with quote

And considering that over 400 members have viewed my laborious code tweak in just 12 hours, the simplicity of OBJECTIVE should make it in great demand!!!
_________________
Dwight Atkinson
Back to top
View user's profile Send private message    
Display posts from previous:   
View previous topic :: View next topic
Post new topic   Reply to topic   printer-friendly view       ArchiCAD-Talk Forum Index >>> Libraries / Library Parts / GDL >>> Rotate Lamp Object All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB 2001, 2005 phpBB Group
Copyright 2012 - Graphisoft SE. All rights reserved worldwide. Terms of Use | Privacy Policy