Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VIEWPORT

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
dicra
619 Views, 7 Replies

VIEWPORT

Hi everybody,

 

I'm having a little bit problems with viewport, hope that you could help me.

I would like to make a viewport, which is going to be based on points from model.

For example, I will draw a rectangle in model, and what is in that rectangle I would like to be in viewport. I can easily get points from that rectangle, and there is going to be a lot of them. 

 

If anyone is having some examples, or directions how to make a lisp, I would really appreciate it.

 

Thank you for your time.

 

7 REPLIES 7
Message 2 of 8
hmsilva
in reply to: dicra

Hi dicra,

p1 and p2 as MSpace points in WCS.

(if (and p1
	 p2
	 (/= (getvar 'CTAB) "Model")
    )
  (command "-VPORTS"
	   (trans p1 0 3)
	   (trans p2 0 3)
	   "_.MSPACE"
	   "_.Zoom"
	   (trans p1 0 3)
	   (trans p2 0 3)
	   "_.PSPACE"
  )
)

HTH

Henrique

EESignature

Message 3 of 8
Kent1Cooper
in reply to: dicra

Look into Express Tools > Layout Tools > "Change Space" [assuming that's in your version].  I use that often in the other direction -- I have a paper-space viewport [most often of the usable drawing area on a sheet minus border & title block etc.], and after setting the viewing scale of that viewport, I draw a rectangle over it, then use Change Space to move that into model space, where it exactly represents the area that shows in that viewport.  Going in your direction, you could draw a rectangle in model space, get into paper space in a viewport that includes more than that, and use Change Space to move that rectangle into paper space, where it will give you the shape of the viewport you want.  [Actually, I would make a copy of it, and change the space of only one of them, so the outline remains in model space.]

Kent Cooper, AIA
Message 4 of 8
BlackBox_
in reply to: Kent1Cooper


@Kent1Cooper wrote:

 

... I use [CHSPACE] often in the other direction -- I have a paper-space viewport [most often of the usable drawing area on a sheet minus border & title block etc.], and after setting the viewing scale of that viewport, I draw a rectangle over it, then use Change Space to move that into model space, where it exactly represents the area that shows in that viewport.  


1+ ... This has been a very useful workflow for me as well, over the years.

 

[Edit] - Civil 3D now offeres some Plan Production tools, but this is still a common practice in my limited experience.



"How we think determines what we do, and what we do determines what we get."

Message 5 of 8
dicra
in reply to: hmsilva

Henrique, Kent,

 

Thank you very much. Quick and helpful as always, I learned so mush from you guys.

 

Henrique, this is exactly what I was looking for. 

Kent, your answer is helpful too, specially, because I will need something in opposite direction too.

 

This is going to help me for now, but later, I will make the things a little  bit more complicated. First, I will try to struggle whit that by my self.

 

Thanks again.

Message 6 of 8
hmsilva
in reply to: dicra

You're welcome, dicra
Glad I could help

Henrique

EESignature

Message 7 of 8
scot-65
in reply to: dicra


@dicra wrote:
This is going to help me for now, but later, I will make the things a little  bit more complicated. First, I will try to struggle whit that by my self.

 

Thanks again.


Rat-a-tat-tat some urban site plans to generate paper space viewports of the individual sites.

I have the model space side working, but have not been able to find time to do the paper space side.

Wanna take a peek?

 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.


Message 8 of 8
dicra
in reply to: scot-65

Of course Scot,

I'm sure that I will find something useful.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost