J
joevisio
Hi,
I have a Visio page that contains many masters and many shapes wit
those masters.
I know to how to obtain master into but do not know how to obtain shap
info by ID.
My questions are:
1. How to obtain shape info by ID or NameID
2. Hoe to set formula reference by ID, (would like to se
Formula("begin") = 1 for shape with ID = 500)
I have some example code for obtaining masters information, but I nee
to also get information by ID for all the shapes in the page. An
modify the formula reference by ID or NameID.
Dim intMasterCount As Integer
Dim vsoApplication As Visio.Application
Dim vsoCurrentDocument As Visio.Document
Dim vsoMasters As Visio.Masters
Dim vsoShape As Visio.Shape
Set vsoApplication = GetObject(, "visio.application")
If vsoApplication Is Nothing Then
MsgBox "Microsoft Office Visio is not loaded"
Exit Sub
End If
Set vsoCurrentDocument = vsoApplication.ActiveDocument
If vsoCurrentDocument Is Nothing Then
MsgBox "No stencil is loaded"
Exit Sub
End If
Set vsoMasters = vsoCurrentDocument.Masters
Debug.Print "Masters in document : "; vsoCurrentDocument.Name
intMasterCount = vsoMasters.Count
If intMasterCount > 0 Then
For intCounter = 1 To intMasterCount
Debug.Print " "; vsoMasters.Item(intCounter).Name
Next intCounter
Else
Debug.Print " No masters in document"
End If
Thank
Jo
I have a Visio page that contains many masters and many shapes wit
those masters.
I know to how to obtain master into but do not know how to obtain shap
info by ID.
My questions are:
1. How to obtain shape info by ID or NameID
2. Hoe to set formula reference by ID, (would like to se
Formula("begin") = 1 for shape with ID = 500)
I have some example code for obtaining masters information, but I nee
to also get information by ID for all the shapes in the page. An
modify the formula reference by ID or NameID.
Dim intMasterCount As Integer
Dim vsoApplication As Visio.Application
Dim vsoCurrentDocument As Visio.Document
Dim vsoMasters As Visio.Masters
Dim vsoShape As Visio.Shape
Set vsoApplication = GetObject(, "visio.application")
If vsoApplication Is Nothing Then
MsgBox "Microsoft Office Visio is not loaded"
Exit Sub
End If
Set vsoCurrentDocument = vsoApplication.ActiveDocument
If vsoCurrentDocument Is Nothing Then
MsgBox "No stencil is loaded"
Exit Sub
End If
Set vsoMasters = vsoCurrentDocument.Masters
Debug.Print "Masters in document : "; vsoCurrentDocument.Name
intMasterCount = vsoMasters.Count
If intMasterCount > 0 Then
For intCounter = 1 To intMasterCount
Debug.Print " "; vsoMasters.Item(intCounter).Name
Next intCounter
Else
Debug.Print " No masters in document"
End If
Thank
Jo