Renaming a Component
When you rename a component in Component Studio, HotDocs updates all other components or templates that reference the selected component.
If the component you want to rename does not appear in any templates, is not on a dialog, and is not included in any HotDocs script then you can type a new name directly into the component's Name property without using the Rename button.
Prerequisites
- To prevent errors in other templates, before renaming a component, consider whether or not you have imported every template that references that component into the current Workspace
To rename a component
- Open Component Studio.
- In the Components column to the left, select the component (or components) you want to rename.
- On the component tool bar, click Rename.
- In the New Component Name text box, type the new name you want to give the component.
- (Optional) If renaming multiple components, you can also use the Find and Replace With boxes to edit component names.
- If the component you are renaming is used in other components or templates, you can use the Update References check boxes to choose whether or not to update the component in the other locations.
- Click Rename to open the Rename Component Progress dialog box and begin the process of renaming the component in all templates that refer to that component and updating all HotDocs fields that refer to that component.
- After reviewing the rename details, click Close.
If the rename operation encounters any errors, be sure to close each opened template and do not save the changes. See below for more information.
- If you are satisfied with the changes, be sure to Save each opened template before making any other template changes.
Troubleshooting
Problem: Cannot rename existing component using the Name text box
If a component's Name field is read-only, this is either because the component file is read-only or because the component appears in:
- A template
- A dialog
- HotDocs script
Solution
You can check if a component file is read-only by looking for [Read-only] in the title bar and the image of a lock on the component tab.
If the component file is not read-only, you can either follow the steps for renaming a component above, or find where the component is currently referenced and remove it.
Problem: An error occurred while renaming the components in templates
If HotDocs is unable to successfully rename each component in each template, any successful partial changes need to be cancelled.
Solution
If you encountered an error during the rename operation:
- Note the template where the error occurred (the Rename Details pane should contain this information).
- Close each template that was opened as part of the rename operation and click Do Not Save when prompted (this "backs out" the partial rename performed on those templates, and prevents the template from having further errors).
- Address any errors in the template where the error occurred (being sure to reference the error information from the Rename Details pane).
- Attempt the rename operation again.