![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Anyone know how to Autorun a DXL when a module is opened? Topic Summary: Created On: 1-Apr-2004 23:42 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Triggers are not for the feint of heart. The attached code installs a Trigger that forces the user to confirm an "edit" or "share" open of the current module. Open the module Edit, run the code, and save the module. Notice that the Trigger is auto-deleted before the Confirm; so you can later remove the trigger by running the code and declining to confirm. The tricky part of this is defining the DXL code that goes in the trigger. I've hard coded it in variable "TrigDXL". Notice the extra "/" characters in front of all the natural "/" and """ characters. Notice the syntax is a disaster to read; such is life. Someone else suggested putting the Trigger code in a file and reading it. This is a reasonable solution. Notice its a "post open module" trigger. "Post" means the module IS opened regardless of what the trigger is doing (the trigger runs AFTER the event; open module in this case). If you want your trigger to decide if the user can open the module at all then use a "pre open module" trigger; and be sure add code in the trigger: if I want to allow the user to open the module then set(trigPreConPass) else set(trigPreConFail) // Disallows the "event"; in this case opening the module. If you want this code to run in all modules in the Project then make it a "post open project" trigger; or possibly a "post open database" trigger. - Louie | |
![]() |
|
Hi All,
I am trying to find a way to run a DXL function every time a certain module is opened. I can't find any information on the type of startup.dxl or autorun.dxl I am looking for. Is there such an animal? I know there is a startup.dxl for the api, but I was hoping for one that is module specific. Any help would be appreciated. Thanks Carlton Edited: 1-Apr-2004 at 23:43 by Carlton Rubio |
|
![]() |
|
![]() |
|
I suspect you want a trigger, but never having dealt with them, I can't be more specific. At least it's somewhere to start looking...
![]() ------------------------- Paul dot Tiplady at TRW dot com TRW Automotive |
|
![]() |
|
![]() |
|
Thanks For that Paul, I will look into triggers...
If there are any other suggestions please let me know, Thanks All, Appreciate the help |
|
![]() |
|
![]() |
|
Triggers are not for the feint of heart.
The attached code installs a Trigger that forces the user to confirm an "edit" or "share" open of the current module. Open the module Edit, run the code, and save the module. Notice that the Trigger is auto-deleted before the Confirm; so you can later remove the trigger by running the code and declining to confirm. The tricky part of this is defining the DXL code that goes in the trigger. I've hard coded it in variable "TrigDXL". Notice the extra "/" characters in front of all the natural "/" and """ characters. Notice the syntax is a disaster to read; such is life. Someone else suggested putting the Trigger code in a file and reading it. This is a reasonable solution. Notice its a "post open module" trigger. "Post" means the module IS opened regardless of what the trigger is doing (the trigger runs AFTER the event; open module in this case). If you want your trigger to decide if the user can open the module at all then use a "pre open module" trigger; and be sure add code in the trigger: if I want to allow the user to open the module then set(trigPreConPass) else set(trigPreConFail) // Disallows the "event"; in this case opening the module. If you want this code to run in all modules in the Project then make it a "post open project" trigger; or possibly a "post open database" trigger. - Louie |
|
![]() |
|
![]() |
|
Hey Louie,
Appreciate the response and the code. Yeah I know triggers are tough, when I started looking at them, my first thought was "is it worth the trouble". Your code at least shows me a guided path towards achieving my goal. Much Thanks Carlton |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.