BaseExtensions can be used to show or hide elements in Word. First, we have a simple command that can show or hide elements that contain whatever is defined. Second, we have our speed-optimized version, which is a combination of negative and positive filtering for applying visibility.
Modules are located here:
...\ModuleLibrary\BaseExtensions\01_nocontext_Tools\13a_W_showHideElements.xml
...\ModuleLibrary\BaseExtensions\01_nocontext_Tools\13b_W_showHideElementsCombination.xml
Simple version
CMD
<Cmd case="BaseExtensions:shape-show" contains="x"/>
<Cmd case="BaseExtensions:shape-hide" contains="x"/>
Parameter
contains
Define name of shapes that should be either shown or hidden. For instance, typing "dd", the command will show/hide elements containing "dd", e.g. "address".
Speed-optimized version
A command that can be used to control the visibility of elements. Shapes that match the toHide
parameter are processed first and will have their visibility set to hidden. Thus, the command will process shapes that match the toShow
parameter and set their visibility to visible.
CMD
<Cmd case="BaseExtensions:shape-show-hide" toHide="x" toShow="x"/>
Parameters
toHide
Define name of shape(s) that should be hidden. This parameter supports wildcards, e.g. a *
. If several shapes should be hidden, separate the shape name with a semicolon.
toShow
Define name of shape(s) that should be visible. Just as in the above parameter, this one also supports wildcards. If several shapes should be shown, separate the shape name with a semicolon.
Example
<Cmd case="BaseExtensions:shape-show-hide" toHide="Test_*" toShow="Test_123"/>
In this example, all shapes with a name that starts with Test_
will have their visibility set to hidden, while the shape(s) named Test_123
will be visible in the document. The wildcard makes the difference between whether the parameter includes shapes that starts with whatever is defined, or if it only will include shapes that are named the exact same as defined.
Comments
0 comments
Article is closed for comments.