Shapesheet of a Shape in background has variables referenced to the foreground

Started by nashashmi, May 03, 2010, 03:00:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nashashmi

Hey guys,

I am having trouble with a particular task.  I have a north arrow in a drawing that is to appear at the same spot in each page.  But the north arrow is not going to have the same angle on each page.  I want to make that north arrow part of the background.  And then based on a user defined cell in the foreground page, the arrow will change angle.  Very much like how the page number works on each page when it is made part of the background.

How do I go about doing this?  All attempts at referencing the foreground page shapesheet cell at the background shape have failed.

Visio Guy

Hi Nashashmi,

You can reference a foreground page from a background page in the ShapeSheet, but I see a problem with your scenario:

You will have multiple pages that use the North-arrow-background-page. How will you North arrow know which foreground page to respect? And if you have multiple windows open on the same document, you could select multiple foreground pages, all with the same background page. In this case, the angle at which the North Arrow should be oriented is undefined.

So there is no way to do something like Angle = TheCurrentForegroundPage!....

Otherwise, cross-sheet reference from page to page look like this, for example:

PinX = Pages[Page-1]!Sheet.1!PinX
Width = Pages[Page-1]!ThePage!PageWidth

"Page-1" is the actual name of a page in the document. There are no quotes inside the brackets, oddly.

For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

nashashmi

Thanks for the reply.  The method you mentioned references a specific page value back to the shape in the background page.  I was hoping for that specific page to be more of a dynamic variable like "currentpage", e.g. the background is customized to whatever foreground  the background at the moment.

A similar example is inserting a text object containing a field value that points to the page number.  When this object is made part of the background, and other foreground pages use that background, the text will display the page number of the page being viewed.

You said that it is not possible to do currentpage, do you think it might be possible to do this using a custom VBA function like pageangle()?

Yacine

Why so complicated Nashashmi?
Define your arrow to be always on the same position of the page and save it as stencil.
Then drag on each of your foreground pages.

To do so, open the shapesheet of the arrow, set it's pinX and pinY values to fix values. eg:
guard(thepage.pagewidth-20mm) or guard(50 mm).
Yacine

nashashmi

Thanks...  simplicity is a skill often forgotten I guess... or maybe its just the enthusiast inside me.

I guess that is what I will do.  But I always try to think of a way to use a lightweight method that is highly scalable and repetitious.  Like making a template with a north arrow for field card sketches that can be simply put in the background of all cards.  This makes them easily editable.  On the other hand, using a stencil, though it is repetitive and scalable, makes it somewhat difficult to edit scalably and harmlessly.

Thanks for the suggestion.

Visio Guy

I understand why nashashmi asked the question - Visio shows some of this capability by allowing background pages to show *some* foreground page info. The classic example is to insert PageNumber on a background page. This will show a different number for every foreground page...very similar the question N. asked.

I have often wondered if there would be a way to "trick" Visio into giving us more info like this...
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

wapperdude

Well, as long as you don't display the page info, you might be able to use the page number as a dummy variable, and use that to control the angle.  That's one variable thought might become an accessible, insert field parameter.

Just a thought.

But I'm tired, zig-zag connector zapped my energy.

Wapperdude
Visio 2019 Pro

Yacine

A small test showed that:
1) the angle of a background page shape changes only for the value on background page itself. It is not updated.
2) I named my foreground pages with letters from windings 3, which provides arrows in several directions and put on the background page a shape with pagename() as text. That worked fine, showing arrows in different directions. You could search or write your own font with more arrow directions than the given 45deg steps.http://fontforge.sourceforge.net/.
3) manipulations on the page name to make it more readable discards the update of the foreground display. So if you have more than 1 page with a given angle, you need a different letter showing the same angle. AND you need to remember the character for a given angle, unless you have some smart behaviour on the page (which makes it even more complicated).

Puhhh... stay with the droped shape on the foreground page. ;)
Yacine

Visio Guy

Ok, using WingDings in the font to trick the background/foreground page fields is pretty clever!

I nominate Yacine for the Golden Hack of the Week award!
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Yacine

Not an award, but I'll ask Wayne to add a stroke on my ideas chart.  ;D

I appreciate so much that you nominated me, especially after having wanted to "borrow" your bike.  ;D ;D ;D
Yacine

wapperdude

Sorry Yacine, can't do it.    :-\

...you're only allowed one / year, and you've already used up this year's quota.   ::)

...unless you want to give the bike back... :o

Wapperdude
Visio 2019 Pro

Yacine

Yacine

Yacine

One more thing Nashashmi, to defend my shape on the foreground approach and to relief your fears regarding the scalability.
As long as you don't modify the droped arrows, you just need to modify the arrow *master* to update it on all your foreground pages. That's not harder than modifiying it on the background page.
Yacine

Yacine

Yacine

nashashmi

Thanks, but I realized something.  All I am doing is putting the north arrow on every page and adjusting its angle programmatically.  I dont really need a stencil for this. and I dont need a shapesheet to change its angle.  I think I will just create multiple backgrounds each having an arrow at a different angle and make all those backgrounds have a single background which will have the grid sketch on it.  Visio  apparently isn't a good techie CAD program like AutoCAD is.

Regardless, I noticed you guys need sleep.  thanks for your help.