Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I get polyline properties with VBA?

Status
Not open for further replies.

jrice174

Civil/Environmental
Nov 8, 2004
129
0
0
US
I'm trying to find the length from one point on a polyline to another point on that polyline. The polyline is only made up of lines and arcs. The polyline.coordinates does not give me any arc information. The Autocad LIST command will give me the arc information but I can't figure out how the get it in VBA. I don't want to have to explode the polyline because then I would need to figure out the order of the separate entities. Any ideas?
 
Replies continue below

Recommended for you

Hi jrice174,

VBA doesn't expose this property - you'll need to do some math to calculate the lengths, and you'll need to use the point data to do it.

HTH
Todd
 
The coordinates don't tell me if the points are for lines or arcs so there is no way to tell if it is a corner or a rounded arc. Isn't there a way to do the LIST command and get the results from the command line?
 
Well, you can do a send command but you won't be able to get the output. Best bet is to write a quick and dirty lisp routine using the vlax-curve-xxx function Carl recommended, and have the lisp routine pump the results into one of the USERXXX variables, and then use VBA to pull it out.

HTH
Todd
 
Status
Not open for further replies.
Back
Top