can't insert control, "too many shapes"

G

Gabe

Hi,

I'm a student using VISIO 2003 Professional.

I've been trying to find a way to launch a macro from a
button. A simple task, but Visio doesn't seem to be
capable of performing ANY simple task simply. It takes
hours of searching to usually find a KB article
explaining that Microsoft is aware of the problem, and
often has been for Visio 2000, 2002, 2003, and will
probably be aware of the problem in Visio "Longhorn".

For this problem, it appears that Visio cannot accomplish
it. I've tried adding button-shaped shapes with double
click options, but that is not viable on a large drawing.

As for "Insert Microsoft Forms Command Button", see
KB826411. I especially like the line:
"This problem occurs because Visio is not a supported
container for the Visio Drawing Control."

And what about VISIO error 1441. Not even microsoft
knows what that means!

This kind of problem is very common in VISIO. It happens
when you want to accomplish even the simplest tasks. I
spend hours searching the knowledge base and newsgroups
only to find yet another KB article stating that a touted
feature does not work, or that even the most basic of
tasks such as replacing a square with a circle requires
the writing of a custom macro. I have written VISIO
macros to change a shapes color, to replace one kind of
shape with another, to drop a custom shape on the
drawing, along with EXCEL macros to condition numerical
fields that VISIO imports incorrectly (this is a problem
with EXCEL, but MS is aware of it!), etc. and ad-nauseum,
all because VISIO can't do ANY OF IT itself. And now a
VISIO bug makes even a custom VBA solution impractical.

This situation is critical.

If I have to spend all this time writing custom code in
order for VISIO to perform EXTREMELY basic tasks, I don't
see why I would not be better off writing custom code in
an alternate package like StarOffice. Am I wrong here?

Gabe
 
D

David Parker

You could, of course, have SmartTags to launch macros, in addition to
double-click, right-mouse menus or inserted Command Buttons.

You can also start macros from your own custom menus, and your macro code
can be stored in a stencil, rather than your drawing document, in order to
centralise them.

I have been programming Visio with VBA since it's introduction in version
4.5, and have found it quite capable, and found the richness of the Visio
object model extremely rewarding.

I have found the inability to replace shapes on the fly frustrating, but
this is because of the potential complexity of the shapes, but there are
alternaives Look at the Basic Flowchart shape "Flowchart shapes" to se how
you can change the shape dynamically (use the right mouse menu). This
requires a little foresight, but the pinciple means that you can build your
own muli-facted shapes fairly simply.

So, if you are not satisfied with the flexibility that Visio provides, try
finding the same capabilities elsewhere.
 
G

Gabe

Yes, of course. Or I could just launch the macros from
the tools/macros menu. Which is NOT the problem. As for
the option of inserted Command Buttons, THAT IS the
problem. As stated in the original post, see "Microsoft
Knowledge Base Article - 826411" which is titled "You
Receive Error Messages When You Try to Insert a Visio
Drawing Control in a Visio 2003 Document".

Of course, this KB mentions the symptom "An error (1440)
occurred during the action Insert Control.", while
whenever I try to insert ANY control, I get the
message "An error(1441) occurred during the action Insert
Control. Visio cannot insert a new control because this
file contains too many shapes, pages, or masters." I
have about 300 shapes, with the most complex shape
consisting of a circle placed at the center of two
crossed lines (the circle and lines are grouped). See
the post from AndrewLLL regarding this problem. Search
microsoft, MSDN, KB-Alertz, and all the other Visio
newsgroups and you will find that nobody knows what this
error is.

Now, when you write something like this:
So, if you are not satisfied with the flexibility that Visio provides, try
finding the same capabilities elsewhere.

you are missing the whole point. I am trying to get
these supposed capabilities and flexibility to actually
WORK! So when you suggest I try to find the same
capabilities elsewhere, my question is: WHAT
capabilities? VISIO does not have these capabilities
until I create them, and that is only when I can find a
workaround to problems like error(1440). Now, there is
an error(1441) problem with NO solution.

In short, you seem to be saying that VISIO is chock full
of capabilities, as long as I don't try to use any of
them.

I have a lot of time invested in VISIO, but if it just
DOES NOT work, what other choice do I have other than
to "try finding the same capabilities elsewhere."

Once again, am I wrong here?
-----Original Message-----
You could, of course, have SmartTags to launch macros, in addition to
double-click, right-mouse menus or inserted Command Buttons.

You can also start macros from your own custom menus, and your macro code
can be stored in a stencil, rather than your drawing document, in order to
centralise them.

I have been programming Visio with VBA since it's introduction in version
4.5, and have found it quite capable, and found the richness of the Visio
object model extremely rewarding.

I have found the inability to replace shapes on the fly frustrating, but
this is because of the potential complexity of the shapes, but there are
alternaives Look at the Basic Flowchart
shape "Flowchart shapes" to se how
 
D

David Parker

I didn't mean to offend, just suggest that there may be other ways to solve
your problem (eg Smart Tags).

I too have issues with Visio not working as advertised. For example, metric
CAD files in Visio have become impossible to scale correctly in the last two
versions, but I persist, and find work-arounds.

I encourage you to complain if something doesn't work, but in my experience,
it doesn't get fixed quickly (I have reported the CAD problem several times,
and even demonstrated it to the head of Visio product team).

Eventually I might get fed up complaining, but until then I try my best to
get the desired result.
 
M

Mai-lan [MS]

Hi, Gabe: I'm sorry you're having a hard time finding the information that
you need.

Per KB826411, you can't insert a Visio drawing control into a Visio document
because the control will not run in the the Visio application as a host
application. The reason for this is that the Visio control itself is based
on the Visio application -- the control is essentially a wrapper for the
main Visio type library, with a few extra control-specific properties.
Embedding the control into a Visio document would basically be like
embedding the Visio app in itself, which would make it really hard to
program against (for example, which Application object is active?).

Have you checked out the Visio SDK on MSDN? I would recommend that for
anyone building solutions in Visio. Dropping shapes, changing shape color,
working with click events and keyboard events, and integration with other
Office applications and hosting containers are covered in the code samples.
If that still does not answer your specific questions, please post your
question and your sample code on the newsgroup and we'll try and help out.

Thanks,
Mai-lan
Visio, Microsoft Corp.
 

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