PDA

View Full Version : Check For Block Insert in Paper Space


vferrara
2009-03-18, 06:20 PM
Hello AUGI Members,

Is there a way, using a lisp routine to, determine if a specific block (Myblock.dwg) is inserted in Paper Space on a drawing file....??

I tried using the Tblsearch approach but that method finds the block even if it is inserted in Model Space.

I want to check if the block is inserted in Paper Space and then do something...!

Any assistance would be appreciated.

Regards,
Vince

T.Willey
2009-03-18, 06:51 PM
This should find all inserts that are called ' MyDrawing ' that are not in modelspace.

(setq ss (ssget "_X" '((0 . "INSERT") (2 . "MyDrawing") (-4 . "<NOT") (410 . "Model") (-4 . "NOT>"))))

rkmcswain
2009-03-18, 07:35 PM
This should find all inserts that are called ' MyDrawing ' that are not in modelspace.

(setq ss (ssget "_X" '((0 . "INSERT") (2 . "MyDrawing") (-4 . "<NOT") (410 . "Model") (-4 . "NOT>"))))


I didn't think of that.

Wouldn't this work also?

(ssget "_X" '((0 . "INSERT") (2 . "MyDrawing") (67 . 1)))

T.Willey
2009-03-18, 07:45 PM
I didn't think of that.

Wouldn't this work also?

(ssget "_X" '((0 . "INSERT") (2 . "MyDrawing") (67 . 1)))


That worked on a quick test also. I didn't know about that one. I will have to see what code 67 is. Thanks.

vferrara
2009-03-18, 10:32 PM
Thank you Tim......that solution worked great....!

Vince

T.Willey
2009-03-18, 11:27 PM
Thank you Tim......that solution worked great....!

Vince

You're welcome Vince. R.K's should also, as it is basically the same, as the 67 bit is for model vs paper space flag.