If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Sort Shape Layer Names
I have over 30 layers in a large diagram. When I select the menu item
ViewLayer Properties, I can sort the layer names into ascending or descending sequence by clicking the "Name" button. When I right-click a shape and select FormatLayer, the layer names on the Layer dialog window are not displayed in alphabetic order. How can I sort the layer names on the Layer dialog window? |
#2
|
|||
|
|||
Sort Shape Layer Names
This is an update to my original question... I recorded a macro to see what
Visio does when a new layer is assigned to a shape. The results we Sub OpenShapeLayerDialog() ' ' Open the Layer dialog window for the select shape. ' ' Keyboard Shortcut: Ctrl+Shift+K ' Dim UndoScopeID1 As Long UndoScopeID1 = Application.BeginUndoScope("Layer") Application.ActiveWindow.Page.Shapes.ItemFromID(46 ).CellsSRC(visSectionObject, visRowLayerMem, visLayerMember).FormulaU = """0;1;2;62""" Application.EndUndoScope UndoScopeID1, True End Sub The numbers 0, 1, 2, and 62 are indexes, beginning with zero, into the layer name list that's displayed on the Layer dialog window. It's not an index into the sorted list that's shown on the ViewLayer Properties window. So if the list is sorted, it has to be able to determine what the index number is supposed to be. I'm not much of a VBA programmer, so I can't provide much more info than this. It may be that I'll have to write my own dialog window. Or it could be an enhancement to Visio! :-) -- Keith |
Thread Tools | |
Display Modes | |
|
|