Any advice for how to use that string for this noob ? I need to select only paperspace objects (indeed blocks) too. How do i use that string to select them ?
@limezestpizzawithextracheese wrote:
Any advice for how to use that string for this noob ? I need to select only paperspace objects (indeed blocks) too. How do i use that string to select them ?
Deniz,
the group code 67 it's a flag, if it's 1 indicates that the entity is in paper space, if zero or absent indicates that the entity is in model space.
So from the code string
(setq sstb ;; sets to the sstb variable re resulting selection set
(ssget "X" ;; search the entire drawing database
(list ;; filter list
(cons 0 "INSERT") ;; must be an INSERT entity
(cons 67 1) ;; must be in paper space
) ;; end the filter list
) ;; end the ssget function
) ;; end the setq function
You can also use
(setq sstb (ssget "X" (list (cons 0 "INSERT") (cons 410 "~Model") )))
the group code 410 is the Layout name, and with a tilde preceding the name, means except that name, will accept as valid layaut name all except "Model"
Hope that helps
Henrique
Henrique,
Can you pls tell me how can i use that code string ? ( I remember that when i asked this question i found the answer but now i forgot 😄 )
Thnx
I already copied and pasted that to command bar but it does not select the blocks in the paperspace ?
PS: ( I'm seeking for the answer because, all i want to do is to change the titleblock attributes whenever it is necessary. So Right now i finished my dynamic block but, it seems that i can't select all the title blocks i have pasted to each layout ?
Hi Deniz,
with
(setq ss (ssget "_X" '((0 . "INSERT") (410 . "~Model") (66 . 1))))
you should ceate a selection set with all blocks with attributes in all layouts, except in model space, and set the 'ss' variable with it.
Henrique
Nope, It seems that it does not work for me. I attached the file. What i need to do is to make an attout and attin for those titleblocks, in my layouts.
Hope i could define enough.
I pasted that code in the command bar but again did not worked. Here is a screenshot.
Deniz,
at the moment I don't have AutoCAD with me, but try
(if (setq ss (ssget "_X" '((0 . "INSERT") (410 . "~Model") (66 . 1))))(sssetfirst nil ss))
Henrique