Jump to content
Rotechica

LISP to export line and block counts

Recommended Posts

Rotechica

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 :)

 

 

Share this post


Link to post
Share on other sites
enthralled

Try dataextraction, I think it does what you need.

Share this post


Link to post
Share on other sites
Rotechica

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 

Share this post


Link to post
Share on other sites
Lee Mac

You could try my Layer Count program posted here.

Share this post


Link to post
Share on other sites
Rotechica
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'

Share this post


Link to post
Share on other sites
Lee Mac
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?

Share this post


Link to post
Share on other sites
Rotechica

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

Share this post


Link to post
Share on other sites
BIGAL

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.

Share this post


Link to post
Share on other sites
Rotechica
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×