ScrEditCktElemName

Edits an existing circuit element's name.

UI Command:   Components window. Right-click [circuit element] > Edit Circuit Element. Change name.
Syntax:   obj.ScrEditCktElemName(<name>, <type> <newName>)
Parameters:  

BSTR name

BSTR type ("cap", "ind", "res", "port", "vprobe", "csource", or "vsource")

BSTR newName

Return Value:  

INT:

  • 0 – Success
  • 1 – One of the input parameters is an empty string.
  • 2 – type value is unacceptable.
  • 3 – Cannot find component to rename.
  • 4 – newName is already taken.
VB Example:  

obj.ScrEditCktElemName("port_old", "port", "port_new")

IPY Example:  

oDoc.ScrEditCktElemName('port_old', 'port', 'port_new')