Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
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
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Michael Sutherland, on Monday, February 3, 2003 2:32 PM

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.
 3-Feb-2003 08:59
User is offline View Users Profile Print this message


Dirk Plaschke

Posts: 103
Joined: 17-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 3-Feb-2003 13:26
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

Answer 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.

-------------------------
Michael Sutherland
michael@galactic-solutions.com
http://galactic-solutions.com
Report this to a Moderator Report this to a Moderator
 3-Feb-2003 14:37
User is offline View Users Profile Print this message


Dirk Plaschke

Posts: 103
Joined: 17-Sep-2002

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.