Jump to content

Quantity Takeoff LISP


abrom24

Recommended Posts

Hello,

 

I am attempting to put together a LISP that creates a table of cumulative geometric properties of selected objects.

 

I would like to be able to quantify Erosion and Sedimentation Control BMPs by layer for a cost estimation. Controls such as compost filter sock and orange construction fence are polylines, erosion control blanket is hatched, and inlet protection is a block. The controls are all on their own respective layers. The idea is that I would be able to select one occurrence of each of these controls (polyline, hatch, block), have the LISP apply the "select similar" command, and create a table that reports back the length of the polylines by layer, the cumulative area of the hatches by layer, and a count of the blocks by layer.

 

Due to my inexperience with LISP, I am afraid that I am unable to create this app in time for when I need it. It would be greatly appreciated if someone could help out in creating this app.

 

Thank you for your time.

Link to comment
Share on other sites

A freebie count of the blocks is out there google.

 

Have you tried "dataextraction" ?

 

Bigal,

 

I have tried that before. I would like something that reports the cumulative length/areas based off of the layer. The size of the drawings that I work with are usually pretty large, which results in the dataextraction command creating a table that has an unmanageable amount of rows. The option to combine identical rows does not work in this case due to the fact that the lengths and areas are different for each polyline or hatch.

Link to comment
Share on other sites

@abrom24

 

 

An bounty is "something" you give in return for the work you ask 1 of us needs to do for you.

Since there is a time deadline someone needs to dedicate his/her time for this.

Link to comment
Share on other sites

Here is count blocks, custom version of dataextraction with lots of ifs and butts borders on a commercial request not expensive but just how long will the rubber band stretch after version 5 if repeated changes. As I already suggested its all out there just a case of putting together a number of seperate routines with a suitable front end. See image above.

 

(defun blockcnt ( / ss effname)
(if (and 
(setq obj (vlax-ename->vla-object (car (entsel "\nPick block "))))
(= (vla-get-objectname obj) "AcDbBlockReference")
)
(progn
(setq effname (vla-get-effectiveName obj))
(setq ss (ssget "X" (list (cons 0 "INSERT")(cons 2  effname))))
(alert (strcat "There is " (rtos (sslength ss) 2 0) " " effname " blocks))
)
(alert "you did not pick a block")
)
(princ)
)
(blockcnt)

 

Ps working on a global blocks attributes to table no hard coded block names. Yes my friend paypal is involved.

Link to comment
Share on other sites

  • 3 years later...

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