Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-19-2022, 02:41 AM
Claudiu Claudiu is offline Define shape data property name field missing 2016 vs 2013 Windows 10 Define shape data property name field missing 2016 vs 2013 Office 2016
Novice
Define shape data property name field missing 2016 vs 2013
 
Join Date: May 2022
Posts: 3
Claudiu is on a distinguished road
Exclamation Define shape data property name field missing 2016 vs 2013

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
It is strange that the code is working fine with the names set in Visio 2013 and the Label and Name contains different string values.
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!
Reply With Quote
  #2  
Old 05-19-2022, 08:53 PM
Guessed's Avatar
Guessed Guessed is offline Define shape data property name field missing 2016 vs 2013 Windows 10 Define shape data property name field missing 2016 vs 2013 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

The Name field would still exist in the ShapeSheet but it looks like the GUI creates it in the background according the initial value put into the Label field. This was probably an active decision made by Microsoft to 'reduce' confusion with users.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply

Tags
name property, properties, shape data

Thread Tools
Display Modes


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
Define shape data property name field missing 2016 vs 2013 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

Other Forums: Access Forums

All times are GMT -7. The time now is 02:06 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft