Jump to content

Layer selection


Recommended Posts

Posted

Hi all;

I am trying to select all layers that contain block references,

is there a way?

Posted

I'm fairly certain it is not. It may be possible to get a list with LISP, though.

Posted

in lisp use ssget with two filters (0 . "Insert")(8 . "layername") if true then blocks exist on a layer can add multi layer (8 . "Lay1,lay2,lay3").

Posted

You can use QSELECT to select all Block References in the drawing and then, while they are selected, issue the LIST command. This will at least tell you all the layers that the blocks are on. Then, you can select those layers.

Posted
You can use QSELECT to select all Block References in the drawing and then, while they are selected, issue the LIST command. This will at least tell you all the layers that the blocks are on. Then, you can select those layers.

 

Yes-this is the best way, but i want to know is there a method without using lisp routine selecl layers containing block references.

Posted

Qselect and select all blocks then run the command layiso, then in the layer manager you can sort the list according to which layers are on or off, and select just the layers that are still on.

Posted

Can be done using Filter it supports OR so can look for multiple layers only tried with a couple once ran it gives total. Do Filter add block got to bootom add Start OR add layers got to bottom add End or. I found out something to add more you can click below the last entry so building a filter list.

 

layfilter.jpg

Posted
Can be done using Filter it supports OR so can look for multiple layers only tried with a couple once ran it gives total. Do Filter add block got to bootom add Start OR add layers got to bottom add End or. I found out something to add more you can click below the last entry so building a filter list.

 

[ATTACH=CONFIG]52956[/ATTAC

 

Am i understand clearly? this method selects blocks that is in specified layers. but my matter is selecting layers containing blocks not selecting blocks.

Posted

Need to loop through layer collection and then do a ssget with Insert as filter and if true display layer name, now for 5 minutes of peace.

Posted

Found 5

 

(vlax-for lay (vla-get-Layers (vla-get-activedocument (vlax-get-acad-object)))
(setq layname (vla-get-name lay))
(setq ss (ssget "x" (list (cons 8 layname)(cons 0 "INsert"))))
(IF (/= SS NIL)
(princ (STRCAT "\nBlocks on this layer .. " layname ))
(princ)
)
(setq ss nil)
)

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