Component and mask handlers

Description of the Component handler functions available in Schematic Editor and Schematic API

Component handlers are functions that are defined on the component level. Table 1 contains a summary of the Component handler functions possible for Schematic Editor components.
Table 1. Component handlers
Component handler When executed
init
  • Called during model loading, and when a component is added to the schematic.
  • Used to initialize the component.
  • In the case of a subsystem, it can be used to define functions and variables which can be accessed by inner components.
  • Parameters:
    • mdl - Schematic API object,
    • item_handle - item handle object.
pre_compile
  • Called during model compilation, when hard evaluation (errors are reported) of component/mask properties is performed.
  • Used to perform validations of component/mask properties.
  • In the case of a subsystem, it can also be used to update the namespace with variables that can be accessed by its inner components.
  • Properties depending on the terminal signal types or dimensions may still be unresolved.
  • Parameters:
    • mdl - Schematic API object,
    • item_handle - item handle object.
post_resolve
  • Called during model compilation, after terminal signal types and dimensions are resolved.
  • Used to perform validations of component/mask properties.
  • Values of all properties are resolved at this point.
  • Parameters:
    • mdl - Schematic API object,
    • item_handle - item handle object.