muthu123 Posted January 11, 2011 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
muthu123 Posted January 11, 2011 Author 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
Michaels Posted January 11, 2011 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
alanjt Posted January 11, 2011 Posted January 11, 2011 Try: (cons 410 (if (eq 1 (getvar 'CVPORT)) (getvar 'CTAB) "Model" ) ) Quote
cadman6735 Posted August 18, 2011 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
alanjt Posted August 18, 2011 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
Lee Mac Posted August 18, 2011 Posted August 18, 2011 66 = 1 when used with an INSERT, filters for attributed blocks. EDIT: Didn't see Alan's post Quote
cadman6735 Posted August 18, 2011 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
BlackBox Posted August 18, 2011 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
Lee Mac Posted August 18, 2011 Posted August 18, 2011 ... Why not just: (cons 410 (getvar 'ctab)) Consider in Paperspace looking through Viewport to Model. Quote
Guest kruuger Posted August 18, 2011 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
BlackBox Posted August 18, 2011 Posted August 18, 2011 Consider in Paperspace looking through Viewport to Model. That's what I was missing, thanks. Quote
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.