Author Topic: Viewport following other viewport  (Read 1933 times)

0 Members and 1 Guest are viewing this topic.

Jeroen

  • Newt
  • Posts: 21
  • BricsCAD & AutoLisp
Viewport following other viewport
« on: November 28, 2012, 08:00:31 AM »
Would it be possible in AutoLisp/VisualLisp to create a routine which controls a viewport-follow in modelspace?
Let me explain:
The main viewport shows the complete drawing. A smaller viewport on top, shows the gird-numbers of this drawing. When I zoom in on the main viewport, the viewscale and position of the top-viewport changes and shows the grid-numbers of the drawing. When I pan, the top-viewport also pans. I want to use this to keep track of my position in a drawing when I zoom in in the main viewport and the gridnumbers are out of screen. They stay visible in the top viewport. (see attatchment for an example)
My guess, if it is possible, it has to be done with reactors, but I would like to know your thoughts...
I am open for suggestions and tips.
Jeroen

Tharwat

  • Swamp Rat
  • Posts: 710
  • Hypersensitive
Re: Viewport following other viewport
« Reply #1 on: November 28, 2012, 08:15:39 AM »
maybe the command call if you have the  Express tools installed vpsync

Jeroen

  • Newt
  • Posts: 21
  • BricsCAD & AutoLisp
Re: Viewport following other viewport
« Reply #2 on: November 28, 2012, 08:25:55 AM »
VPSYNC and ALIGNSPACE are helpfull, but they only work in paperspace...
Jeroen

RolandOrzabal

  • Newt
  • Posts: 86
  • "memories fade but the scars still linger"
Re: Viewport following other viewport
« Reply #3 on: November 29, 2012, 02:25:31 AM »
"memories fade but the scars still linger"

Jeroen

  • Newt
  • Posts: 21
  • BricsCAD & AutoLisp
Re: Viewport following other viewport
« Reply #4 on: November 29, 2012, 02:56:50 AM »
Could it be that simple?
I am going to experiment with this. Thanks nod684 & tarwat.
Jeroen

RolandOrzabal

  • Newt
  • Posts: 86
  • "memories fade but the scars still linger"
Re: Viewport following other viewport
« Reply #5 on: November 29, 2012, 03:28:20 AM »
Thanks to Mircea for helping me on this :)
"memories fade but the scars still linger"

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Viewport following other viewport
« Reply #6 on: November 29, 2012, 04:18:28 PM »
I don't think it will be that easy but close. The problem as I see it is that your focus (zoom center) in the top viewport is the horizontal center of the bubbles
and not the center of the viewport.

This code may be of some use to your as well:
http://www.theswamp.org/index.php?topic=18143.msg258985#msg258985
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.

Jeroen

  • Newt
  • Posts: 21
  • BricsCAD & AutoLisp
Re: Viewport following other viewport
« Reply #7 on: December 14, 2012, 07:18:48 AM »
I tried to figure out the zoom-factor, but no result yet. Panning is 'easy'.
Jeroen