DesignPlanar.rename_component¶
- DesignPlanar.rename_component(component_id: int, new_component_name: str)¶
Rename component. The component_id is expected. However, if user passes a string for component_id, the method assumes the component_name was passed. Then will look for the id using the component_name.
- Parameters
component_id (int) – id of component within design, can pass a string for component_name
new_component_name (str) – New name
- Returns
Results
- Return type
int
- Results:
1: True name is changed. (True)
-1: Failed, new component name exists.
-2: Failed, invalid new name; it is already being used by another component.
-3: Failed, component_id does not exist.