Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

Object reference shifts when moving or strecthing object

Eric B
Enthusiast

Hi all

 

I believe I have messed up something really simple with the attached object

 

When I move or stretch it in the 3D window the object reference moves back as though the addz and addy have been removed(see the attached screenshot)

 

Any suggestions about the silly mistake I have made would be greatly appreicated

 

Cheers


Eric


Capture.PNG


AC6 till current
PC and Mac
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Barry Kelly
Moderator

Add this to the parameter or master script ...

 

ac_bottomlevel = -ZZYZX
PARAMETERS ac_bottomlevel = ac_bottomlevel

 

This will set the bottom level to match your beam height.

Usually the bottom level is zero to match the object.

I believe the edit reference is positioned from this bottom level.

As you are moving your beam in 3D, to need to also reset this bottom level.

 

The first time you stretch an already placed beam, it may still look wrong.

But the next time you stretch it, the value will reset and it will be good from then on.

If you place a new beam it will be good from the start because it already has the correct value.

 

BarryKelly_0-1690943617616.png

 

Barry.

 

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

View solution in original post

5 REPLIES 5
Xandros
Advisor

Hi Eric

I can confirm this behaviour of the editing feedbackmode which ignores the coordinates manipulation triggered by add

As a workaround I'd suggest to try using something like prism or slab, where you can exactly determine the position of each point.

 

https://gdl.graphisoft.com/reference-guide/basic-shapes

ArchiCAD 27 GER / Win10
Intel i9-9900K / 64GB RAM / nVidia GeForce RTX 2080 Ti

Hi Xandros

 

Thanks for your feedback

 

I have tried both the SLAB and the PRISM but they appear to generate the same issue

 

Cheers


Eric


AC6 till current
PC and Mac
Solution
Barry Kelly
Moderator

Add this to the parameter or master script ...

 

ac_bottomlevel = -ZZYZX
PARAMETERS ac_bottomlevel = ac_bottomlevel

 

This will set the bottom level to match your beam height.

Usually the bottom level is zero to match the object.

I believe the edit reference is positioned from this bottom level.

As you are moving your beam in 3D, to need to also reset this bottom level.

 

The first time you stretch an already placed beam, it may still look wrong.

But the next time you stretch it, the value will reset and it will be good from then on.

If you place a new beam it will be good from the start because it already has the correct value.

 

BarryKelly_0-1690943617616.png

 

Barry.

 

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Eric B
Enthusiast

Thanks Barry

 

That worked perfectly. Your help was much appreicated


AC6 till current
PC and Mac
Eric B
Enthusiast

So one last question

 

Have got everything drawing and working correctly but it appears that instead of it showing a 'ghost' height it has moved it to the width of the object

 

Capture.PNG

 

Is there similar code to fix that or have I messed it up in some other way

 

Cheers

 

Eric


AC6 till current
PC and Mac