I created a module that looks like a table of contents and the requirements from all other modules are linked to their appropriate headings. Those reqts have inlinks from hw and sw lower level specs. I did a 2 order recursive trace set to display all in one column and modified the text below to display different and pull more attributes. This is only the portion i modified, i expect the above and below dxl in doors is standard for a 2 order trace. i can include if needed. I want to put the 'verification' text after the hw and sw requirements but when i move that line it no longer shows up in the column. i also want to put [] around the IDs of the hw and sw reqts when they are present. the display text before the object ID of the main requirement would be something like 'Requirement ID: " and the hw sw block would be "Supporting Items: ". If i put either of those in front of the "object identifier" attribute i pulled it puts that info in both sections and leaves me no option to have two different formats. Can my idea work so that a certain ID gets one label and the 2order trace gets antoehr format and label? thanks.
for l in all(o<-linkModName) do {
otherVersion = sourceVersion l
otherMod = module(otherVersion)
if (null otherMod || isDeleted otherMod) continue
othero = source l
if (null othero) {
load(otherVersion,false)
}
othero = source l
if (null othero) continue
if (isDeleted othero) continue
doneOne = true
{
string status = probeRichAttr_(othero,"Status", false)
if(status!="Deleted")
{ displayRich tempStringOf applyTextFormattingToParagraph(lineBuff, false, (depth-1) * indentStep, 0)
disp = ""
s = probeRichAttr_(othero,"Object Identifier", false)
disp = disp "{\\b$Requirement ID: }" s "\n"
s = probeRichAttr_(othero,"Object Text", false)
disp = disp s
s = probeRichAttr_(othero,"PS Requirement ID", false)
if(s!=""){disp = disp "{\\b\nPS ID: }" s}
s = probeRichAttr_(othero,"PS Requirement Title", false)
if(s!=""){disp = disp "{\\b\nPS Requirement: }" s}
s = probeRichAttr_(othero,"Category", false)
if(s!=""){disp = disp "{\\b\nType: }" s}
s = probeRichAttr_(othero,"Weight", false)
if(s!=""){disp = disp "{\\b\nWeight: }" s}
s = probeRichAttr_(othero,"Contractor Verification", false)
if(s!=""){disp = disp "{\\b\nContractor Verification:\n}" s}
s = indentAllParagraphs(disp, false, (depth-1) * indentStep)
displayRich s
}
}
lines[depth-1]++
if ( depth < 2 ) {
showIn(othero, depth+1)
}
}
bmohamed - Mon Nov 10 00:36:24 EST 2014 |
Re: dxl 2 order recursive trace display issue To use different formats for your concatenated rich text values you should put curly braces {} around the single parts, so that any formatting option is only valid for the single information, e.g.
s = probeRichAttr_(othero,"Weight", false)
if(s!=""){ disp = disp "{\\b\nWeight: " s "}" }
To put a line break between the paragraphs, you can put a \\pard at the beginning to reset your formating and a \\par to the end of the paragraph. Hope this helps, regards, Mathias |
Re: dxl 2 order recursive trace display issue Mathias Mamsch - Tue Nov 11 03:39:49 EST 2014 To use different formats for your concatenated rich text values you should put curly braces {} around the single parts, so that any formatting option is only valid for the single information, e.g.
s = probeRichAttr_(othero,"Weight", false)
if(s!=""){ disp = disp "{\\b\nWeight: " s "}" }
To put a line break between the paragraphs, you can put a \\pard at the beginning to reset your formating and a \\par to the end of the paragraph. Hope this helps, regards, Mathias That helped a LOT actually. One thing I dont understand is where the 'object identifier' is of the 2nd level trace that i can modify. When this dxl pulls Identifier, it pulls it once and it applies it to both traces. I want to treat them separate but dont see how to apply the second one. Even with curly brackets, when i do something to line 19 above, it changes ID on the main one and it also does the same thing on the hw/sw reqts that are in the 2nd part of the recursive trace. by the way, the following code(\\n, \\pard, \\par) all creates hard returns in Word in the form of 'paragraph mark', 'paragraph character'...how do i do a soft return or what word calls a 'manual line break' done by shift+enter in Word? |
Re: dxl 2 order recursive trace display issue bmohamed - Tue Nov 11 09:56:54 EST 2014 That helped a LOT actually. One thing I dont understand is where the 'object identifier' is of the 2nd level trace that i can modify. When this dxl pulls Identifier, it pulls it once and it applies it to both traces. I want to treat them separate but dont see how to apply the second one. Even with curly brackets, when i do something to line 19 above, it changes ID on the main one and it also does the same thing on the hw/sw reqts that are in the 2nd part of the recursive trace. by the way, the following code(\\n, \\pard, \\par) all creates hard returns in Word in the form of 'paragraph mark', 'paragraph character'...how do i do a soft return or what word calls a 'manual line break' done by shift+enter in Word? Since this is a recursive function, obviously the code is applied to all trace levels. What you should do is use the "levels" variable or maybe even the module name, folder, etc. as a differentiation for the information to display, e.g.:
if (level == 1) {
display ...
} else {
display ...
}
The RTF for a line feed (manual line break) in rtf is \line so you need to insert "\\line". See also the RTF Specification 1.0 Regards, Mathias |
Re: dxl 2 order recursive trace display issue Mathias Mamsch - Tue Nov 11 10:51:19 EST 2014 Since this is a recursive function, obviously the code is applied to all trace levels. What you should do is use the "levels" variable or maybe even the module name, folder, etc. as a differentiation for the information to display, e.g.:
if (level == 1) {
display ...
} else {
display ...
}
The RTF for a line feed (manual line break) in rtf is \line so you need to insert "\\line". See also the RTF Specification 1.0 Regards, Mathias When make this change, layout DXL no longer shows the attribute labels at all. did i place \\line incorrectly? I tried both before and after the \\b and i tried "{\\line}" before the first curly bracket.
s = probeRichAttr_(othero,"PS Requirement Title", false)
if(s!=""){disp = disp "{\\line\\bPS Requirement: }" s}
s = probeRichAttr_(othero,"Category", false)
if(s!=""){disp = disp "{\\line\\bType: }" s}
s = probeRichAttr_(othero,"Weight", false)
if(s!=""){disp = disp "{\\line\\bWeight: }" s}
I havent tried the statement you suggested yet. Thanks again by the way. |
Re: dxl 2 order recursive trace display issue bmohamed - Tue Nov 11 13:24:21 EST 2014 When make this change, layout DXL no longer shows the attribute labels at all. did i place \\line incorrectly? I tried both before and after the \\b and i tried "{\\line}" before the first curly bracket.
s = probeRichAttr_(othero,"PS Requirement Title", false)
if(s!=""){disp = disp "{\\line\\bPS Requirement: }" s}
s = probeRichAttr_(othero,"Category", false)
if(s!=""){disp = disp "{\\line\\bType: }" s}
s = probeRichAttr_(othero,"Weight", false)
if(s!=""){disp = disp "{\\line\\bWeight: }" s}
I havent tried the statement you suggested yet. Thanks again by the way. You need to have an RTF delimiter after a control word (backslash, space, group start) ... so if you do \\b followed by text you need to put a space inbetween. The space will not be rendered ... Regards, Mathias |
Re: dxl 2 order recursive trace display issue Mathias Mamsch - Tue Nov 11 15:36:36 EST 2014 You need to have an RTF delimiter after a control word (backslash, space, group start) ... so if you do \\b followed by text you need to put a space inbetween. The space will not be rendered ... Regards, Mathias Ok that did it! Thanks. I tried the if (level == 1) { display ...} else { display ...} and it didnt work. 'level' gave 'incorrect arguement for..' errors and when i change it to 'depth' it wiped out almost all the results. I suppose I have to keep at with that if statement. Thanks again. |
Re: dxl 2 order recursive trace display issue bmohamed - Tue Nov 11 15:57:18 EST 2014 Ok that did it! Thanks. I tried the if (level == 1) { display ...} else { display ...} and it didnt work. 'level' gave 'incorrect arguement for..' errors and when i change it to 'depth' it wiped out almost all the results. I suppose I have to keep at with that if statement. Thanks again. Do not do try and error on this one ... You need to actually take time and understand the code ... I just wanted to say, that you can control using the information that is displayed for each level using a suitable if statement. I did not actually try it myself. Which IF exactly you need you need to determine yourself ;-) Regards, Mathias |