I wrote a DXL script that I run from a batch file, it receives a Module path, a Baseline and a View. After the batch command opens IBM Doors 9.6, the script supposed to go to the module path with the relevant view and load the Baseline entered.
My problem is that my script loads the current Baseline and not the one I entered. I can't find the currect command that loads the right Baseline.
This is my script:
mod = #MODULE#
xi_baseline = #BASELINE#
string mView = #VIEW#
Module m
int indexOf(string source, char c)
{
int i = 0
for (i = 0; i < length(source); i++)
{
if(source[i] == c)
{
return i
}
}
return -1
}
int pos = indexOf(xi_baseline,'.')
string bsMajor = xi_baseline[0:pos - 1] "\n"
string bsMinor = xi_baseline[pos + 1:]
Baseline b = baseline(intOf(bsMajor), intOf(bsMinor), "")
m = read(mod)
load view mView
The right Baseline I need is saved in b variable, my question is what's the right command/function I need to use in order to receive that Baseline from Doors?
You will need an intermediate ModName_ and a ModuleVersion. Assuming your input parameters are the full name of the module and the baseline given in the format as
versionStringpresents it, assuming that your baselines might have suffices, your code might look like this:Edit2: used wrong parameters for loading the view. Script should be correct now (untested)