Using the UML stencil, how do I assign values to the UML shapes

S

Shawn

Hi All,

I am currently waiting for the Visio 2002 Developer's Survival Pack to
arrive. However, I need to demo the capabilities of VISIO before further
development can occur. I am using Visual basic and I am able to add UML
shapes to the document, but I cannot figure out how to change the stereotype
or add attributes to a shape like the class shape. If someone knows how it
would be deeply appreciated if a sample can be sent or posted.

Thanks

Shawn
 
D

Daniel Moser

Hi Shawn

I don't think that this will be possible. I've also tried that once, and
finally had to create my own UML Shapes because there was no access to
e.g. attributes. This is because this solution is realized by an add-in.

Daniel
 
S

Shawn

Thanks for the info. I have also been searching thte web and have not found
a solution. However, since you have had experience with this, I was
wondering if you can provide me with any information on the problems you
faced?

Thanks

Shawn
 
D

Daniel Moser

Well, the problem is that the built-in solutions of visio (I only know
the UML-Solution though) use internal datastructures for storing
attributes and other information. These datastructures can't be accessed
by VBA or in my case Delphi. So there is no way to add an attribute to a
UML Class other than doing it with the dialog in Visio.

So what I tried then is to manually update the text in the attribute
field of a UML-Shape. After removing several locks/protections, this was
even possible. But of course this attribute is not stored in the
internal datastructure, and next time you start the attribute-dialog,
the newly added text in the attribute field is removed.

The only way for me was to build my own (reduced, because I only needed
a very small part of it) UML-Solution -> to do that, you can mostly copy
the shapes from the original UML-Solution and modify them.

any more questions?

Daniel
 
K

Ken

This is too bad - but isn't this possible with Rows and Cells?
If so, what localeIndependentCellName string can I use

Or can I use a Section??

----- Daniel Moser wrote: ----

Well, the problem is that the built-in solutions of visio (I only know
the UML-Solution though) use internal datastructures for storing
attributes and other information. These datastructures can't be accessed
by VBA or in my case Delphi. So there is no way to add an attribute to a
UML Class other than doing it with the dialog in Visio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top