Author Topic: Pan in two viewports at once?  (Read 2302 times)

0 Members and 1 Guest are viewing this topic.

Shade

  • Guest
Pan in two viewports at once?
« on: July 31, 2008, 10:51:36 AM »
I would like to write a lisp that allows me to pan in two view ports at once if possible.

Reason:
My grid for my floor plans maybe in one view port and the partial enlargement of plan in another. (refer to attached image)
I want to be able to pan i the partial plan viewport and have the grid viewport follow.

I have some ideas on how to go about the task in pseudo code, but I am little unsure about the viewport info I am trying to manipulate.
Autocad's DXF code help is kinda vague on this subject, so I am fishing for example on manipulating a viewport data.
Any help would be greatly appreciated.

Thanks in advance
Shade  :mrgreen:


ronjonp

  • Needs a day job
  • Posts: 7531
Re: Pan in two viewports at once?
« Reply #1 on: July 31, 2008, 10:55:21 AM »
DXF and vports is pretty limited..I'd go the vl route.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Pan in two viewports at once?
« Reply #2 on: July 31, 2008, 11:16:45 AM »
Review the code on this thread. It will show you some VP manipulations.

http://www.theswamp.org/index.php?topic=18143.0

I assume you have two VPs one on top of the other?
I suspect you will not be able to do a real time pan for both VPs but pan in one & update the other.
Or use grread or getpoint to pick start & end of pan, then update both VPs.
« Last Edit: July 31, 2008, 11:19:59 AM by CAB »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Shade

  • Guest
Re: Pan in two viewports at once?
« Reply #3 on: July 31, 2008, 11:40:20 AM »
I assume you have two VPs one on top of the other?

No, that procedure is no no in my books. Viewports can overlap, but one can never be nested in the other. Too hard to manipulate the nested viewport.

I suspect you will not be able to do a real time pan for both VPs but pan in one & update the other.
Or use grread or getpoint to pick start & end of pan, then update both VPs.

Both ideas have been considered and I am perusing the first of panning real time in one and having the other update later.
If it doesn't work I will try the other route.

Thanks for the help! CAB
 :-D

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Pan in two viewports at once?
« Reply #4 on: July 31, 2008, 11:46:49 AM »
I assume you have two VPs one on top of the other?
No, that procedure is no no in my books. Viewports can overlap, but one can never be nested in the other. Too hard to manipulate the nested viewport.

Oh, I saw one picture & wondered where the other VP was. (Not Shown)  8-)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Pan in two viewports at once?
« Reply #5 on: July 31, 2008, 12:09:20 PM »
As you can see from the thread I posted Tim Willey has a lot of knowledge about Viewports.
Be sure to ask if you need further assistance.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Pan in two viewports at once?
« Reply #6 on: July 31, 2008, 01:15:42 PM »
Thanks for the kind words Alan.

This thread might help also.  It is one to draw a guide of the viewport in model space.
[ http://www.theswamp.org/index.php?topic=9461.0 ]
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Crank

  • Water Moccasin
  • Posts: 1503
Re: Pan in two viewports at once?
« Reply #7 on: July 31, 2008, 05:04:56 PM »
Look at: Express tools > VPsync.lsp
Vault Professional 2023     +     AEC Collection

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Pan in two viewports at once?
« Reply #8 on: July 31, 2008, 05:27:57 PM »
That won't do what he is after but it is very cool routine. 8-)

PS it did lead to this routine: [maybe that is what you intended]
aspace.lsp
ALIGNSPACE
Adjusts a viewport's zoom factor and panning position based on the alignment points specified in model space and paper space.
« Last Edit: July 31, 2008, 05:33:58 PM by CAB »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.