Visio Guy

Visio Discussions => Visio Bugs (er...Issues) => Topic started by: MoridinTX on December 29, 2014, 12:33:03 AM

Title: When saving a Visio File, shapes with text linked to custom properties shows 0
Post by: MoridinTX on December 29, 2014, 12:33:03 AM
Hello,

New to Visio development.  I tried searching for an answer to my issue on here & via Google with no luck.  I hope I can explain my issue accurately.

I have created several shapes in Visio, each with custom data fields.  In each shape I insert a text field and link it to display data from the custom data fields.  I can edit the data in the fields and the text is updated as expected.  When I save the visio drawing. all the shapes display a 0 instead of the text in the data field.  When I look at the data in the custom fields, the data is still there.

Visio version: 2010 Professional 32 bit & 64 bit.
Windows 7 Pro: 64 bit.

Anyone seen this kind of behavior before?

Thanks for any assistance.
Title: Re: When saving a Visio File, shapes with text linked to custom properties shows 0
Post by: vojo on December 29, 2014, 04:10:17 AM
On visio 2003....never had that problem on 100s of drawings

You could try to use user cells and see if makes a difference
   (user.mytext = props.mytext  ===> insert user.mytext into shape view)

visio has been pretty good about view refreshes....but may want to try to manually refresh view after open
(if you want....can trigger on shape)
(actions.refresh = setf(getref(actions.refresh.checked), not(actions.refresh.checked))   )
(<user or prop cells> = formula + DEPENDSON(actions.refresh.checked)  )
(right click shape ==> click on actions.refresh          This will trigger the user or prop cell to be reevaluated)
(may not help....but just maybe forces the field insert to redo / update).

Guys with visio 2010 may be closer to the "action" and may have seen this
Title: Re: When saving a Visio File, shapes with text linked to custom properties shows 0
Post by: Thomas Winkel on December 29, 2014, 08:21:55 AM
I have this behavior only with new property that is initialized with Value= (No Formla).
This can be solved by entering some dummy value and directly remove it.
Afterwards the field is Value="" and everything works fine.

Can you upload a demonstration?
Title: Re: When saving a Visio File, shapes with text linked to custom properties shows 0
Post by: MoridinTX on December 29, 2014, 03:40:22 PM
@Thomas & vojo

Thanks for the quick response.  I am out of office but will try these suggestions when I get back.  I just did not know where to start.  I'll update this post with/if the solution that worked.
Title: Re: When saving a Visio File, shapes with text linked to custom properties shows 0
Post by: MoridinTX on December 29, 2014, 07:05:43 PM
Quote from: vojo on December 29, 2014, 04:10:17 AM
On visio 2003....never had that problem on 100s of drawings

You could try to use user cells and see if makes a difference
   (user.mytext = props.mytext  ===> insert user.mytext into shape view)

You are correct on the Visio 2003 part, I have never had an issue with this on the older Visio, just something new that has cropped up after switching to 2010.

- I did try inserting the field referencing the props
- I added the user section and redirected as you suggested above.
Neither approach worked.

I added the refresh function as you described.  Still does it.

I can't figure this one out....  I'm leaning towards it being a bug(feature)

Thanks for the suggestions!
Title: Re: When saving a Visio File, shapes with text linked to custom properties shows 0
Post by: MoridinTX on December 29, 2014, 07:08:01 PM
Quote from: Thomas Winkel on December 29, 2014, 08:21:55 AM
I have this behavior only with new property that is initialized with Value= (No Formla).
This can be solved by entering some dummy value and directly remove it.
Afterwards the field is Value="" and everything works fine.

Can you upload a demonstration?

Thomas, I just tried this as well.  I did find where the cell had a "No Formula" in it.  I changed it to ="". 

Still no luck here, everytime I save, it replaces the text with a 0. 

Thanks for the suggestion!