change origin point of background sheet?

Started by perry59, August 03, 2015, 08:12:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

perry59

I asked a similar, but different, question awhile back ;)
I often need to make LARGE wiring diagrams, i.e. 2' wide by 5' tall. At some point I have to chop those up into smaller diagrams for publishing purposes (17x11).
It would be great if visio had a feature that autocad has. That would be a "model" tab where one could create a diagram of any size, then "sheet" tabs where a viewport can be defined that views a specific portion of the model tab. Then, any changes in the model are automatically reflected in the sheets which are published. Sadly, visio does not have this much needed functionality.
I am still trying to figure out a work-around for this.
I could make a background page that has the huge diagram on it, but that does not really give the desired results, partly because the X-Y origin of other sheets can not be altered as far as I know. For example, if sheet #2 could have its XY origin at 0,20 and sheet #3's origin at 0,40 and so on, perhaps the huge background sheet idea would work (provided I "block out" the unwanted portions of the background on each sheet that references it)
I hope I explained this in such a way as to make sense!
so my question is, is it impossible to change the XY origin of a vision sheet (within the document)?
I attached a picture which may make it easier to visualize what I'm after.
Thanks
what, me worry?

perry59

I guess that's a no-go. Bummer, visio could really use the "viewport" functionality that autocad has.
what, me worry?

Hey Ken

Perry:

   So I was out camping over the weekend, and while lying in my sleeping bag on a cool Sunday morning with the sun shining on my face, birds chirping, hands folded behind my head, thinking about your situation (yeah, I'm like that) and I came up with a suggestion that might help. 

   The heart of the solution is to use VBA to say what part of your drawing gets displayed on the screen, specifically, ActiveWindow.SetViewRect.  It lets you set the top left coordinates, height and width of what gets displayed.

   Here's how I'd do it: let's say that you have six parts of your humongous drawing.  Put it all on one page (not a background) and put six buttons (or any other shape) at the top (or anywhere) on the page.  In their EventDblClick shapesheet cell, put =RUNMACRO("One"), =RUNMACRO("Two"), etc. respectively.  When you double click those buttons, they'll execute their respective macros, each of which will do the appropriate SetViewRect to display View One, View Two, etc.  You could also add a reset button which will take them back to the full view, or better yet, just have a note saying, "To return to full view, press ctrl-shift-W."

   Wasn't too difficult to put together an example (attached).  Here's the code behind it:


Sub One()
ActiveWindow.SetViewRect 1.8, 10, 2.5, 1
End Sub

Sub Two()
ActiveWindow.SetViewRect 4.75, 10, 2.5, 1
End Sub

Sub Three()
ActiveWindow.SetViewRect 1.8, 7, 2.5, 1
End Sub

Sub Four()
ActiveWindow.SetViewRect 4.75, 7, 2.5, 1
End Sub

Sub Five()
ActiveWindow.SetViewRect 1.8, 4, 2.5, 1
End Sub

Sub Six()
ActiveWindow.SetViewRect 4.75, 4, 2.5, 1
End Sub


   Or you could get clever and just code one macro and pass it the proper parameters to show each part.  Even more clever, you can use mouse's button down and button up events to get the coordinates of the bounding box around any part of the drawing, then zoom in on it.  Hey, when you're lying on your back on a sunny Sunday morning in the middle of the forest, anything seems possible!

   Hope this helps,

   - Ken

Ken V. Krawchuk
Author
No Dogs on Mars - A Starship Story
http://astarshipstory.com

perry59

Hey Ken!
appreciate the effort but it looks like what I need simply is not possible with visio, too bad, it would be awesome to have.
those macro's just zoom into an area of the current sheet.
I need several sheets in my document (page 1, page 2, etc.) (with borders/titleblocks) each of which show just a portion of another sheet which is far to large to print by itself.

Thanks
what, me worry?