![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Automatically run a script Topic Summary: Created On: 14-Mar-2006 12:02 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hello,
Is it possible to automatically run a dxl-script, when user e.g. selects specific module / view in module etc. Is there some way to do this?
Thanks, Tuomas
|
|
![]() |
|
![]() |
|
This mechanism is called a "trigger" in DOORS. Please refer to the "Triggers" chapter in DOORS DXL Reference Manual.
------------------------- E. Piallat CeBeNetwork |
|
![]() |
|
![]() |
|
The only events you can attach triggers to are:
Module Open Module Close Object Open (= starting an in-line edit by double-clicking in a column) Object Sync (= making a different object current) Attribute Modify |
|
![]() |
|
![]() |
|
Applying a trigger would be one way however, the original question is not clear to me.
1. Do you want something to happen when a user selects a particular view?? If you want something displayed, then create a view with a column containing a layout dxl. I would suggest making the dxl simple. Don't use the dxl to set other attributes or to do non-display actions. 2. If you want a dxl to run when a module is opened -- Another way would be to put a dxl into the folder doorsHome/lib/dxl/config/formalFiles. ANY file in that directory will run as a dxl when a formal module is opened. If you want the dxl to run for all users, either define doorshome to be on a network or you will have to copy that file to all clients. WARNING - I find that a complex dxl involving dialog boxes, etc can crash DOORS. This is probably because some global values have not been set when the dxl is run. Before trying this I would suggest setting up a test database to try it. Remember, this affects ALL formal modules. If you want a dxl to run for a specific module, you will need a conditional statement at the start of the dxl. I don't use this feature and I do not recall where it was mentioned. ------------------------- Cliff Bly |
|
![]() |
|
![]() |
|
Applying a trigger would be one way however, the original question is not clear to me.
1. Do you want something to happen when a user selects a particular view?? If you want something displayed, then create a view with a column containing a layout dxl. I would suggest making the dxl simple. Don't use the dxl to set other attributes or to do non-display actions. 2. If you want a dxl to run when a module is opened -- Another way would be to put a dxl into the folder doorsHome/lib/dxl/config/formalFiles. ANY file in that directory will run as a dxl when a formal module is opened. If you want the dxl to run for all users, either define doorshome to be on a network or you will have to copy that file to all clients. WARNING - I find that a complex dxl involving dialog boxes, etc can crash DOORS. This is probably because some global values have not been set when the dxl is run. Before trying this I would suggest setting up a test database to try it. Remember, this affects ALL formal modules. If you want a dxl to run for a specific module, you will need a conditional statement at the start of the dxl. I don't use this feature and I do not recall where it was mentioned. ------------------------- Cliff Bly |
|
![]() |
|
![]() |
|
I wanted to respond to something Cliff said. It may be a tangent, but it's caused me some problems.
If you set DOORSHome to be on a network drive, keep in mind that patching DOORS on a local drive will then cause your files on the network drive to be out of sync. This can cause all sorts of weird things to happen. I had a user who couldn't do a simple Control-F or Control-G without crashing his client. If you're going to run DOORSHome off of a network, you must work much harder to keep all files current. ------------------------- Kevin Murphy http://www.baselinesinc.com The Requirements Management Experts |
|
![]() |
|
![]() |
|
I don't think you can simply redirect your "$home" to be on a network drive. When you install DOORS, instead of installing the "DOORS Client" you install a "Workstation Client", which points your DOORS to the network.
- Louie |
|
![]() |
|
![]() |
|
Louie,
Check the help documentation for the -HOME command line switch. There's the database IP address, and then the -HOME switch. Two separate things. Kev ------------------------- Kevin Murphy http://www.baselinesinc.com The Requirements Management Experts |
|
![]() |
|
![]() |
|
It seems we got off track from Tuomas' initial question. I believe what he is asking - and what I'd like to figure out how to do as well - is have a DXL script automatically run when the user loads a particular view. Yes there are triggers but there is no way (that I've found) to attach a trigger to the "load a view" event because there is no "load a view" event. Does anyone have any ideas how to go about accomplishing this?
------------------------- -------------------------------------- Robin Riley Motorola, Inc Robin.Riley@motorola.com |
|
![]() |
|
![]() |
|
I'm also looking for the answer to this question as I have a similar problem. Not with switching a view, but with editing an object attribute. I could set up a trigger for the whole object, but then the users would have to set the attribute everytime they edited the object.....not cool. I want the script to run only when a specific attribute is being edited. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
See the section on trigger definition in the dxl reference manual. One can associate execution of a script with modification of an object attribute. The attached code gives an example. The attribute "Req't" is specified, as well as post-modification execution. Specification of a priority allows the dxl environment to decide which trigger script to execute if a certain set of circumstances meet the conditions of more than one trigger.
|
|
![]() |
|
![]() |
|
We've used a permanant pre-save-attribute trigger, whose purpose was to verify the new value as being valid and either allow or disallow the change to take affect. This trigger fires when the user clicks out of the column in question. I don't think it works for editing attributes from the Object properties dialog, nor from dxl assignment commands.
There is no post-edit-attribute trigger that would, for example, detect when the user started to edit a value in a column, and display some dialog with valid options for the user. - Louie |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Automatically run a script
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.