DxDesigner: Resetting RefDes of selected components

Document created by nick_hong on Aug 4, 2010Last modified by nick_hong on Aug 4, 2010
Version 2Show Document
  • View in full screen mode

RefDes can be reset by selecting a component or components and then perform 'Delete Property' on Ref Designator row in properties window.


But this does not work when the selection includes other objects such as global symbols(GND, VCC) or pins


Below Automation code is to automate resetting RefDes of selected components even though the selection includes other objects so that you don't need to adjust selection filter.



Set colPins = Application.ActiveView.Query(VDM_COMPPIN+VDM_PIN, VD_SELECTED)
If colPins.Count > 0 Then
  For Each obj In colPins
    obj.Selected = False
End If
Set colComponents = Application.ActiveView.Query(VDM_COMP, VD_SELECTED)
If Not colComponents.Count < 1 Then
  For Each oComponent In colComponents
    Set oRefAttr = oComponent.FindAttribute("Ref Designator")
    If Not oRefAttr Is Nothing Then
    End If
End If