![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Scriptlet for determining a reference to the current baseline. Topic Summary: Created On: 3-Feb-2003 08:59 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: If you already have the baseline open and set as the current Module, it is as simple as print (version current Module) as documented in the "Module information" section of the DXL manual. Some find the concept of "current Module" tricky, but a simple rule guideline for baselines is once the "load" command is run to open the baseline, the baseline becomes current. If you have stored the Module reference that is returned by the "load" command, you can use that in place of "current Module" with the version command above. | |
![]() |
|
Hi all!
How do I examine the current baseline (major/minor) number ? The current module version is "2.4". If I open the baseline "2.0", how can I get from a script the 'current' baseline number ? There is no command like 'getCurrentBaseline()' that will returning the current Baseline reference. The function 'getMostRecebntBaseline()' only returns the LASt baseline. I've written a small function, that will returns the needed baseline reference: [..snipp..] // getCurrentBaselineInfo - Determine information about the current Baseline. // #include <e:\projects.doors\src\test\getcurrentbaseline.dxl> Baseline getCurrentBaseline() { // if current module is not a baseline, then ret0. //if (!baseline(current Module)) then return(null) // get the last history record. History h for h in (current Module) do ; if (null h) then return(null) // get the corresponding baseline. Baseline b for b in (current Module) do if (dateOf(b) >= h.date) then return(b) return(null) } Baseline b = getCurrentBaseline() if (!null b) then print "\nReturns: " (major b) "." (minor b) " " (suffix b) " - " annotation(b) "\n" [..snipp..] I don't know, if that script works in any way or even correct. It is a quick & simple hack. Is there any other solution (like a simple command)? regards, dirk. ------------------------- Dirk Plaschke |
|
![]() |
|
![]() |
|
If you already have the baseline open and set as the current Module, it is as simple as
print (version current Module) as documented in the "Module information" section of the DXL manual. Some find the concept of "current Module" tricky, but a simple rule guideline for baselines is once the "load" command is run to open the baseline, the baseline becomes current. If you have stored the Module reference that is returned by the "load" command, you can use that in place of "current Module" with the version command above. ------------------------- Michael Sutherland michael@galactic-solutions.com http://galactic-solutions.com |
|
![]() |
|
![]() |
|
Hi, Michael.
That's what I'am looking for ![]() Thank You. The concept of "current module" is ok, but in my case the module/baseline was opened manually from a user and I have to get this info from script. Dirk. ------------------------- Dirk Plaschke |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.