Jump to content

Lisp to generate polyline areas table next to cross section entity


Recommended Posts

Posted

Hello guys, I have road cross sections and want to calculate the quantities. Each quantity is drawn in the profile as a closed polyline (picture), but a i want table next to it which represents areas so I dont have to do it manually for each profile. Is there a way that lisp recognize block section of profile and draw for every profile quantities automatically just by selecting whole drawing. Thanks in advance.

Screenshot 2023-10-09 145637.png

Posted

Can you attached example drawing 

Posted

This is built in if you look at "Civil Site Design". You just ask for a report. It supports various subgrade materials.

  • 2 weeks later...
Posted

I understand that there are few softwares outhere that can solve my issue, but this is a little sofistic and i want to see if there is possibility to do that with lisp command. I only need lisp to recognize cross sections and put areas of closed polylines that I draw asside.

Posted

You can get an area of a pline easy, but now the problem the horizontal and vertical scale are different, so the quick way is block the entire sheet of cross sections then rescale in X & Y so now they are at 1:1 true size, then run some form of select all plines and get area making a output table say based on layer or color for each cross section.

 

(setq obj (vlax-ename->vla-object (car  (entsel "Pick obj"))))
(strcat "Area is " (rtos (vla-get-area obj) 2 2))

 

Plenty of examples out there.

Posted

Thanks Bigal for helping me. I found lisp that's working just fine to get pline areas. Is it possible to update lisp command that can recognize section block and put this table next to it for every cross section? here's the lispEDD (polyarea).lsp

Posted

Select the plines, then select the CH85 text etc so it becomes the table heading. If get a chance will have a look at the lisp.

 

I think to auto all sections may be very hard. For me I just use road design software. The cost of writing code v's buying an inexpensive package that does so much more, will pay for its self very quickly.

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