Jump to content

Lisp for viewport extents in modelspace?


WindowsIHateYou

Recommended Posts

Is there any sort of lisp or command that draws a paperspace viewport's extents into modelspace?

 

I usually do it manually, with CTOS, but now I have a job with hundreds of viewports. It would be much easier to lisp them all at once.

 

Thanks

Link to comment
Share on other sites

CTOS (Copy To Other Space) or S2P(?) (Space to Space) are two lisps that move things between paper and model, while adjusting scale and holding location (still appears the same).

Link to comment
Share on other sites

Is there any sort of lisp or command that draws a paperspace viewport's extents into modelspace?

 

I usually do it manually, with CTOS, but now I have a job with hundreds of viewports. It would be much easier to lisp them all at once.

 

Thanks

 

I am attaching one that I found many years ago. It only makes one at a time and it sounds like you want many at once. This one creates the object on defpoints (that is how old it is) but you can change it to a no plot layer in the lisp routine, one that you normally use.

MVW.LSP

Link to comment
Share on other sites

I am attaching one that I found many years ago. It only makes one at a time and it sounds like you want many at once. This one creates the object on defpoints (that is how old it is) but you can change it to a no plot layer in the lisp routine, one that you normally use.

 

Thanks. Tried it but had a few issues. It didn't respect the viewport rotation. Also, the new object had the correct height, but incorrect width (x2). Tried locked and unlocked viewports with same results.

 

I wouldn't mind doing them "each" rather than "all at once" if this worked.

Link to comment
Share on other sites

 

That SOUNDS like exactly what I am looking for, however, putting it together seems above my current skill level and available time. I tried "vp-outline.lsp", also mentioned in that thread. So far THAt works for me.

 

I downloaded it from http://www.jtbworld.com/lisp/vp-outline.htm

Link to comment
Share on other sites

CTOS (Copy To Other Space) or S2P(?) (Space to Space) are two lisps that move things between paper and model, while adjusting scale and holding location (still appears the same).

 

I am not sure if the CHSPACE command was available in 2008 or not.

It won't copy, but will move an entity (Change Space) from paperspace to modelspace.

Scaling is included, when it is moved.

I usually drag a rectangle over my existing viewport, then use CHSPACE to send it to modelspace.

Link to comment
Share on other sites

I am not sure if the CHSPACE command was available in 2008 or not.

It won't copy, but will move an entity (Change Space) from paperspace to modelspace.

Scaling is included, when it is moved.

I usually drag a rectangle over my existing viewport, then use CHSPACE to send it to modelspace.

 

I usually do that with CTOS, but the vp-outline lisp saves a lot of time, and I have a project with a lot of viewports, so this will save a lot of time.

Link to comment
Share on other sites

vp-outline.lspPer the lisp author, the following change:

 

(if ss

(vla-put-mspace ad :vlax-false)

) ; equal (command "._pspace"))

 

To

 

(vla-put-mspace ad :vlax-false)

 

...will allow the lisp to exit back into paperspace/layout. This is helpful when you have to use the lisp repeatedly.

 

So final version is:

 

vp-outline.lsp

Link to comment
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...