This Plugin helps to add a condition along with the arguments to run a macro which matches the given condition. This helps to filter the files passed/ configuration by the below data Expressions
- SUBSTRING Function
- TRIM Function
- LEN Function
- CONVERT Function
- IIF Condition
Syntax / Rules:
1. Every Condition should Start with an = sign
2. All functions defined above should be prefixed and suffixed by an _ “underscore” (Example : _IIF_)
Activate and Access
User can activate this Plugin from the settings tab and navigate to "Plug-ins Manager".Select the "Conditional Executor" plugin checkbox.
After enabling the Plugin , #TASK prompts to Restart the application, After Restarting the application a field for "Condition" gets displayed in the Arguments Pane.
Provide any simple condition to evaluate and currently its been limited to only Simple Conditions and there is no way for providing nested conditions.
User Scenarios
Here are few of the Scenarios where conditional Executor plugin will be used.
- Run a macro against the list of files only if a particular Property Name has a specified value.
Scenario 1 :
Add a new configuration only if the Revision Property has the value A
=_IIF_(('[$prp%Revision]'='A'),TRUE,FALSE)
A comparative screenshot with this condition set to visualize after and before Macro Run.
- Run a macro to get the output only for specific file extension in specific Folders.
Scenario 2 :
Run the macro "Export" and export the step files with filetype SLDPRT in one folder and export the step files with filetype SLDASM in another folder
PreRequisites:
1) Create two different Folders
2) Add the same macro "Export" twice
In the "Export" macro to generate the Part step files in Folder1
=_IIF_('[$path%FullPath]' LIKE '%.SLDPRT',TRUE,FALSE)
In the "Export" macro to generate the Assembly step files in Folder2
=_IIF_('[$path%FullPath]' LIKE '%.SLDASM',TRUE,FALSE)
A comparative screenshot with this condition set to visualize after and before Macro Run.
- Run a macro against the list of files only if a particular Property matches the property Revision as R0 or 1.
Scenario 3 :
Add a new configuration only if it has the values for the property Revision as R0 or 1
=_IIF_(('[$prp%Revision]'='R0' OR '[$prp%Revision]'='1'),TRUE,FALSE)
Comments
0 comments
Article is closed for comments.