Arguments newSymName if Selectcount('instances')=0 then Echo "There are no symbols selected" exit script endif ** Replace symbols for selected devices Let handles=PropValues('handle') ** Check that they are all the same symbol Let numHandles = length(handles) Let symbolName='' for idx=0 to numHandles-1 if idx=0 then Let symbolName = SymbolName('handle', handles[idx]) elseif SymbolName('handle', handles[idx])<>symbolName then Echo "All selected symbols must be the same type to perform this operation" exit script endif next idx Unselect for handleIdx=0 to numHandles-1 Select /prop handle {handles[handleIdx]} ** get instance location Let points=InstPoints() ** get properties. ** First fill array with unprotected prop names Let props = InstProps() Let numProps = length(props) Let values = MakeString(numProps) Let flags = MakeString(numProps) for idx=0 to numProps-1 let values[idx]=PropValue(props[idx]) Let flags[idx] = PropFlags(props[idx]) next idx delete inst /loc {points[0]} {points[1]} {points[2]} /select {newSymName} for idx=0 to numProps-1 Let thisflags = PropFlags(props[idx]) if thisFlags=='' then Let thisFlags='0' endif if Floor(flags[idx]/128)%2=0 && Floor(thisflags/128)%2=0 then ** Dont attempt to replace properties that were originally protected ** Prop /flags {flags[idx]} {props[idx]} {values[idx]} Prop {props[idx]} {values[idx]} endif next idx Unselect Unlet values Unlet flags next handleIdx