m_sherif005 Posted February 21, 2015 Share Posted February 21, 2015 Hi all; I am trying to select all layers that contain block references, is there a way? Quote Link to comment Share on other sites More sharing options...
RobDraw Posted February 21, 2015 Share Posted February 21, 2015 I'm fairly certain it is not. It may be possible to get a list with LISP, though. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 22, 2015 Share Posted February 22, 2015 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"). Quote Link to comment Share on other sites More sharing options...
Peter Deniet Posted February 22, 2015 Share Posted February 22, 2015 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. Quote Link to comment Share on other sites More sharing options...
m_sherif005 Posted February 22, 2015 Author Share Posted February 22, 2015 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. Quote Link to comment Share on other sites More sharing options...
steven-g Posted February 22, 2015 Share Posted February 22, 2015 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. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 23, 2015 Share Posted February 23, 2015 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. Quote Link to comment Share on other sites More sharing options...
m_sherif005 Posted February 23, 2015 Author Share Posted February 23, 2015 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. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 24, 2015 Share Posted February 24, 2015 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. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 24, 2015 Share Posted February 24, 2015 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) ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.