Jump to content

LISP to export line and block counts


Rotechica

Recommended Posts

Hi there,

I am quite new to lisps (and attempting to write them), I 'm trying to find a lisp that can extract block and line information into excel.

As an example the LISP outcomes would be:

-Selecting a number of objects (lines and blocks)
-Counting the number of lines per layer, and the total length of those lines per layer

-Counting number of blocks and dynamic blocks per layer

-Listing the values of those counts and exporting as a csv file

 

If anyone knows of a LISP like this that already exists or could help point me in the right direction to write my own that would be a massive help!

Thanks again to anyone who has the time :)

 

 

Link to comment
Share on other sites

I have seen Lee Mac's DBCount V1-1 which is the output I am looking for... Basically wondering if there is a LISP that includes the selection and counting of other objects (lines/polylines etc), not just blocks/dynamic blocks, and breaks them down per layer 

Link to comment
Share on other sites

13 minutes ago, Lee Mac said:

You could try my Layer Count program posted here.

 

Thanks, just gave it a try however it came up with an error saying 'too few arguments'

Link to comment
Share on other sites

5 minutes ago, Rotechica said:

Thanks, just gave it a try however it came up with an error saying 'too few arguments'

 

I cannot reproduce this error - are you sure you have copied & saved the code correctly?

Link to comment
Share on other sites

I got it working after I removed the BB codes :)

This is really close to what I am after but not quite it. It might help if I add that the outcome for this is to create a high level Bill of Materials eg calling layers DNxxx pipe , and the blocks in question being manholes and valves ect. then it would be a brief summary saying within the drawing there are 123 number of lines equalling a total length of 456m for DN789  pipe (this being repeated per layer), and there are 123 number of valves, 456 number of manholes ect.

Thanks so much for the help, I really appreciate all your work

Link to comment
Share on other sites

Something I was working on a while ago but it fell to the side was a user driven dataextraction basicaly it did counts and produced a table of the results. So for blocks of same name but with different attributes it would do counts at the multi level of attributes.

 

Manhole concrete >1m 52

Manhole concrete >2m 34

Manhole steel lid 26

 

Its not finished but I would appreciate a sample dwg for testing and support those who input, the final product is more than likely to be  shareware code.

Link to comment
Share on other sites

  • 2 weeks later...
On 1/9/2019 at 6:26 PM, BIGAL said:

Something I was working on a while ago but it fell to the side was a user driven dataextraction basicaly it did counts and produced a table of the results. So for blocks of same name but with different attributes it would do counts at the multi level of attributes.

 

Manhole concrete >1m 52

Manhole concrete >2m 34

Manhole steel lid 26

 

Its not finished but I would appreciate a sample dwg for testing and support those who input, the final product is more than likely to be  shareware code.

 

Sorry for taking so long to reply,

I have attached a drawing to help. I can chat to you about good outputs/help where I can (If there is a direct messaging feature here instead of using the thread the whole time)

Quantity_LISP_for_testing.dwg

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