Product Documentation
Virtuoso Technology Data SKILL Reference
Product Version IC23.1, June 2023

tcRegPreLoadTrigger

tcRegPreLoadTrigger(
s_function
[ x_priority ]
) 
=> t / nil

Description

Registers a trigger function the system calls before loading a technology database. The s_function argument is a SKILL procedure with two arguments: the database identifier of the technology database and the name of the ASCII technology file you are loading. Trigger functions are called in order of priority, with 0 having the highest priority. If you do not specify a priority argument, the default is the lowest priority (that is, it executes after any other trigger function that specifies a priority).

You can use this function to check the technology file contents before loading the technology file. Library administrators can use this mechanism to prevent library users from accidentally overwriting technology data that must be consistent with the centrally defined technology data.

Arguments

s_function

Symbol indicating the name of the trigger function. The format of the function is as follows:

function( d_techID t_techFileName )
=> t / nil

where,

  • d_techID is the database identifier of the technology database.
  • t_techFileName is the name of the ASCII technology file.

x_priority

Priority of this trigger function.

Valid values: Any integer

Value Returned

t

The trigger function is registered.

nil

The SKILL procedure does not exist or is incomplete; the trigger function did not register.

Example

procedure(MYFilterTechFileLoad( TFID techfile)
    prog((techport)
     if(TFID~>owner != "sysAdmin" return(t))
; TFID is owned by central admintrator.
; Do not allow user to overwrite protected
; technology data.
techport = infile(techfile)
; Read file into big list then check the
; section headers.
while((section = read(techport))
if( listp(section) && memq(car(section)
MYProtectedSections) then
warn("Cannot load techfile containing
\"%s\" section" car(section))
close (techport)
return(nil)
)
)
close(techport)
return(t)
)
)
tcRegPreLoadTrigger(’MYFilterTechFileLoad)

Registers a preload trigger that prevents a user from accidentally overwriting the technology data defined by the library owner.


Return to top
 ⠀
X