Problem with the Visio Modeling Engine

S

Scot A. Becker

Hi All,



Has anyone gotten the Visio Modeling Engine to work as an Add-In to Visio?



If so, have you gotten methods that create/delete elements (e.g. ot =
model.createobject() ) to work? When I try this within my add-in, it hangs.
However, if I write similar code in VBA and execute it (i.e. within Visio)
it all works fine.



Thus, there must be some sort of marshalling issue (between the VME and my
add-in), but I can't figure it out.



This only seems to occur when I call methods that create/delete model
elements. For example, I can retrieve them (e.g. model.get_objecttype(id),
iterate through the element collections, etc.) just fine.



While debugging, I can see the elements being created, referenced, and
changed as per my code, but it eventually hangs. For example, if I create a
new object and change its name, I can see the name change. Or if the file
already has an object named "Object", when I create a new object, the
default name assigned by the VME is "Object2": this is intrinsic VME
behavior, so I know that is all working, it just isn't getting back to my
add-in without hanging.



Finally, if I immediately exit my add-in after making a call similar to the
above, it completes the call, doesn't hang, and exits (obviously).



I've been fighting this one for a while now; if anyone has any insight, I
would really appreciate it!



Thanks Much,

Scot.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scot A. Becker

Software Consultant & Founder
Orthogonal Software Corporation
http://www.orthogonalsoftware.com
 

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