I'm a DXL beginner. I've generated DXL using the traceability wizard. I want the suffix of the module I linked to be included in the target module name. The generated code includes this: |
Re: How to return the baseline suffix for a module?
-Louie |
Re: How to return the baseline suffix for a module? llandale - Fri Jul 06 11:09:40 EDT 2012
-Louie
Thanks for your response. I tried that, and it gave me errors. Here's the full code, mostly generated by the wizard, then edited by me.
// DXL generated by DOORS traceability wizard on 05 July 2012.
// Wizard version 2.0, DOORS version 9.3.0.0
pragma runLim, 0
void showOut(Object o, int depth) {
Link l
LinkRef lr
ModName_ otherMod = null
Module linkMod = null
ModuleVersion otherVersion = null
Object othero
string disp = null
string s = null
string ModSuffix = null
string mv = null
string plain, plainDisp
int plainTextLen
int count
bool doneOne = false
string linkModName = "*"
for l in all(o->linkModName) do {
otherVersion = targetVersion l
otherMod = module(otherVersion)
if (null otherMod || isDeleted otherMod) continue
othero = target l
if (null othero) {
load(otherVersion,false)
}
othero = target l
if (null othero) continue
if (isDeleted othero) continue
doneOne = true
if (depth == 1) {
s = name(otherMod)
mv = " [" versionString(otherVersion) "]"
// if (isBaseline(otherVersion)) {
// s = s " [" versionString(otherVersion) "]"
// }
displayRich("\\pard " mv)
s = s mv
displayRich("\\pard " s)
string ModSuffix = name(otherMod) "-" version(otherMod)
display("NameMod")
s = probeRichAttr_(othero,"Object Heading", false)
displayRich("\\pard " s)
s = probeRichAttr_(othero,"Object Number", false)
displayRich("\\pard " s)
}
}
}
showOut(obj,1)
-E- DXL: <Line:43> incorrect arguments for function (version) -E- DXL: <Line:43> incorrectly concatenated tokens -I- DXL: All done. Errors reported: 2. Warnings reported: 0.
|
Re: How to return the baseline suffix for a module? SystemAdmin - Tue Oct 23 12:27:15 EDT 2012
Thanks for your response. I tried that, and it gave me errors. Here's the full code, mostly generated by the wizard, then edited by me.
// DXL generated by DOORS traceability wizard on 05 July 2012.
// Wizard version 2.0, DOORS version 9.3.0.0
pragma runLim, 0
void showOut(Object o, int depth) {
Link l
LinkRef lr
ModName_ otherMod = null
Module linkMod = null
ModuleVersion otherVersion = null
Object othero
string disp = null
string s = null
string ModSuffix = null
string mv = null
string plain, plainDisp
int plainTextLen
int count
bool doneOne = false
string linkModName = "*"
for l in all(o->linkModName) do {
otherVersion = targetVersion l
otherMod = module(otherVersion)
if (null otherMod || isDeleted otherMod) continue
othero = target l
if (null othero) {
load(otherVersion,false)
}
othero = target l
if (null othero) continue
if (isDeleted othero) continue
doneOne = true
if (depth == 1) {
s = name(otherMod)
mv = " [" versionString(otherVersion) "]"
// if (isBaseline(otherVersion)) {
// s = s " [" versionString(otherVersion) "]"
// }
displayRich("\\pard " mv)
s = s mv
displayRich("\\pard " s)
string ModSuffix = name(otherMod) "-" version(otherMod)
display("NameMod")
s = probeRichAttr_(othero,"Object Heading", false)
displayRich("\\pard " s)
s = probeRichAttr_(othero,"Object Number", false)
displayRich("\\pard " s)
}
}
}
showOut(obj,1)
-E- DXL: <Line:43> incorrect arguments for function (version) -E- DXL: <Line:43> incorrectly concatenated tokens -I- DXL: All done. Errors reported: 2. Warnings reported: 0.
However I notice that variable 'ModSuffix' in that line is never used
I think you can remove that line entirely. There seems to be some display issues in the code; "mv" gets displayed twice. -Louie |
Re: How to return the baseline suffix for a module? llandale - Tue Oct 23 15:52:14 EDT 2012
However I notice that variable 'ModSuffix' in that line is never used
I think you can remove that line entirely. There seems to be some display issues in the code; "mv" gets displayed twice. -Louie
Louie,
// DXL generated by DOORS traceability wizard on 05 July 2012.
// Wizard version 2.0, DOORS version 9.3.0.0
pragma runLim, 0
void showOut(Object o, int depth) {
Link l
LinkRef lr
ModName_ otherMod = null
Module linkMod = null
ModuleVersion otherVersion = null
Object othero
string disp = null
string s = null
string plain, plainDisp
int plainTextLen
int count
bool doneOne = false
string linkModName = "*"
for l in all(o->linkModName) do {
otherVersion = targetVersion l
otherMod = module(otherVersion)
if (null otherMod || isDeleted otherMod) continue
othero = target l
if (null othero) {
load(otherVersion,false)
}
othero = target l
if (null othero) continue
if (isDeleted othero) continue
doneOne = true
if (depth == 1) {
string mn = name(otherMod)
string mv = "[" versionString(otherVersion) "]"
// if (isBaseline(otherVersion)) {
// s = s " [" versionString(otherVersion) "]"
// }
// displayRich("\\pard " mv)
//
// s = s mv
// displayRich("\\pard " s)
display("This is mn and mv: " mn " " mv)
string NameAndSuffix = name(otherMod) "-" version(module(otherMod))
display("Variable NameAndSuffix: " NameAndSuffix)
string oh = probeRichAttr_(othero,"Object Heading", false)
displayRich("\\pard Object Heading: " oh)
string on = probeRichAttr_(othero,"Object Number", false)
displayRich("\\pard Object Number: " on)
}
}
}
showOut(obj,1)
And the errors: -E- DXL: <Line:43> incorrect arguments for function (module) -E- DXL: <Line:43> incorrect arguments for function (version) -E- DXL: <Line:43> incorrectly concatenated tokens -I- DXL: All done. Errors reported: 3. Warnings reported: 0. It seems module() and version() return different things depending on whether the module in question is open or not, which seems crazy.
|
Re: How to return the baseline suffix for a module? SystemAdmin - Tue Oct 23 17:00:25 EDT 2012
Louie,
// DXL generated by DOORS traceability wizard on 05 July 2012.
// Wizard version 2.0, DOORS version 9.3.0.0
pragma runLim, 0
void showOut(Object o, int depth) {
Link l
LinkRef lr
ModName_ otherMod = null
Module linkMod = null
ModuleVersion otherVersion = null
Object othero
string disp = null
string s = null
string plain, plainDisp
int plainTextLen
int count
bool doneOne = false
string linkModName = "*"
for l in all(o->linkModName) do {
otherVersion = targetVersion l
otherMod = module(otherVersion)
if (null otherMod || isDeleted otherMod) continue
othero = target l
if (null othero) {
load(otherVersion,false)
}
othero = target l
if (null othero) continue
if (isDeleted othero) continue
doneOne = true
if (depth == 1) {
string mn = name(otherMod)
string mv = "[" versionString(otherVersion) "]"
// if (isBaseline(otherVersion)) {
// s = s " [" versionString(otherVersion) "]"
// }
// displayRich("\\pard " mv)
//
// s = s mv
// displayRich("\\pard " s)
display("This is mn and mv: " mn " " mv)
string NameAndSuffix = name(otherMod) "-" version(module(otherMod))
display("Variable NameAndSuffix: " NameAndSuffix)
string oh = probeRichAttr_(othero,"Object Heading", false)
displayRich("\\pard Object Heading: " oh)
string on = probeRichAttr_(othero,"Object Number", false)
displayRich("\\pard Object Number: " on)
}
}
}
showOut(obj,1)
And the errors: -E- DXL: <Line:43> incorrect arguments for function (module) -E- DXL: <Line:43> incorrect arguments for function (version) -E- DXL: <Line:43> incorrectly concatenated tokens -I- DXL: All done. Errors reported: 3. Warnings reported: 0. It seems module() and version() return different things depending on whether the module in question is open or not, which seems crazy.
I see that "versionString" (variable "mv") returns null when the link is coming from a current version of the module No. the "String" in perm "versionString" does not imply some form of "string" varient of perm "version". And even if it did you could not infer the same for other perms; I'm sure perm names are created by diverse folks in the development team and there was no coordinated policy like that. -Louie |