I am working on building a system in visio for managing engineering drawings. The plan is to create stencils of common shapes, and associate with each of the shapes a bunch of code to facilitate easy editing.
Each shape should basically be a class where dragging a shape into a drawing instantiates one of these objects. Each shape should have a method that executes when it is double clicked to allow easy editing of the fields.
Each of the shape instances should also have seperate data, so that changing parts of one shape doesn't have any effect on other shapes of the same "class".
I am a moderately knowledgable programming in C and Python, but I don't know much beyond the basics of VBA or the Visio environment. What I am most confused about is the name space. I currently have a module (not a class) inside of a stencil. Call the stencil "foo.vss", the module "bar" and the method I want to call "baz". When working in the edit mode for the stencils, I can set it's double click behaviour to =CALLMACRO("foo.bar.baz") and everything works as expected. However, when I drag this shape into a drawing (the stencil is also open in the drawing) doing the same thing throws a system error (&H80004005 (-2147467259) unspecified error). Why? Why is the foo stencil not in the namespace of the new drawing(This is what I have been assuming is causing the error...)?
Any advice for implemnting this? Or pointers toward some good resources? I just want to structure a simple object oriented system, and the programming environment I am forced into is a nightmare.