Visio Guy

Solution-specific Visio Discussions => UML & Software Diagramming => Topic started by: civiccoupe on February 18, 2012, 03:21:53 PM

Title: use case can't add text
Post by: civiccoupe on February 18, 2012, 03:21:53 PM
Hi all,
I'm coding vb to call visio ; use case object but can't use like this

     vToShape.Text = "sample text"

(yes i know microsoft answer this problem in http://support.microsoft.com/kb/305343)
but it only config by manual
i want to config it by code or other way not a manual

Thank you
Title: Re: use case can't add text
Post by: Paul Herber on February 18, 2012, 04:39:28 PM
Is this the UML use case shape?
Title: Re: use case can't add text
Post by: civiccoupe on February 18, 2012, 04:48:04 PM
Yes Paul
- Use Case notation on UML use case Stencil
Title: Re: use case can't add text
Post by: civiccoupe on February 18, 2012, 05:46:59 PM
can VB config it by code or either way?
pls help
Title: Re: use case can't add text
Post by: civiccoupe on February 19, 2012, 06:41:45 AM
Finally i got it!!!
Example like this

Dim vToShape as visio.shape


vToShape.CellsU("lockTextEdit").FormulaU = "0"
vToShape.Text = "sample text"


Insert  vToShape.CellsU("lockTextEdit").FormulaU = "0" before text you want to add.
when config it, You can add/edit text in protected shape.
Title: Re: use case can't add text
Post by: Paul Herber on February 20, 2012, 01:54:08 PM
Well, that might work, however, not recommended. Besides the fact that the UML addon will want to overwrite your text at some time, that shape is actually a grouped shape and it's not the top level shape that shoud hold the text, it's the sub-shape Object that should hold the text.