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

polylines with radius

Kaspars
Booster

Hi, i'm quite new to GDL and

can somebody guide me on how to insert line segment with defined radius into POLY2 command.

All i can do is - insert node's x,y coordinates to draw stright lines, but I know there is a way to add curved ones too, i just don't know how 🙂

 

Thx a lot,

Kaspars

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Barry Kelly
Moderator

Depends on what kind of arc you want to place.

It could be tangential from the last line segment, it could have an endpoint and a radius, it could have a centre point and a radius, and there are other versions as well.

 

Have a look in the GDL reference guide and look for the section on 'Status codes' and then go to the section for 'Additional status codes'.

 

Best is to drawer the shape (polyline) you want with one point on the project origin.

Then select polyline and go to FILE menu > Libraries and Objects > Save Selection as Library Part > Object.

Place the object, select it and open the script.

Have a look at the script to see what it has automatically written.

 

BarryKelly_0-1645631226847.png

This might help you to understand.

It will probably only use this 4000 status code - start point, center point and rotation angle.

 

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

2 REPLIES 2
Solution
Barry Kelly
Moderator

Depends on what kind of arc you want to place.

It could be tangential from the last line segment, it could have an endpoint and a radius, it could have a centre point and a radius, and there are other versions as well.

 

Have a look in the GDL reference guide and look for the section on 'Status codes' and then go to the section for 'Additional status codes'.

 

Best is to drawer the shape (polyline) you want with one point on the project origin.

Then select polyline and go to FILE menu > Libraries and Objects > Save Selection as Library Part > Object.

Place the object, select it and open the script.

Have a look at the script to see what it has automatically written.

 

BarryKelly_0-1645631226847.png

This might help you to understand.

It will probably only use this 4000 status code - start point, center point and rotation angle.

 

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

Yes,

thank You very much,

forgot about Special  tatus codes.

My bad, didn't read GDL reference guide closely enough. Sometimes getting lost there

 

Kaspars