How to Draw Along and Same Offset The Wall?

How to Draw Along and Same Offset The Wall?

bedyr
Advocate Advocate
1,391 Views
2 Replies
Message 1 of 3

How to Draw Along and Same Offset The Wall?

bedyr
Advocate
Advocate

hi,

I want to draw an align polyline along the any line like below video on Visual Basic Autocad. Anybody can help me?

0 Likes
1,392 Views
2 Replies
Replies (2)
Message 2 of 3

norman.yuan
Mentor
Mentor

Well, it would depends on what exactly "draw" means. 

 

If you can somehow programmatically calculated each vertices of the polyline (without the lead of user moving the mouse cursor) and drawing it at once, then you probably can do it with VBA.

 

if you want to the SAME thing as the video show (a dynamic polyline following the mouse cursor's move, which may trigger some calculation when the cursor is near/at particular entities to determine where the polyline goes), VBA is not able to do that. It surely can be done with AutoCAD's .NET API (or ObjectARX C++, if you choose), though.

 

For example, one of the articles in my blog shows how to visually drag the mouse cursor along a polyline (a known path) with Transient Graphics. The code in that sample can be modified to do what you want: instead of moving along AT the path, the dynamic polyline can be set to an offset to the path; and the code also need to calculate the path when the cursor is near/at something. At the end of dragging (when the cursor is near a predefined point, or user click a point, the dynamic polyline drawn as Transient Graphics would be replaced by a actual drawn polyline.

 

Well, if you program in AutoCAD .NET API. 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 3

bedyr
Advocate
Advocate

Thank you so much for reply. 

 

I want to do on VBA. I dont want to trace. I just want click mouse on any line and my drawing line be offset automaticly and curve at the corners.

 

Can I do that with snap mode?

 

ex: referance to any snap mode point and draw it. 

0 Likes