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 (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.
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?
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?
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: 1:
Printpage (default).
Sub templates: 4:
init,
print_above,
main,
print_below.
Language files: 1:
index+Modifications.english (default).
Style sheets: 0:
.
Hooks called: 50 (
showintegrate_autoload, cache_get_data, integrate_pre_load, integrate_load_session, integrate_verify_user, cache_get_data, integrate_user_info, integrate_load_board, cache_get_data, integrate_board_info, cache_get_data, integrate_allowed_to_general, integrate_pre_load_theme, cache_get_data, integrate_allowed_to_general, integrate_simple_actions, integrate_allowed_to_general, integrate_load_theme, integrate_pre_log_stats, cache_put_data, integrate_actions, integrate_pre_parsebbc, integrate_bbc_codes, integrate_bbc_print, integrate_post_parsebbc, integrate_pre_parsebbc, integrate_bbc_print, integrate_post_parsebbc, integrate_pre_parsebbc, integrate_bbc_print, integrate_post_parsebbc, integrate_pre_parsebbc, integrate_bbc_print, integrate_post_parsebbc, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general, integrate_menu_buttons, integrate_current_action, integrate_theme_context, integrate_allowed_to_general, integrate_allowed_to_general, integrate_allowed_to_general)
Files included: 25 - 925KB. (
show/home/iw0lkfe3x6cq/public_html/vgforum/index.php, /home/iw0lkfe3x6cq/public_html/vgforum/Settings.php, /home/iw0lkfe3x6cq/public_html/vgforum/cache/db_last_error.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/QueryString.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs-Auth.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Errors.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Load.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Security.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs-Compat.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs-Db-mysql.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Cache/CacheApi.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Cache/CacheApiInterface.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Cache/APIs/FileBased.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Subs-Charset.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Unicode/Metadata.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Unicode/QuickCheck.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Session.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Logging.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Class-BrowserDetect.php, (Current Theme)/languages/index.english.php, (Current Theme)/languages/Modifications.english.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Printpage.php, (Current Theme)/Printpage.template.php, /home/iw0lkfe3x6cq/public_html/vgforum/Sources/Unicode/CaseUpper.php)
Memory used: 775KB.
Tokens:
post-login.
Cache hits: 8: 0.00181s for 22,302 bytes (
showget modSettings: 0.00041s - 19983 bytes, get known_languages: 0.00019s - 1277 bytes, get board_parents-0: 0.00012s - 2 bytes, get permissions:-1: 0.00013s - 50 bytes, get theme_settings-1: 0.00010s - 980 bytes, get log_online-update: 0.00001s - 0 bytes, put log_online-update: 0.00080s - 10 bytes, get menu_buttons--1-english: 0.00004s - 0 bytes)
Cache misses: 2: (
showget log_online-update, get menu_buttons--1-english)
Queries used: 10.
[Show Queries]