Application_LoadComponent Event

Scope: Schematic editor

Object: Components Object

Prerequisites: None

The Application_LoadComponent event is used in a DataBook script to override the mapping from the loaded component to the library used in the DataBook search.

Usage

Sub Application_LoadComponent (ByVal components As Components)

Arguments

components

Collection. The collection containing one or more loaded components.

Description

Applies to the Components object (see Components Object) and is called by the script when loading components from the schematic and before searching the DataBook database for the components.

Note:

If you click the DataBook Live Verification button, this event is called by DataBook when loading components from the schematic.

Examples

This example displays a dialog box showing the loaded components:

Function Application_LoadComponent(components) 
   '' 
   '' 
   dim sCmpData 
   For Each component In components 
     sCmpData= sCmpData & component.Name & CHR(10)  
     sCmpData= sCmpData & " Symbol = " & component.Symbol & CHR(10) 
     sCmpData= sCmpData & " Library = " & component.Library & CHR(10) 
     Set attrColl = component.Attributes  
      For Each attr In attrColl 
        sCmpData= sCmpData & " " & attr.Name & "=" & attr.Value & CHR(10) 
      Next 
     sCmpData= sCmpData & CHR(10) 
   next 
  MsgBox "The loaded components are:" & CHR(10) & CHR(10) & sCmpData 
End Function