Control Architect Help Documentation
×
Menu
Index

Code Snippets

 
Control Architect provides the ability to define and save often used pieces of C# code used to define Control Binding expressions as Code Snippets.  Code snippets provide a library of samples of C# scripting that can be easily dragged and dropped onto the script editor.
 

Creating a Code Snippet

 
A Code Snippet can be created in one of two ways as follows:
 

Using a Code Snippet

 
To use an existing Code Snippet, left mouse-click to select the Code Snippet in the Code Snippet view and drag it to the text position in the script editor surface, then release the mouse button to drop the dragged snippet text.
 
You can also select the script code using Ctrl+A and Ctrl+C to copy it to the Windows Clipboard.  Use Ctrl+V to paste the code script in the editor.
 
 

Edit Existing Code Snippets

 
You can edit existing code snippets by selecting the Code Snippet to edit in the Code Snippet view.  This will update the Code Snippet Editor view with the contents of the selected code snippet for editing.  Any changes made in the Code Snippet Editor view will automatically be saved.
 
 

Delete an existing Code Snippet

 
A Code Snippet can be deleted by clicking the Remove Code Snippet button to delete the selected Code Snippet item.
 

Application Option to Auto Activate the Code Snippet Editor View

 
You can turn on/off the application option to automatically activate the Code Snippet Editor view when a code snippet item is selected in the Code Snippet view.
 
Notes