ccpRegTrigger
ccpRegTrigger(t_copyPhaseStr s_triggerFunction[g_canEditList] ) =>t / nil
Description
Registers the copy trigger that you create. The copy trigger is called in the copy phase that you specify.
If you run copy commands through the Cadence Library Manager, you need to set the following in your .cdsenv file so that copy is done by cdsCopy instead of the Library Manager and the copy triggers that you specify are called:
ddserv.lib enableCopyInDFII boolean t
cdsLibManager.copyGlobals mpsRadio toggle (t nil)
The cdsLibManager.copyGlobals setting is the default setting for the Remote Copy Service option in the Copy Preferences form.
Arguments
Value Returned
Examples
ccpRegTrigger("ccpPostExpandTrigger" 'copyTriggerPrint t)
Additional Information
A copy trigger function is a function that specifies the action to be triggered in a specific phase of the copy operation.
The copy trigger function must return t for the copy operation to continue; if the function returns nil, the copy operation is canceled.
Use the following format for the copy trigger function:
procedure(copyTrigger(myFunction copyPhaseStr checkOffList supplementList
otherFromSpecs otherToSpecs updateList retHint ctxList reserved "stgggggggx"))
=> t / nil
- myFunction is your trigger function’s symbol.
- copyPhaseStr is the current copy trigger phase, specified as a string.
-
checkOffList is the list of items to be copied. Each element of the list has the following format:
(
If you do not want an item to be copied, set its boolean value tobooleanfromGdmSpectoGdmSpec)nil.
The trigger function can only modify the copy lists if the g_canEditList argument ofccpRegTriggerist.
Do not skip any non-derived files because you might lose data. Specifically, if a file is skipped when the trigger is called by a rename function, you will lose the data because the original source will be deleted. TheccpTagOperationtag in the ctxList argument tells you which function is calling the trigger; you can modify the behavior of the trigger function accordingly. -
supplementList is a list to which your trigger function can append additional items to be copied. Any items you add must be in the same format as the items in the checkOffList. The supplementList ends with a
nil; if you add items, do not remove thenilat the end of the list. - otherFromSpecs and otherToSpecs are gdmSpecLists of other items to be copied that cannot be modified by the trigger function.
- updateList specifies the items to update. The trigger function can add or remove items from this list. updateList contains two elements:
-
retHint is a list of one element which is either
nilor non-nil. If your trigger function modifies any copy list, then it must also set the value of retHint to non-nil. -
ctxList is a list that contains the original arguments from the copy command. Each element of the list has the following format:
(
Your trigger function must not modify these values.tagvalue)
Each tag-value pair is one of the following: - reserved is an integer argument that is currently reserved.
The following example creates a copy trigger function that prints some of its arguments:
procedure(copyTriggerPrint(myFunction copyPhaseStr checkOffList supplementList
otherFromSpecs otherToSpecs updateList retHint
ctxList reserved "stgggggggx")
let((retOK)
retOK = t
printf("Copy phase is \"%s\"\n" copyPhaseStr)
printf("Calling options were %L\n", ctxList)
printf("Pre-copy set is %L\n", checkOffList)
printf("Post-copy is from %L\n", otherFromSpecs)
printf(" to %L\n", otherToSpecs)
retOK
)
)
Related Topics
Return to top