LENGTHEN in VBA without using SendCommand

LENGTHEN in VBA without using SendCommand

Anonymous
Not applicable
605 Views
3 Replies
Message 1 of 4

LENGTHEN in VBA without using SendCommand

Anonymous
Not applicable
I have several polylines which consist of many lines and arcs joined together. I need to trim these polylines to specific lengths and then offset them. In AutoCAD, I use the LENGTHEN command, with the Total option and then the OFFSET command.

In my VBA routine to automate this process, I tried using SendCommand to do the same, but the polyline length is not updated until my VBA has finished running. If I check the length of the polyline after executing the LENGTHEN command, it is still the original length, but once I end my program, it is updated to be the total length I specified. Because the length is not updated, my offset polylines are the original length, not the new total length specified.

I have tried updating the object, regenerating the drawing, everything I can think of to update the polyline after executing the SendCommand.

Any ideas or alternate VBA methods (without using SendCommand) to accomplish the same procedure would be greatly appreciated.

TIA,
Matt
0 Likes
606 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
The SendCommand method is asyncronous. If you need the updating to be
syncronous. You'll have to reproduce what the lengthen command is doing
using vba.

--
----
Ed
----
0 Likes
Message 3 of 4

Anonymous
Not applicable
I don't think the Lengthen command itself is available in VBA, unless I missed it. How would I reproduce it using other commands?
0 Likes
Message 4 of 4

Anonymous
Not applicable
Hi,

Calculate the coordinates of the vertices in their new location and set the
coordinates of the polyline to the results of your computations.

--

Laurie Comerford
CADApps
www.cadapps.com.au
wrote in message news:5152355@discussion.autodesk.com...
I don't think the Lengthen command itself is available in VBA, unless I
missed it. How would I reproduce it using other commands?
0 Likes