R
rdanielwells
I am trying to detect when a document has been created using the sam
method as the TutorialAddin Project of the Lesson 2 of the Visio SDK.
The project uses the function:
Code
-------------------
Private Function IsManagedTutorialTemplate( _
ByVal currentDocument As Document) As Boolean
If CBool(currentDocument.DocumentSheet.SectionExists( _
CShort(VisSectionIndices.visSectionUser), 0)) _
Then
If CBool(currentDocument.DocumentSheet.CellExistsU( _
TEMPLATE_USER_CELL, 0)) Then
MsgBox("cell exists")
Return True
Else
MsgBox("cell doesn't exist")
End If
Else
MsgBox("section doesn't exist")
End If
Return False
End Functio
-------------------
where TEMPLATE_USER_CELL is the const string "User.IsManagedTutorial".
This seems to work perfectly for the example, however when I change thi
string to "User.MyApplication" and add the same named property to th
"User-Defined Cells" section of the document shapesheet for m
template, this function no longer detects the cell.
I believe I may be adding this cell to the wrong section? as I canno
find any property named "User.IsManagedTutorial" in the documen
shapesheet for the Managed Tutorial template file (or any new documen
created with the template) that comes with the lesson 2 project.
Does anyone know where the User.IsManagedTutorial cell is placed in th
example?
Thanks in Advanc
method as the TutorialAddin Project of the Lesson 2 of the Visio SDK.
The project uses the function:
Code
-------------------
Private Function IsManagedTutorialTemplate( _
ByVal currentDocument As Document) As Boolean
If CBool(currentDocument.DocumentSheet.SectionExists( _
CShort(VisSectionIndices.visSectionUser), 0)) _
Then
If CBool(currentDocument.DocumentSheet.CellExistsU( _
TEMPLATE_USER_CELL, 0)) Then
MsgBox("cell exists")
Return True
Else
MsgBox("cell doesn't exist")
End If
Else
MsgBox("section doesn't exist")
End If
Return False
End Functio
-------------------
where TEMPLATE_USER_CELL is the const string "User.IsManagedTutorial".
This seems to work perfectly for the example, however when I change thi
string to "User.MyApplication" and add the same named property to th
"User-Defined Cells" section of the document shapesheet for m
template, this function no longer detects the cell.
I believe I may be adding this cell to the wrong section? as I canno
find any property named "User.IsManagedTutorial" in the documen
shapesheet for the Managed Tutorial template file (or any new documen
created with the template) that comes with the lesson 2 project.
Does anyone know where the User.IsManagedTutorial cell is placed in th
example?
Thanks in Advanc