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

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

How to Get DlantAngle/SlantDirectionAngle And endPos from Object on ACAPI

nishida_jp
Participant

In Archicad25
The rotation of an object (column/beam) on the XY plane can be obtained using "angle", but how do you obtain "slantAnge" and "slantDirectionAngle"?

Also, the starting point is "pos", but how do you obtain the coordinates that correspond to "endPos" in the case of a beam?

4 REPLIES 4
Yohei Sekiguchi
Contributor

Hi.

 

You can get the element properties through the element type structures as shown below.

 

element.column.slantAngle
element.column.slantDirectionAngle

 

 

The help files installed in the following locations will help you.

C:\Program Files\GRAPHISOFT\API Development Kit 24.3009\Documentation\MSDN\APIDevKit

 

The start and end points of beams can be obtained using begC and begE properties.

 

element.beam.begC
element.beam.begE

 

 

Thank you.

But I need DlantAngle/SlantDirectionAngle And endPos from Element of Object.
I know column/beam.
Element(API_ObjectID) have [pos] and [angle] and memo.param[A],[B],[ZZYZX] and quantity.volume.

Yohei Sekiguchi
Contributor

No such properties exist for Object type element in Archicad.

Akos Somorjai
Graphisoft
Graphisoft

Hello,

 

There's no generic way to obtain that information because the GDL language used to create those objects allows free-form geometry. I can think of two ways to approach this:

1. Check the object's parameters (in memo.params) and look at the GDL script of that object to see which parameter may contain the information you need.

2. Get the 3D representation of the object. If you can figure out which planes of the object are the end planes (e.g., from the plane's normal vector), then you can calculate the slant angle and distance.

 

Best, Akos