Ployline Length inside selected Viewport

Ployline Length inside selected Viewport

saifumk8
Advocate Advocate
835 Views
2 Replies
Message 1 of 3

Ployline Length inside selected Viewport

saifumk8
Advocate
Advocate

I'm looking for a lisp code which will get polyline length for selected viewport area only. The polyline will be beyond the viewport area, but I need a program to get only the length inside the viewport area.

 

currently, I'm breaking the polyline at the edge of viewport then taking the length.

 

thank you in Advance.

0 Likes
Accepted solutions (1)
836 Views
2 Replies
Replies (2)
Message 2 of 3

dlanorh
Advisor
Advisor
Accepted solution

Try the attached. Minimally tested, and no check that the selected item to measure is a line object, or that both ends are outside the viewport extents.

 

To start you must be in paperspace with no active viewports. At first prompt, select the viewport. The viewport will open into modelspace and you can start selecting line objects. Make a null selection or press enter to exit the loop and end the lisp.

I am not one of the robots you're looking for

0 Likes
Message 3 of 3

saifumk8
Advocate
Advocate

Thank you very much. It's working.

0 Likes