Programmatically Get/Set Shape properties (Label 1, 2, 3, 4)

R

RayR

I'm new to Visio and C#, and am trying to create an application that uses a
drawingControl to allow users to drop pre-defined shapes from a stencil onto
their drawing. The problem is that by default, the shapes I am using from
the stencil (Space, "L" Space, and "T" Space in "Wall, Shell, and Structure")
have labels set that display the space use, name, and calculated area in
labels 1, 2, and 3. (Right click on shape, go to Set Display Options, hit
the "Spaces" tab, and there are 4 "Label" dropdowns.)

I tried setting these all to "*Disabled*" before saving my stencil, but that
did not work. And even if it had, that would only solve half of my problem.

What I would like to do is remove the content of any labels that the shape
has when it is dropped into the drawing, and then set labels based on certain
events triggered by user actions. How can I get/set these properties? I've
been looking all over the place trying to figure it out. I can't seem to
find any leads. Is this even possible to do through C#?
 
J

JuneTheSecond

Basically it would be possible, because on the Drawing Control in my program
in Visual Basic .Net 2003, "*Disabled*" is kept and all labels are hidden,
when i reopen the drawing with the same program.
 
M

Michel LAPLANE

If you look at the shapesheet of a space you can see user cells that command
the display of name, use, .... I suggest you to modify the IF statement with
a supplementary condition that can be modify by your program.
 

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