Jump to content

Help with Polyline Lisp (Export All Lengths to Table)


gordon_Gjs

Recommended Posts

Hello, I am searching for a lisp that can export the lengths of all selected polylines and export them to either Excel or an AutoCad table.

 

so far I cannot find the right one.

 

The lisp would need to have you select multiple polylines and give the total lengths of each polyline with auto labeling in the order that they were selected in. Then the data would either appear on an AutoCad table or Excel with autolabel number, Layer name and Length.

Link to comment
Share on other sites

  • 1 month later...

hi, was looking for this lisp routine. made some tweaks to match my requirement.

1. added additional column to get area of polyline 

2. changed units from imperial to metric. i was working on a drawing in millimeters. and i wanted the length output to be in meters and area in sq meters. edited the cvunit thing in the code for that.

 

thank you all, i am completely beginner in this. and this thread was a great help

test area length.lsp

 

additionally, is there a way to add one more column with some sort of identifier for the polylines?

Edited by Farsin
Link to comment
Share on other sites

  • 1 year later...
On 5/31/2018 at 2:31 PM, BIGAL said:

Not to hard look for matching lines in code above in most cases its add to the number an extra 1.

 

 

(setq numcolumns 3)
............
(vla-setcolumnwidth objtable 2 25)
.......
(vla-settext objtable 1 2 "Layer") 
........
(vla-settext objtable Y 1 (rtos (vla-get-length e) 2 3))
(vla-settext objtable Y 2 (vla-get-layer e) )
 

 

Hi, Bigal
I would like to add a polyline coordinate for X, Y, and Z.
Would it be possible to add a polyline coordinate?

 

Link to comment
Share on other sites

Need more info a pline has multiple xyz co-ords not sure what you want need to dummy up an example.

Edited by BIGAL
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...