Application_AfterAddComponent Event

Scope: Schematic editor

Object: Components Object

Prerequisites: None

The Application_AfterAddComponent event is used in a DataBook script to make direct changes to the component on a schematic.

Usage

Sub Application_AfterAddComponent (ByVal component As Component)

Arguments

component

Component. The component that was just added to the schematic.

Description

Applies to the Components object (see Components Object) and is called by the script after a generic or unique component is added to the schematic.

Note:

This event is not called when a symbol is dragged from the DataBook “CL View” tab symbol preview window to the schematic.

Examples

This event handler lists the instance name of the component after it is added.

Function Application_AfterAddComponent(component) 
   ''' 
   ''' Hook up to running Xpedition Designer 
   Set view = Viewdraw.ActiveView 
   ''' When adding, this list always has one element - but we can still  
   ''' use For Each to get to it  
      For Each name In component.Instances 
         '' Select the component 
         '' Not required, but is usefull to know how for other operations 
         view.SelectByName name 
         MsgBox "InstanceName = " & name,,"UID" 
      Next 
End Function