Author Topic: use case can't add text  (Read 7094 times)

0 Members and 1 Guest are viewing this topic.

civiccoupe

  • Jr. Member
  • **
  • Posts: 14
use case can't add text
« on: February 18, 2012, 10:21:53 AM »
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

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2891
    • Paul Herber's website
Re: use case can't add text
« Reply #1 on: February 18, 2012, 11:39:28 AM »
Is this the UML use case shape?
Electronic and Electrical engineering, business and software stencils and applications for Visio -

https://www.paulherber.co.uk/

civiccoupe

  • Jr. Member
  • **
  • Posts: 14
Re: use case can't add text
« Reply #2 on: February 18, 2012, 11:48:04 AM »
Yes Paul
- Use Case notation on UML use case Stencil

civiccoupe

  • Jr. Member
  • **
  • Posts: 14
Re: use case can't add text
« Reply #3 on: February 18, 2012, 12:46:59 PM »
can VB config it by code or either way?
pls help

civiccoupe

  • Jr. Member
  • **
  • Posts: 14
Re: use case can't add text
« Reply #4 on: February 19, 2012, 01:41:45 AM »
Finally i got it!!!
Example like this

Code
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.
« Last Edit: February 19, 2012, 01:43:22 AM by civiccoupe »

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2891
    • Paul Herber's website
Re: use case can't add text
« Reply #5 on: February 20, 2012, 08:54:08 AM »
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.
Electronic and Electrical engineering, business and software stencils and applications for Visio -

https://www.paulherber.co.uk/