BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

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

More than Symb_pos

Anonymous
Not applicable
Hy,
what i want is to determine the absolute coordinates of 2 points of a GDL coded object.
Let me explain, in my object i have coded:

hotspot2 0.000, 0.000 !first point
hotspot2 1.000, 0.000 !second point

then i used the global variables symb_posX...Z to have the position of the first point relative to the project origin.

How can i request the same for the second point?
I dont want to calculate it from the first point using symb_rotangle and symb_mirrored, what i want is to reverse calculate the mirrored and the angle variables of my object.

Any idea?
3 REPLIES 3
Barry Kelly
Moderator
Symb_pos is simply the position of the object origin in relation to the model origin - your first hotspot just happens to be the object origin (0,0).
All other points in the object will have to be mathematically worked out in relation to the object origin based on the object rotation and mirror status.

I am not sure what you mean by reverse calculating the mirrored and the angle variables of your object.
The symb_rotangle and symb_mirrored values will give you that based on what you have done to your object in the model.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Hi Barry,
i was coding an assemble of a pump and a cutter for a plant. It is featured in two configuration "normal" and "mirrored". These are very similar but if the user select the "normal" configuration and the object is mirrored with Ctrl+L the result is an error for the technician who have to really setup the machine.

Using simb_mirrored and symb_rotangle was the solution but i'm not satisfied with it and was thinking, if i code a coordinate system with three points and can request the global coordinates of these points i would be able to simplify all the if..then that i've made (=reverse calculate mirrored state and rotation angle.......ok ok "reverse calculate" wasn't the best way to explain myself )
Barry Kelly
Moderator
I am not 100% sure about what you are doing but if you want to stop a user from mirroring an object (CTRL-M or pressing the mirror button in the object settings/info box) then all you need to do is add ...

IF symb_mirrored = 1 THEN
MUL2 -1, 1
ENDIF


before your 2D script and ...

IF symb_mirrored = 1 THEN
MULx -1
ENDIF


before your 3D script.

If your object is not symmetrical about the origin you will need to use an ADD2 distance,0 command before the MUL2 command where 'distance' is the value you need to bring the object back to its original position.
Simmilarly ADDx distance in the 3D script.

Then in your object you can add a parameter that allows for your 'normal' & 'mirrored' options for the object which you then control on the script.


Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Learn and get certified!

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!