Scope: Schematic editor
Object:
Prerequisites: None
The Application_AfterAnnotateComponent event is used in a DataBook script to make direct changes to the component on a schematic.
Sub Application_AfterAnnotateComponent (ByVal component As Component)
Component. The component that was just annotated in the schematic.
Applies to the Components object (see Components Object) and is called by the script after annotating a component on the schematic.
This event handler resets the slot of a component after it is annotated and reports the UID and count.
Function Application_AfterAnnotateComponent(component)
'''
''' Hook up to running Xpedition Designer
Set view = Viewdraw.ActiveView
''' A loop is needed since more than once component might be
''' annotated
Set CompInst = component.Instances
' Count example
CompInstCount = CompInst.count
MsgBox CompInstCount,,"Instance Count"
For Each name In CompInst
'' Select the component
view.SelectByName name
'' Reset slot and REFDES
Viewdraw.ExecuteCommand "pdbslot 3 No"
MsgBox "Reset slot for " & name,,"Change Slot Message"
Next
End Function