issue with CallThis() not working ... again

Started by ghenders, November 14, 2012, 04:22:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ghenders

This is my first post.  I've read all available Visio Guy posts, and scoured the web for how to make the CallThis() function work for me, including:

http://visguy.com/vgforum/index.php?topic=4125.msg16073#msg16073

but still no luck.  Here's what I've got so far:

1) I created several subroutines called "A" (so I could experiment which one would get "hit") that look like this:

   Public Sub A (shpObj as Visio.Shape)
      MsgBox "location of module"
   End Sub

I created the same subroutine but varied the "location of module" text to reflect where the subroutine lived.  The 4 iterations were:
1. Drawing1, Module1
2. Drawing1, ThisDocument
3. BOS, PipeData
4. BOS, ThisDocument

Note: the name of the project is "BOS", and the template filename is "bos2.vss".  The name of the module in BOS with "A" in it is called "PipeData"

2) I created a trigger for the function by entering the following formula in the shape's Actions section of the ShapeSheet:
=CallThis( ... )

Here's what's happening:
1) =CallThis("A") SUCCESS - calls the function in the Drawing1 Module1
2) =CallThis("ThisDocument.A") SUCCESS - calls the function in the Drawing1 ThisDocument
3) =CallThis("A","BOS") FAIL
4) =CallThis("PipeData.A","BOS") FAIL
5) =CallThis("A","bos2") FAIL
6) =CallThis("PipeData.A","bos2") FAIL
7) =CallThis("ThisDocument.A","BOS") FAIL
8) =CallThis("ThisDocument.A","bos2") FAIL

I also tried using the name of the template ("Building Operations Advisor"), and that didn't work.  I even checked my security settings, and the location of the template is a "Trusted Location".  I'm now running out of options, and it seems like this should be such a simple thing.  It seems the problem is in specifying the project name, but I'm not sure what else to try.  I've already spent days on this issue, and would really appreciate the help.  Thanks in advance.

Jumpy

You want to call the code stored in the Stencil (.vss)?  The Stencil is already open?
3 or 4 should've worked. Maybe it's a similiar problem like in the thread you linked?

ghenders

Correct.  I'm trying to call code from the stencil (called "BOS"), and the stencil is open.  The stencil is in edit mode, but I'm assuming that wouldn't have anything to do with it.  I don't have any other module called "A" (it seemed like an innocuous name).  I agree 3 or 4 should have worked.  Anyone up for testing this on their computer, just to see if it's even the code, or something entirely unrelated?

ghenders

Just to close this topic out, in case anyone is following this thread ... I rebuilt the code from scratch, basically by copying over everything from the existing stencil to a new stencil (which didn't take that long), and now it works.  Just like it was supposed to.  Nothing different, but now it's doing what it's supposed to.  I think that's called a ghost in the machine.

Browser ID: smf (is_webkit)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 182 (show)
Files included: 34 - 1321KB. (show)
Memory used: 1098KB.
Tokens: post-login.
Cache hits: 13: 0.00254s for 26,583 bytes (show)
Cache misses: 2: (show)
Queries used: 17.

[Show Queries]