Custom Properties - Some are blank - why? and what can I do?

Started by Vizzit, May 13, 2010, 07:01:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vizzit

I have inherited a visio drawn organisation chart. box shapes on the chart appear identical. The content is very simple just three bits of text - a position reference, job title and person name in the box. When I check custom properties on one box I see all the details in the custom properties fields - great I can export this to excel and it works a dream, yet when I try this on the second box, the custom properties are blank, the box on the drawn sheet has content just like the first and the two boxes appear identical although have different person names in them.
Anyone know if I can 'refresh' custom properties? that is collect the text that is in the shapes on the dawing into the custom properties field so that I can export it?
And how this has occured?

wapperdude

Check the entries in the shapesheet:  select a shape, menu bar>window>show shapesheet.

Scrow to the Shape Data section and check to see if there are "values" listed for the desired properties.  For example, Prop.Name should show the name seen in the shape on the drawing page.  If the necessary values are missing, try entering them manually.  This ought to correct the problem.

If the values are present, try running the export wizard, to, say, an Excel file.  See if the Excel file populates correctly.  If so, then try importing the data back in -- possibly to a new file.  That should clear up things.

If the Excel didn't populate, then, you may have to delete the bad shapes and replace with new ones.  I believe Paul Herber's Super Utilities will allow you to copy the shape data from one shape to another.  See http://www.pherber.com/index.php


HTH
Wapperdude
Visio 2019 Pro

Vizzit

Thanks for that Wapper.

perhaps I didnt explain it well enough

The Export works with all shapes, its when I viewed the export I noticed some data was missing - and its correct to be missing as the custom properties dont have the data.
The problem is that some of the custom properties for some shapes have some blank fields - yet the shapes on the drawing look OK the text is there - is it possible that the text in the shapes have been entered direct into the shapes on the drawing and not through the custom properties? or that the text is not on the same layer as the shape? visually the shapes that have text in custom properties look the same as the shapes that have omissions in custom properties

What I am trying to do is 'fix' those shapes so that the properties display the text, manually typing them into the dialogue boxes is a non starter as what I am trying to do is a smart swipe of  the data from the org charts (as theres tons of this stuff!) to save re-typing it manually into excel.

Thanks again

wapperdude

No.  We didn't totally miscommunicate. 

I understand that you see text in shape, but not in the shape data.  First I was trying to determine if the data was just missing from the form or was also missing from the shapesheet.  Sounds like it should be both.  Then, as a next step, (for one of the cells), try entering the missing data into the "value" field of the shapesheet.  That ought to re-populate the form & also become exportable.  But, for a large number of shapes that doesn't help too much.  Perhaps some code could automate this.

Entering the text by hand, should not create this problem. 

With regards to Paul's utilities, it was a quick attempt at an "Easy Button".

If the shape is a non-standard shape, then there are all kinds of possibilities:  different layers, text not assigned to any text fields, etc.  As a sanity check, you might copy one of the mis-behaving shapes, open the shape data form, enter data and verify that the shape populates correctly.  And exports.  That would tell you if the shape is OK or corrupt.

I'm not aware of any quick repair.  Again, you might be able to write some code that recursively goes thru the shapes, strips out the text, and then places it into the desired data fields.  But, that will be a bit of work.

Wapperdude
Visio 2019 Pro

Yacine

Vizzit,
your problem description sounds very familiar to me. Users, not knowing how to fill in the data in shapes, write them as text directly.
That overwrites the display formulas of your shapes.
To fix the problem:
1. Understand the display formula: select one of the "good" shapes, either go to "insert/field" and look  at the displayed formula, or open the shapesheet, go to the "text fields" section and copy the formula.
2. Select all the "bad" shapes and via menue/insert/field/custom insert the copied formula. That will fix all the bad shapes in a batch and overwrite the "dumb text" - that is very handy.
It may be clever to put in the right data in the wrong shapes, prior to resetting their display formulas, otherwise the data are lost.
If the last operation is too difficult due to a too large amount of shapes, then VBA is your last chance - ie read out the text, parse it for different fields, insert it in the shape's custom properties:
Quoteyou might be able to write some code that recursively goes thru the shapes, strips out the text, and then places it into the desired data fields
Moral of the story: protect the text of shapes that display data
Yacine