Current location - Trademark Inquiry Complete Network - Futures platform - How to call the second endpoint coordinates of polyline in CAD?
How to call the second endpoint coordinates of polyline in CAD?
1. For ordinary ambiguous lines, you need to traverse this table and separate the data with the first element of 10:

(Defeng c:2222 ()

(setq f (entget (car (entsel))))

(foreach a f

(if (= (car a) 10)

(setq pt (cons (cdr a) pt))

)

)

(setq pt (reverse pt));); Table pt reverse order

; The pt obtained here is the coordinate table of each vertex.

……

)

2. For editing and fitting polysemous word lines, you need to use the entnext function to obtain their endpoints, such as

(setq b(entnext f)); Obtain that next endpoint of ambiguity

(setq p(cdr(assoc 10(entget b)))