Jump to content
Steven P

Select all in model space

Recommended Posts

Steven P

good afternoon,

 

and sorry if I am being stupid today (in my defence, a long 4 day weekend just finished this morning)

 

I want to select everything in modelspace, how do I do that with LISP?

 

 

 

I can get everything in the drawing with (ssget "x") but I am not sure how to just get the objects drawn in model space (ie everything but the border)

 

 

(I am wanting to make up a very simple routine to put everything in model space to layer 0, but keep the borders as they are on their layers, which I can run when the drawing opens and with no human interaction)

 

Thanks and appologies for a simple question

Share this post


Link to post
Share on other sites
BKT

See if using "_A" instead of "X" does what you want...

Share this post


Link to post
Share on other sites
Steven P

Perfect thanks.

Share this post


Link to post
Share on other sites
BKT

Glad it helped.

Share this post


Link to post
Share on other sites
ronjonp

Also this:

(ssget "_x" '((410 . "Model")))

Share this post


Link to post
Share on other sites
Lee Mac
See if using "_A" instead of "X" does what you want...

 

The "A" mode string omits objects on frozen layers, it will still include objects in all layouts - see this reference.

Share this post


Link to post
Share on other sites
Steven P

Thanks Lee, I was quite happy with what I had until I saw that....

 

 

 

I'll try ronjonp suggestion

Share this post


Link to post
Share on other sites
BKT
The "A" mode string omits objects on frozen layers, it will still include objects in all layouts - see this reference.

 

Missed the frozen layers thing, Lee - thanks for the correction. About the layouts, I don't have AutoCAD to check this out but when I use the "A" mode in BricsCAD from model space it ignores the entities on the layouts, whereas "X" will grab entities from both model and layouts.

 

Maybe somebody could check that for me in AutoCAD?

Share this post


Link to post
Share on other sites
Lee Mac

No worries -

 

Maybe somebody could check that for me in AutoCAD?

 

In AutoCAD, both the "X" and "A" mode strings include objects in all layouts.

Share this post


Link to post
Share on other sites
BKT

Wow! This is what I get for not keeping up on version updates. This was fixed a while back:

 

Version 15.1.11 (BricsCAD)

 

"SR48908 - LISP/SDS/BRX : ssget("A") did only select entities from active layout/space, instead of from any layout/space."

 

Way to go, BricsCAD!

Share this post


Link to post
Share on other sites
betazero

Well now "A" AND "_A" IN BRICSCAD works like Autocad and selects in model and paperspace. how do I use the code below? Where do I put the variable I want to fill with data? Could you show it in a sample? I know the thread is old so not hopeful for a response

(ssget "_x" '((410 . "Model")))

Share this post


Link to post
Share on other sites
dlanorh
2 hours ago, betazero said:

Well now "A" AND "_A" IN BRICSCAD works like Autocad and selects in model and paperspace. how do I use the code below? Where do I put the variable I want to fill with data? Could you show it in a sample? I know the thread is old so not hopeful for a response


(ssget "_x" '((410 . "Model")))

 

(setq ss (ssget "_X" '((410 . "Model"))))

 

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...