muthu123 Posted January 11, 2011 Share Posted January 11, 2011 Dear friends, If i used "all" in ssget fucntion as follows, it will return all the blocks including model space and paper space. But how can i use the filter to select only in current active space. (Setq ss (ssget "all" (list (cons 0 "INSERT") (cons 2 "A1_TITLE_BLOCK") (cons 66 1)) ) ) Quote Link to comment Share on other sites More sharing options...
muthu123 Posted January 11, 2011 Author Share Posted January 11, 2011 We have found the way to solve that by following code (Setq ss (ssget "all" (list (cons 0 "INSERT") (cons 2 "A1_TITLE_BLOCK") (cons 66 1) (cons 410 (getvar "ctab"))) ) ) Quote Link to comment Share on other sites More sharing options...
Michaels Posted January 11, 2011 Share Posted January 11, 2011 Here it is ...... (Setq ss (ssget "_x" (list (cons 0 "INSERT") (cons 2 "A1_TITLE_BLOCK") (cons 66 1) (cons 410 (getvar "ctab"))) ) ) Michaels Quote Link to comment Share on other sites More sharing options...
alanjt Posted January 11, 2011 Share Posted January 11, 2011 Try: (cons 410 (if (eq 1 (getvar 'CVPORT)) (getvar 'CTAB) "Model" ) ) Quote Link to comment Share on other sites More sharing options...
cadman6735 Posted August 18, 2011 Share Posted August 18, 2011 Hi all Ran across this post looking for "how to select all object in current layout" What does the (cons 66 1) do? I found the DXF code in help menu under "Group Code in Numerical Order" (Group Code 66 "Entities follow" flag (fixed)) I am not sure what this means and where did the 1 come from. Thanks Quote Link to comment Share on other sites More sharing options...
alanjt Posted August 18, 2011 Share Posted August 18, 2011 Hi all Ran across this post looking for "how to select all object in current layout" What does the (cons 66 1) do? only selects blocks with attributes. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 18, 2011 Share Posted August 18, 2011 66 = 1 when used with an INSERT, filters for attributed blocks. EDIT: Didn't see Alan's post Quote Link to comment Share on other sites More sharing options...
alanjt Posted August 18, 2011 Share Posted August 18, 2011 That guy looks a little constipated. Quote Link to comment Share on other sites More sharing options...
cadman6735 Posted August 18, 2011 Share Posted August 18, 2011 Thanks I guess my process should have been: Look to see what is being selected (cons 0 "INSERT") then I should have gone to INSERT and looked at the DXF codes there to find my answer. Sometimes I have the hardest time finding my way around Another question since I am here: The OP use (cons 410) to get string for (getvar "ctab") This 410 is not part of the "insert" DXF code that I can see, why use 410? I also see 410-419, 430-439 and 470-479 What is the difference and how would I know to use which one? Quote Link to comment Share on other sites More sharing options...
BlackBox Posted August 18, 2011 Share Posted August 18, 2011 Try: (cons 410 (if (eq 1 (getvar 'CVPORT)) (getvar 'CTAB) "Model" ) ) ... Why not just: (cons 410 (getvar 'ctab)) ...? Another question since I am here: The OP use (cons 410) to get string for (getvar "ctab") This 410 is not part of the "insert" DXF code that I can see, why use 410? I also see 410-419, 430-439 and 470-479 What is the difference and how would I know to use which one? Developer Help >> DXF Reference >> ENTITIES >> Common Group Codes for Entities >> DXF code 410 Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 18, 2011 Share Posted August 18, 2011 ... Why not just: (cons 410 (getvar 'ctab)) Consider in Paperspace looking through Viewport to Model. Quote Link to comment Share on other sites More sharing options...
Guest kruuger Posted August 18, 2011 Share Posted August 18, 2011 ... Why not just: (cons 410 (getvar 'ctab)) because then we got incorrect info about layout when we in "model" but thru viewport k. EDIT: i'm to slow Quote Link to comment Share on other sites More sharing options...
BlackBox Posted August 18, 2011 Share Posted August 18, 2011 Consider in Paperspace looking through Viewport to Model. That's what I was missing, thanks. Quote Link to comment Share on other sites More sharing options...
cadman6735 Posted August 18, 2011 Share Posted August 18, 2011 :)Thanks all 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.