Application_AnnotateComponent Event

Scope: Schematic editor

Object: Components Object

Prerequisites: None

The Application_AnnotateComponent event is used in a DataBook script to prevent unapproved parts from being added to the schematic by making sure the approved part property exists before instantiating a component.

Usage

Sub Application_AnnotateComponent (ByVal component As Component)

Arguments

component

Component. The component to be annotated.

Description

The Application_AnnotateComponent event has the following characteristics:

  • Applies to the Components object (Components Object) and is called by the script before annotating a component on a schematic.

    To control whether or not DataBook calls this event, in the DataBook Search window select Configure > Edit Configuration > Preferences and check or uncheck the available annotation options in the Configure Dialog Box.

  • Annotation settings in DataBook Configure dialog box impact if Application_AnnotateComponent event is called by DataBook.

Examples

This example displays a message box listing which properties will be annotated:

Function Application_AnnotateComponent(component) 
   ''' 
   ''' 
   dim string 
     For Each attr In component.Attributes  
        sAttr = sAttr & CHR(10) & attr.Name & "=" & attr.Value 
     next 
   MsgBox "Properties being annotated are: " + CHR(10) + sAttr,,"Info" 
   ''' If the Continue property is TRUE, the attributes will be  
   ''  annotated to the component 
   ''' If the Continue property is FALSE, the attributes will not be      
   ''  annotated 
   Component.Continue = TRUE 
End Function