Author Topic: inserting a new page  (Read 7500 times)

0 Members and 1 Guest are viewing this topic.

nayone

  • Newbie
  • *
  • Posts: 3
inserting a new page
« on: June 03, 2008, 03:52:46 AM »
Hi there

All I want to do is to create a template file for flow mapping so I have made a page but every time I insert a new page & copy the content of the 1st page over I lose all my setting on the layers.

what I mean -
I have a number of buttons whose function is to hide or show the layers and in the shape sheet I have the following code to do this
under actions> Action.row_1 as action>
=SETF(GetRef(ThePage!Layers.Visible[4]),NOT(ThePage!Layers.Visible[4]))
& Menu >
=IF(ThePage!Layers.Visible[4],"Hide Level One","Show Level One")

this gets reset to
=SETF(REF(),NOT(REF()))
&
=IF(REF(),"Hide Level One","Show Level One")

The smart tags seem to stay ok but also the order of the layers under > format > layer
also seem to change

any pointers as I can go in and manually change each one but think there should be something a bit smarter

thx

Alex

Lars-Erik

  • Sr. Member
  • ****
  • Posts: 278
Re: inserting a new page
« Reply #1 on: June 03, 2008, 03:55:49 AM »
If i recall, we had another problem similar to this.
Try different ways of copying, control + C copying and dragging holding shift give different results.

nayone

  • Newbie
  • *
  • Posts: 3
Re: inserting a new page
« Reply #2 on: June 03, 2008, 04:47:50 AM »
yup was using ctrl a - ctrl c - ctrl v

tried the menu to do the same with the same results

least its consistantly wrong I suppose  :D

Lars-Erik

  • Sr. Member
  • ****
  • Posts: 278
Re: inserting a new page
« Reply #3 on: June 03, 2008, 05:00:07 AM »
Try giving the cells:

=Guard( Your formula )

See if that makes them hold there value

- Lars

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1735
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: inserting a new page
« Reply #4 on: June 03, 2008, 08:38:47 AM »
I don't think that the order of layers isn't guaranteed on copy-paste. Your formulas refer to the layers by index (ie: '[4]'), and these will be off if the order of your layers changes.

I wonder if you assigned a dummy shape to all the layers on one page (in a certain order even?) then copied that shape to a new page first, if it would help?
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

nayone

  • Newbie
  • *
  • Posts: 3
Re: inserting a new page
« Reply #5 on: June 03, 2008, 11:19:56 AM »
tried to guard it & that didn't work

also tried your suggestion of making sure that there were correctly referenced layers to copy over & still comes out jumbled

can you refer in layer name rather than order.?

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1735
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: inserting a new page
« Reply #6 on: June 03, 2008, 04:24:05 PM »
Hi nayone,

You can shield the references inside of quote marks, so they won't get REF'd when you copy and paste. It looks like this:

= SETF("ThePage!Layers.Visible",NOT("ThePage!Layers.Visible"))
= SETF("ThePage!Layers.Visible[2]",NOT("ThePage!Layers.Visible[2]"))

You'll notice that the GETREF is gone, and the cell reference is inside of quotes. Visio first tries to evaluate strings as something it understands (ie: numbers, formulas, etc.) If it doesn't understand, then it just leaves it as a string. You can use this to your advantage in this case.

Note: if your layers get re-created in a different order, your formulas will toggle the wrong layers.

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