I want to create a P&ID symbol of a valve. Symbol consists of two triangle shapes. The idea is that if you double click on one of the triangle shapes, the fill color will change. If it's white, it would change to black, and if it's black, change to white.
As long as the two shapes aren't grouped, the macro works fine. when I group them it no longer works...what am i missing here?
you might check this out (group behaviour)
http://www.visguy.com/2009/10/13/getting-a-handle-on-selecting-and-subselecting-visio-shapes/
al
1. You dont need a macro to do that
- Open up shape sheet
- Create a user.cell called user.switch
- in eventdblclk cell, set it to setf(getref(user.switch), if (user.switch =1, 0, 1))
- in fillforegnd cell, set it to guard(if (user.switch, RGB(0,0,0), RGB(255,255,255)))
What this does is that when you double click the shape, the user.switch cell flips. The fillforegnd cell watches the user.switch and decides on color to use
(if you dont want to use double click....can also do actions to do this)
2. when you select, you are select the group first...to do what you want you need to do the following
- At group level, right click group....format ==> behavior.... lower right set to either members first
- For each shape in the group, if you really want to do this via some macro, then format ==> behavior....action set to the macro you want
Good luck
This took me a little bit but I think I understand.
Now, If I want to build some shapes and then make them a stencil, do I need to worry about them still functioning after i've created the stencil?
with vojo's shapesheet solution, the behaviour will be kept we the shape. So it will work also when droped out of a stencil.
If you make a macro driven solution, you need to make sure that the macro is loaded when using the shape, so store the macro in the stencil itself.
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: 53 (
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_get_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_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 - 922KB. (
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: 771KB.
Tokens:
post-login.
Cache hits: 7: 0.00113s for 22,301 bytes (
showget modSettings: 0.00051s - 19982 bytes, get known_languages: 0.00020s - 1277 bytes, get board_parents-0: 0.00011s - 2 bytes, get permissions:-1: 0.00009s - 50 bytes, get theme_settings-1: 0.00011s - 980 bytes, get log_online-update: 0.00009s - 10 bytes, get menu_buttons--1-english: 0.00002s - 0 bytes)
Cache misses: 1: (
showget menu_buttons--1-english)
Queries used: 9.
[Show Queries]