![]() |
|
#1
|
|||
|
|||
|
Hi all, I have been working for a while with MS Visio 2013 and created some shapes which has some data associated. For each data property in Visio 2013 there are some properties to set: Label, Name, Type, ... : Visio 2013.PNG BUT for Visio 2016 the Name field now is missing: Visio 2016.PNG My current code can find a property by using this code using VBA: Code:
Public Function GetCustomPropertyValue(currentShape As Visio.Shape, propertyName As String) As String
Dim iPropSect As Integer
Dim intResult As Integer
iPropSect = Visio.VisSectionIndices.visSectionProp
If currentShape.SectionExists(iPropSect, Visio.VisExistsFlags.visExistsAnywhere) <> 0 Then
Dim j As Integer
For j = 0 To currentShape.Section(iPropSect).Count - 1 Step 1
Dim vCell As Visio.Cell
Set vCell = currentShape.CellsSRC(iPropSect, j, Visio.VisCellIndices.visCustPropsValue)
intResult = StrComp(vCell.RowNameU, propertyName)
If intResult = 0 Then
'GetCustomPropertyValue = vCell.ResultStr("")
GetCustomPropertyValue = Replace(vCell.Formula, """", "")
End If
Next j
End If
End Function
Like: - Label: Some text here - Name: someText So now, I don't know if this is a bug from MS Visio or the Name field was removed and something happens behind the scene. Thank you in advance for your time! |
| Tags |
| name property, properties, shape data |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Visio 2016 New homemade Shape Data export with Network Shape Data | Karlderxte | Visio | 1 | 08-17-2021 04:04 PM |
Word 2016 cannot hide field codes in document created by work 2013
|
twinclouds | Word | 2 | 03-10-2017 03:15 PM |
| MS Visio 2013 vertically centre data in a shape after deleting all other data | Belachenko123 | Visio | 1 | 11-24-2015 09:42 AM |
| Excel 2013, Problem with a shared file, takes long time to load and save and loads missing data | PStark | Excel | 0 | 12-04-2014 07:52 AM |
| Use document property as condition in IF field? | ChrisBrewster | Word | 2 | 01-29-2014 10:35 AM |