1 of 1 people found this helpful
DxDesigner does not have a property for which slot a particular symbol instance is assigned.
You'll need to look at the pin number instance values, and compare that to the library part definition.
If you have pin numbers on the symbol, loop over the component connections, get the symbol pin, get the # attribute value, and split it into an array.
The loop over the array, and when you find the component pin instance value, that is your slot number.
If you do not have pin numbers on the symbol, like you may find with an Expedition Central Library, you will need to use the Parts database automation to traverse the mapping from a pin number to the slot.
Thanks for the reply John, so I did figure out a way to get the slot information from an underlying symbol but not exactly as you describe. The scripting function I made is based on the GetProjectData class. In this class one can use both the GetSlotsCount and GetPinNumbers methods to return the information needed to decide which slot a symbol instance is using. But one issue i have had is the "LibraryPartition" argument for both these methods. How do i specify this partition to a "Local project" symbol i.e. how should below call look?
Application.GetProjectData.GetSlotsCount(<Local project library/partition>, Component.SymbolBlock.GetName(1), Component.SymbolBlock.SheetNum)