Jump to content

Recommended Posts

Posted

Hi all,

 

I am new to this forum and have no clue about AutoLISP.

 

Could anyone please help me with an AutoLISP routine that calculates the total length of polylines bordered by a closed polyline?

 

 

 

 

I need this total length in order to calculate the average slope of a parcel of land. Please see attached image. What i have been doing is as the following:

  • Manually trim each contour (polyline) to the boundary of each parcel (closed polyline)
  • Use AutoCad's properties or list to get the length of each polyline within the boundary
  • Add all the lengths using MS Excel to get the total length

Any help would be deeply appreciated.

 

Cheers,

 

hdn32

screen.pdf

Posted

That sounds familiar, wrote that one years ago. The routine:

 

-copied contours to a new temporary layer, the closed polyline was used to select contours using the "cp" selection method

-isolate layers to include just copied contours

-trimmed contours, using polyline as cutting edge, and an offset (small) for a trimming fence line

-select remaining enclosed & trimmed contours, sum up length of each

 

May not have been slick but generally worked. Some lisp jedi masters here may be able to use this as fodder for an improved approach.

Posted

I found a thread at AUGI named "Length of polylines within an area". But the code is just partially completed

 

Since I am a newbie, I can not post a link here.

  • 3 weeks later...
Posted

Anyone find a solution to this. It would come in rather handy.

 

Scott

Posted

I could have sworn I've come across such a routine but for the life of me I could not find it. In the meantime I have a two part solution. For trimming everything on the outside (or inside) of a closed polyline you could try CookieCutter2 v1.2 whcih can be found at www.theswamp.org and then get the total length of all the entities within the closed polyline using Tlen.lsp which you can find at www.turvill.com.

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...