A
Agis
I'm trying to create UML class diagrams in Visio through automation. I use a
function that expects the name of a parent and child class. This function
then tries to create the classes like this:
loParent = Page.Shapes(tcParentName)
If this does not result in a error, loParent hold the existing Parent class
in the UML diagram. If an error occurs the Parent doesn't exist and is
created. This works fine, but I expect there is a cleaner method, something
like FindShape but I haven't found it, can anyone tell me?
After I created the classes and the Generalization between them, I'd like to
add Attributes and Operations. I haven't found out how that is done. I can
get the shapes with code like this:
loAttributes = loParent.Shapes('Attributes')
And if Attributes are added in Visio, I can see them in:
loAttributes.Characters.Text
but I can't set them. I tried setting the Text property to a string I build,
but that results in an error: "Required operation is presently disabled."
function that expects the name of a parent and child class. This function
then tries to create the classes like this:
loParent = Page.Shapes(tcParentName)
If this does not result in a error, loParent hold the existing Parent class
in the UML diagram. If an error occurs the Parent doesn't exist and is
created. This works fine, but I expect there is a cleaner method, something
like FindShape but I haven't found it, can anyone tell me?
After I created the classes and the Generalization between them, I'd like to
add Attributes and Operations. I haven't found out how that is done. I can
get the shapes with code like this:
loAttributes = loParent.Shapes('Attributes')
And if Attributes are added in Visio, I can see them in:
loAttributes.Characters.Text
but I can't set them. I tried setting the Text property to a string I build,
but that results in an error: "Required operation is presently disabled."