AnsweredAssumed Answered

Automating "Replace Symbol/Part" tool with a script, DxDesigner PADS 9.4.1

Question asked by Daniel_T on Aug 23, 2012
Latest reply on Aug 29, 2012 by Daniel_T

Hi there,

To make a long story short we are in the process of migrating from DxDesigner PADS 2005.2 flow to the new iCDB version. At the same time we decided to update the symbol libraries to separate the "old" from the "new"...

 

In this process I'm writing a script which goes through the design (in DxDesigner PADS9.4.1) component by component and replacing what is local symbols with the new library ones. Everything is working as i wish except when replacing symbols with multiple parts/slots.

 

Heres a small part of the script:

 

Component.Selected = True                                                        ' Selecting component to replace

Component.SymbolBlock.ChangeComponentPreserveRefdes "< Selected Components >", newLibrarySymbolName          ' Replaces the selected component with the new library component

 

Component.SymbolBlock.PromoteSymbolNumbers 1, compSlot                 ' first arg. is VDSELECTED, second arg is SLOT;     Generates the correct slot for the symbol

 

Component.SymbolBlock.RepositionAttributesAsOnSymbol 1        ' arg is VDSELECTED;          Repositions the attributes as on the new library symbol

Component.Selected = False                                                       ' De-selecting component after replacement

 

I've understood that in order to even place a "slotted"/PARTS component with the pin numbers for only one part, I need to call the "PromoteSymbolNumbers" method (red line in example) on the symbol; and the arguments are not hard to understand... The problem for me is how do i find out what slot the symbol for the component i'm replacing is using before i call the "ChangeComponentPreserveRefdes" method so i can input this slot number into the second argument for the PromoteSymbolNumbers method? Is there any "GetSlot" method or "Slot" property that I've missed?

 

Hope someone can help...

Outcomes