How do I set up a Shape Data Set with fields with formulas?

Started by chelmite, August 17, 2018, 01:19:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

chelmite

I want to define my shape data once, including formulas for some of the fields, and then copy to specific shapes on the page.
One of 2 things happens now...
Either the formula ends up a string, which is not evaluated on the target shapes,
or the formula is evaluated and the value ends up in the target shapes' fields.

Visio 2016 Pro.

Surrogate

IMHO, it is  not forum on telepathy  :)
We need more details!

wapperdude

@Surrogate:  are you sure?  You seemed to have read my thoughts pretty accurately!   :o  ;D  ;D
Visio 2019 Pro

chelmite

Sorry for not having enough detail...

I have a formula, =TheDoc!User.WireTypes, that I am trying to use as a the value in a Shape Data Set:
I want:

  • Document User.WireTypes="Cable;Camera;Double Smurf;Internet;Security;Telephone"
  • Document User.CableColors="rgb(192,0,0); rgb(245,157,86); rgb(98,205,242); rgb(0,112,192); rgb(224,0,0); rgb(0,0,0)"

  • Click on Developer/Show ShapeSheet for Document
  • Under User-Defined Cells,
  • Set User.WireTypes="Cable;Camera;Double Smurf;Internet;Security;Telephone"
  • Set User.CableColors="rgb(192,0,0); rgb(245,157,86); rgb(98,205,242); rgb(0,112,192); rgb(224,0,0); rgb(0,0,0)

I want ShapeData, WireType, for certain Connectors. When I create a connector, I edit its ShapeSheet:

  • Under Shape Data:
     

       
    • Prop.WireType:

      •    
      • Format=TheDoc!User.WireTypes
      • Value=INDEX(1,Prop.WireType.Format)
       
    • under Line Format

      •    
      • LineColor=THEMEGUARD(INDEX(LOOKUP(Prop.WireType,Prop.WireType.Format),TheDoc!User.CableColors))
       
    The connector acts as I want. I can change the connector's WireType in the Shape Data window, and the connector's color changes appropriately.

    The problem is that I don't want to have to edit each Connector's ShapeSheet separately. I should be able to copy the Shape Data from one Connector to others. However, if I copy the Connector, with ctrl-d or ctrl-left-click-drag, the copied Connector has altered Shape Data fields.

    • User.WireType.Format="=TheDoc!User.WireTypes;=THEMEGUARD(INDEX(LOOKUP(Prop.WireType,Prop.WireType.Format),TheDoc!User.CableColors))"
    • LineColor=RGB(0,112,192)
    instead of what I set those fields to in the original Connector.
    If I try to use Shape Data Sets:

    • Right click on Shape Data window
    • Select Shape Data Sets
    • Select a Shape Data Set (In my case, I called it WireTypes.)
    • Select an existing or create a new shape data set
    • Click Define

      •  
      • Create a property

        •    
        • Label=WireTypes
        • Name=WireTypes
        • Type=Number
        • Format=Fraction w/ Units
        • Value=TheDoc!User.WireTypes
         
       
    • Then select a Connector
    • Select "Apply checked shape data sets to: Shapes selected in drawing"
    Instead of the selected Connector shapes' Shape Data WireType being a selector for "Camera","Internet", etc, the WireType field in the Shape Data has the value =THEMEGUARD(INDEX(LOOKUP(Prop.WireType,Prop.WireType.Format),TheDoc!User.CableColors))

Yacine

Your explanation is confusing, please find nevertheless enclosed a drawing with the connector - capable of being copied.
Cheers,
Y.
Yacine

wapperdude

@Yacine:  you do very well when you're confused.   ???   ;)
Visio 2019 Pro

Yacine

Yacine

chelmite

Never mind...

I made a copy for you, tested it, and it works the way it's supposed to. I have no idea what's different, why it's working now, and wasn't before.

Yacine

Yacine