System snippets
Define favorite snippets
- Click Edit favorite snippets at the top of the System tab.
- Select the snippets to be marked as favorites from the tree. Select a category to include all the snippets in the category, or expand a category and select individual snippets.
- Click OK when finished.
Display favorite snippets
To display only your favorite snippets, click the favorites toggle at the top of the System tab.
To display all snippets, click the favorites toggle again.
Copy system snippets to custom snippets
- Right-click on a snippet in the System tab.
- Select Copy to Custom from the context menu.
A copy of the snippet is placed on the Custom tab, in the same category as it appears on the System tab. If the category does not exist, it is created.
Custom snippets
Create custom snippet
- Highlight the snippet text in the editing window, then right-click and select Capture Snippet.
The Edit Snippet dialog box displays, with a copy of the snippet text in the Code text box.
- Enter the Title of the snippet, to be displayed in the snippets list.
- Select the Category in which the snippet is listed, or enter the name of a new category.
- Optionally, enter a text string to display as a tooltip when you hover the mouse pointer over the snippet in the list. Click Use Code as Tooltip to place a copy of the snippet text into the tooltip text box, and then edit the text as necessary.
- Edit the snippet in the Code text box as necessary. For complicated or long snippets, click the right arrow above the vertical scroll bar on the right to enable automatic outlining.
- Click Save or press Ctrl-S to save your snippet.
Snippets are also saved when you click OK in the Edit Rule dialog box. The first time you save custom snippets, you are prompted to choose the save location.
Manage custom snippet categories
Once you have created custom snippets, arrange them in different categories.
- To create a category, right-click and select Insert Category from the context-menu.
- To place a snippet into a category, drag it into its proper location within the tree.
- To rename a code snippet category, select the snippet or category, then right-click and select Rename from the context menu.
- Use Save As on the toolbar to create different collections of code snippets for specific projects.
Edit custom snippet
- Right-click on a snippet, and select Edit.
- Make the necessary changes in the Edit Snippets dialog box.
- Click OK when finished.
Replace custom snippets from external file
- Click at the top of the System tab.
- Select the file to replace the snippets in the Custom tab, and click Open.
Merge custom snippets from external file
- Click at the top of the System tab.
- Select the file to merge with the snippets in the Custom tab, and click Open.
Delete custom snippet
To delete a custom snippet, right-click on the snippet, and select Delete.
Create custom snippet collections for specific projects
- Click at the top of the System tab.
- Specify a filename and location, and click Save to save a copy of all the Custom snippets in the list as an external .xml file.
- If necessary, open the saved file using an XML editor and remove or edit the saved snippets.
Move or hide snippets area
Use the Pin symbol at the top of the Snippets area to customize its behavior.
- Click the pin to change between show/hide mode and docking/undocking mode.
- When the pin symbol points down, click in the title bar to the left of the pin symbol to undock the area. Then, drag the Snippets area and pin it to another location on the screen. Use the docking icons that display in the Autodesk Inventor work area if you want to dock the Snippets area to either side of the Inventor window. Click the Snippets area, then drag it over a docking icon, and release the mouse button.
- When the pin symbol points left, a Snippets tab replaces the Snippets area when it is not in use. Click the Snippets tab to show the Snippets area.