Trigger Functions

T

Tracy Groller

Guest
I am trying to figure out some of the
trigger functions, I would like to be able
to launch a procedure each time a
schematic is opened for for write acess .


--


\ ~ ~ ///
---- ( @ @ )
| | ======oOOo==(_)==oOOo=======================================
| |__<*> ___ Tracy Groller | Texas Instruments, Inc.
| _|III|_ | ------------------| Wireless RFCMOS Design
_____| /_ III _/ \ TI MSGID: TAG2 | P.O. Box 660199, MS 8729
\_ /III/ | PC Drop: PFLL | Dallas, Texas 75266
\ _ /III/ _| -------------------------------------------------
\_/ \ \___> - Phone: (214) 480-2217 Text Pager
\ / Email: h-groller@ti.com 2144010964@sbc2way.com
\ \ =======================================================
\---\
 
On Mon, 09 May 2005 10:18:56 -0500, Tracy Groller <h-groller@ti.com> wrote:

I am trying to figure out some of the
trigger functions, I would like to be able
to launch a procedure each time a
schematic is opened for for write acess .
procedure(TracyTrigger(args)
when(member(args->accessMode '("a" "w"))
printf("Opened in edit mode\n")
;;; do what you want here ;;;
)
)

deRegUserTriggers("schematic" nil nil 'TracyTrigger)
 
Tracy Groller wrote:

I am trying to figure out some of the
trigger functions, I would like to be able
to launch a procedure each time a
schematic is opened for for write acess .


PreAutoCheckout

Andrew wrote a nice article on this, but I can t get it out of sourcelink any
more.

Am I the only one who can t make heads or tails of the new sourcelink &
sourcelink search ?
 
fogh wrote:

Tracy Groller wrote:

I am trying to figure out some of the
trigger functions, I would like to be able
to launch a procedure each time a
schematic is opened for for write acess .


PreAutoCheckout

Andrew wrote a nice article on this, but I can t get it out of
sourcelink any more.
AH !
http://sourcelink.cadence.com/docs/files/FFF/199/triggers.html
 
fogh,

Many thanks for the post,
Andrew thanks for putting the info together
much better than cdsdoc examples .

Tracy

fogh wrote:

Tracy Groller wrote:

I am trying to figure out some of the
trigger functions, I would like to be able
to launch a procedure each time a
schematic is opened for for write acess .


PreAutoCheckout

Andrew wrote a nice article on this, but I can t get it out of
sourcelink any more.


AH !
http://sourcelink.cadence.com/docs/files/FFF/199/triggers.html


--


\ ~ ~ ///
---- ( @ @ )
| | ======oOOo==(_)==oOOo=======================================
| |__<*> ___ Tracy Groller | Texas Instruments, Inc.
| _|III|_ | ------------------| Wireless RFCMOS Design
_____| /_ III _/ \ TI MSGID: TAG2 | P.O. Box 660199, MS 8729
\_ /III/ | PC Drop: PFLL | Dallas, Texas 75266
\ _ /III/ _| -------------------------------------------------
\_/ \ \___> - Phone: (214) 480-2217 Text Pager
\ / Email: h-groller@ti.com 2144010964@sbc2way.com
\ \ =======================================================
\---\
 
procedure(TracyTrigger(args)
when(member(args->accessMode '("a" "w"))
printf("Opened in edit mode\n")
;;; do what you want here ;;;
)
)

deRegUserTriggers("schematic" nil nil 'TracyTrigger)
I used to save the old value of the trigger and call it from my own trigger
to avoid overriding. I tought it was needed, however seeing your code i did
a try and i was surprised to see it is not.

Is this a new behavior or was i always doing wrong?

stéphane
 
On Tue, 10 May 2005 11:49:42 +0200, "S. Badel"
<stephane.badel@REMOVETHISepfl.ch> wrote:

procedure(TracyTrigger(args)
when(member(args->accessMode '("a" "w"))
printf("Opened in edit mode\n")
;;; do what you want here ;;;
)
)

deRegUserTriggers("schematic" nil nil 'TracyTrigger)


I used to save the old value of the trigger and call it from my own trigger
to avoid overriding. I tought it was needed, however seeing your code i did
a try and i was surprised to see it is not.

Is this a new behavior or was i always doing wrong?

stéphane
A change was made some point in the IC446 hotfix stream to allow multiple
trigger registrations. Before that I had some wrapper code around
deRegUserTriggers which kept a record of all the registrations, and then the
registered function called all the functions registered with my own code in
turn. Luckily that's no longer needed.

So it's certainly there in all IC5.X versions.

Regards,

Andrew.
 
Erik Wanta wrote:
Stéphane:
There was a limitation where one could only register one user trigger
per view type. This limitation doesn't exist in the later IC versions
(from IC5033 I believe). I do check to see that I unregister a user
trigger before registering it again however.

;make sure that myUserTrigger isn't already registered
when(member('myUserTrigger
deGetAppInfo("analogArtist-schematic")->userPostInstallTrigList)
;if registered, unregister
_deUnRegUserTrigger("analogArtist-schematic" nil nil 'myUserTrigger)
) ; when
Hey, Hey ! Look ! He is using private funcs too !
 
fogh wrote:
Andrew wrote a nice article on this ...
http://sourcelink.cadence.com/docs/files/FFF/199/triggers.html
Likewise, upon exit, Jay wrote a nice routine:

;;------------------------------------------------------------------------;;
;; FileName : JayExit.il
;;
;; Purpose : Demonstrate use of pre-exit & post-exit triggers.
;;
;; Author: M. Singh (aka "Jay Knows Best" ::
;;
;; Paste the following line into your .cdsinit file or in your CIW
;; load("JayExit.il")
;;------------------------------------------------------------------------;;

;-- What do you want to do just before exiting ???
;
procedure(JayBeforeExitProc()
printf("This is just before session exit. Do something in the
session.\n")
); end procedure
;
;
;-- Exit is final... What now ???
;
procedure(JayAfterExitProc()
printf("This is the place for any post-session processing.\n")
;(hiDisplayForm hiSaveForRestoreForm )
); end procedure
;
;-- Register regExitBefore and/or regExitAfter.
procedure(JayInvokeMyExit()
regExitBefore('JayBeforeExitProc)
regExitAfter('JayAfterExitProc)
); end procedure
;
;; Invoke and Implement call back.
JayInvokeMyExit()
;end
 
I added the "Jay knows best" above (not Jay).

Notice both Andrew ("Andrew knows all") and Jay ("Jay konws best")
follow Cadence naming recommendations:
- Start all Customer functions & file names with a prefix;
- Start the prefix with a caital letter;
- Run the results through a SKILL Survey
(This provies a complete three-file function inventory for
ease-of-maintenance & it allows for survey results for no hassle
migration to subsequent releases!)

Note: For its part, Cadence all new SKILL functions should start with a
lower-case prefix & all new Cadence private unsupported undocumented
functions should additionally start with an underscore.

That way, you know at a glance, the status of any particular SKILL
function or file - just by the name.

John Gianni
"The email address above is a spam trap; use my corporate email."
 
Stéphane:
There was a limitation where one could only register one user trigger
per view type. This limitation doesn't exist in the later IC versions
(from IC5033 I believe). I do check to see that I unregister a user
trigger before registering it again however.

;make sure that myUserTrigger isn't already registered
when(member('myUserTrigger
deGetAppInfo("analogArtist-schematic")->userPostInstallTrigList)
;if registered, unregister
_deUnRegUserTrigger("analogArtist-schematic" nil nil 'myUserTrigger)
) ; when

;register my trigger
deRegUserTriggers("analogArtist-schematic" nil nil 'myUserTrigger)

---
Erik


S. Badel wrote:
procedure(TracyTrigger(args)
when(member(args->accessMode '("a" "w"))
printf("Opened in edit mode\n")
;;; do what you want here ;;;
)
)

deRegUserTriggers("schematic" nil nil 'TracyTrigger)


I used to save the old value of the trigger and call it from my own
trigger
to avoid overriding. I tought it was needed, however seeing your code
i did
a try and i was surprised to see it is not.

Is this a new behavior or was i always doing wrong?

stéphane
 

Welcome to EDABoard.com

Sponsor

Back
Top