Modeling
About Archicad's design tools, element connections, modeling concepts, etc.
SOLVED!

Object rotation with orientation

Dontknow
Enthusiast

Hi there,

 

Is it possible to let objects rotate with the orientation.

When I now change the orientation my objects are upside down.

1.png2.png

Greetings

Architectural construction designer, draftsman, modeller
ArchiCAD 25.
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Tormenta4
Booster

Here is the code you need to implement to make an object always horizontal and not affected by the view or object rotation or by the mirror setting:

! Oriented View
angleViewRot = 0
rrr = REQUEST ("View_Rotangle", "", angleViewRot)
totalRotate = (SYMB_ROTANGLE + angleViewRot) MOD 360
 
rot2 totalRotate * (SYMB_MIRRORED - not(SYMB_MIRRORED))! 1/-1
Archicad 25, MacBook Pro M1 Max, macOS Monterrey.

View solution in original post

7 REPLIES 7
DGSketcher
Legend

@Dontknow It is possible but typically it would need to be encoded in the GDL for the object/symbol.

Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)
Solution
Tormenta4
Booster

Here is the code you need to implement to make an object always horizontal and not affected by the view or object rotation or by the mirror setting:

! Oriented View
angleViewRot = 0
rrr = REQUEST ("View_Rotangle", "", angleViewRot)
totalRotate = (SYMB_ROTANGLE + angleViewRot) MOD 360
 
rot2 totalRotate * (SYMB_MIRRORED - not(SYMB_MIRRORED))! 1/-1
Archicad 25, MacBook Pro M1 Max, macOS Monterrey.

Thnx Tormenta4,

Where and how do I add this script to my object?

Architectural construction designer, draftsman, modeller
ArchiCAD 25.

At the beginning of the 2D script. Open the library part script by pressing crtl+alt+o with the object selected and open the 2d Script.

Archicad 25, MacBook Pro M1 Max, macOS Monterrey.

There already is some script there.

Architectural construction designer, draftsman, modeller
ArchiCAD 25.

Exactly, and now you want to modify it by adding that bit of code which will rotate the object as you need. Just add the code at the beginning of the 2D script and it will apply to the rest of the code that is already there.

Archicad 25, MacBook Pro M1 Max, macOS Monterrey.

It worked!

Thnx a lot m8!

Architectural construction designer, draftsman, modeller
ArchiCAD 25.