How to select dynamic blocks based on Visibility Value?

How to select dynamic blocks based on Visibility Value?

Anonymous
Not applicable
4,368 Views
6 Replies
Message 1 of 7

How to select dynamic blocks based on Visibility Value?

Anonymous
Not applicable

Hi All! Happy New Year!
It seems I'm unable to select dynamic blocks based on their Visibility Value.
I've created a dynamic block with 4 different Visibility Values as symbols to represents different types of street lights.
Now I would like to count the number of each type of lights.
As the block name is the same for all of them, the quick select tool doesn't allow me to do it.
I've found lisp routines that solve the issue but, I use Autocad LT that doesn't support lisp.
It's frustrating.
If you could please help me out, that would be great.
Cheers,

0 Likes
Accepted solutions (1)
4,369 Views
6 Replies
Replies (6)
Message 2 of 7

steven-g
Mentor
Mentor

It is this type of operation that the more expensive Lisp capable Full Autocad is used by many, just one of those things LT can't do without applying more steps and different methods, there is still no way to just select the blocks depending on visibility states, but you could add at least one attribute to the block that reads the visibility state using the properties of the blocks and then run the "attext" command that will extract the attribute values out to a text file, from there you can either manually count the blocks or use excel to help. Another method would be select all the blocks and use the list command, and then open the command history and again count up the correct blocks manually or export the list into excel and use excel to sort and count the blocks. But it remains a manual method. There is no automation in LT. It can be very quick when you have done it a few times, but it does take some practice.

0 Likes
Message 3 of 7

Anonymous
Not applicable

Hi Steven,

Thank you for your quick reply.

I'll try the two methods you've suggested and let you know how it goes.

Cheers,

0 Likes
Message 4 of 7

Anonymous
Not applicable

Hi Steven,

I've tried the second method using the list command after selecting all the blocks.
As the drawing has a very large number of blocks (almost 200) when I copy the history and paste it on Excel, only a fraction of the selected blocks is shown.


I guess it has to do with the maximum number of rows recorded by the command history? Does that make sense?
Have you found this problem before?
If you could help me out, that'd be great.

Cheers!

0 Likes
Message 5 of 7

cadffm
Consultant
Consultant

I am sure you copy from your Textscreen,

line limit default is 400, you can change it to 2048 by editing the environment variable CmdHistLines.

 

but you can also use the whole log if you enable the logfile feature.

LOGFILEPATH

LOGFILEMODE

LOGFILEON

LOGFILEOFF

 

 

Sebastian

Message 6 of 7

steven-g
Mentor
Mentor
Accepted solution

logfiles is the way to get at all the information, but using the list command it is also a good idea to set the undocumented variable "QAFLAGS=2", this makes sure if you have a large number of objects you don't need to keep pressing enter after every so many items are listed, it will run the list command giving you one continuous set of results.

And you should also know that logfiles are permanently stored, and keep a record of every command you use within a drawing session, if you close and reopen a drawing a new logfile is created, which uses the drawing name and a random sequence of characters. This also means you really should go to the logfilelocation (logfilepath) every so often and delete any old logfiles.

 

Message 7 of 7

Anonymous
Not applicable

Brilliant!
It works. I managed to count the number of each block type.
Thank you, Steven, I appreciate it.

Cheers,