When building a layout dxl via the Analysis Wizard, the objects pulled from the links are listed in the order of the Absolute Number instead of the displayed order in the objects home module. Does any one know how to display the results of the analysis wizard in display order rather than default of ID number? If someone knows how to display the results on the Object Number instead of Absolute number, that would work too. LMarkLewis - Mon Feb 29 10:25:08 EST 2016 |
Re: Analysis Wizard Display Sort You have to modify the layout dxl to put contents into a skip list that auto-sorts. Then display the results of the skip list. |
Re: Analysis Wizard Display Sort tinker_n_time - Mon Feb 29 11:04:25 EST 2016 You have to modify the layout dxl to put contents into a skip list that auto-sorts. Then display the results of the skip list. Yep, I'm working on the skip list now, thanks. |
Re: Analysis Wizard Display Sort LMarkLewis - Mon Feb 29 11:06:03 EST 2016 Yep, I'm working on the skip list now, thanks. I'm going to attempt to order on Object Number, I'll let you know how it goes....
|
Re: Analysis Wizard Display Sort LMarkLewis - Mon Feb 29 11:07:04 EST 2016 I'm going to attempt to order on Object Number, I'll let you know how it goes....
You might find sorting on Object Number to be problematic since Object Number will not sort in lexicographical order in some cases. |
Re: Analysis Wizard Display Sort tinker_n_time - Mon Feb 29 11:09:47 EST 2016 You might find sorting on Object Number to be problematic since Object Number will not sort in lexicographical order in some cases. I was worried about that. Do you have any suggestion how to sort on the displayed order other than making a new attribute (which would be a maintenance problem....)? Getting ready to try my script.... |
Re: Analysis Wizard Display Sort Yep, I got an error on the following line:
orderString = (othero,"Object Number") |
Re: Analysis Wizard Display Sort tinker_n_time - Mon Feb 29 11:04:25 EST 2016 You have to modify the layout dxl to put contents into a skip list that auto-sorts. Then display the results of the skip list. I got it to run with the following, but did not put it in Object Number order:
// get string to sort on |
Re: Analysis Wizard Display Sort tinker_n_time - Mon Feb 29 11:09:47 EST 2016 You might find sorting on Object Number to be problematic since Object Number will not sort in lexicographical order in some cases. Well, this runs, but it still does not put it in Object Number order. Still putting it in absolute number. Any ideas see below: // DXL generated by DOORS traceability wizard on 26 August 2014. // Wizard version 2.0, DOORS version 9.3.0.5 //Modified to sort the display
// Skip list is used to collect and sort output for display Skip dispList = createString // these have been made global string disp = null string s = null pragma runLim, 0 void showIn(Object o, int depth) { Link l LinkRef lr ModName_ otherMod = null Module linkMod = null ModuleVersion otherVersion = null Object othero string plain, plainDisp int plainTextLen int count bool doneOne = false // string variable used as index in skip list string orderString = "" Item linkModItem = itemFromID("0000212c") if (null linkModItem) { displayRich("\\pard " "<<Link module not found>>") } else if (type(linkModItem) != "Link") { displayRich("\\pard " "<<Invalid link module index for this database>>") } else { string linkModName = fullName(linkModItem) for lr in all(o<-linkModName) do { otherMod = module (sourceVersion lr) if (!null otherMod) { if ((!isDeleted otherMod) && (null data(sourceVersion lr))) { load((sourceVersion lr),false) } } } 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 if (depth == 1) { s = probeRichAttr_(othero,"SSSN #", false) if (s == "") displayRich("\\pard " " ") else displayRich("\\pard " s) s = probeRichAttr_(othero,"Steps", false) if (s == "") displayRich("\\pard " " ") else displayRich("\\pard " s) s = probeRichAttr_(othero,"Ref Task", false) if (s == "") displayRich("\\pard " " ") else displayRich("\\pard " s)
s = probeRichAttr_(othero,"Object Short Text", false) if (s == "") displayRich("\\pard " " -------------------------------------------------- ") else displayRich("\\pard " s) disp = disp s
s = probeRichAttr_(othero,"Object Number", false)
disp = disp " " s // get string to sort on orderString = (number othero) // put the output into the skip - we will display it later put(dispList,orderString, disp)
} } } } showIn(obj,1) // display the output from the skip list disp = "" for s in dispList do { disp = disp s "\n" } displayRich disp delete(dispList) |
Re: Analysis Wizard Display Sort Since you haven't mastered skip listed yet there is an alternate way to sort.
You populate an array with your strings, then you use sort on the array |
Re: Analysis Wizard Display Sort tinker_n_time - Mon Feb 29 12:46:36 EST 2016 Since you haven't mastered skip listed yet there is an alternate way to sort.
You populate an array with your strings, then you use sort on the array Thanks for the suggestion. None of the data being pulled can be sorted upon, it has to be listed in the order it appears in the other module. I will play with it. The easy but (bad practice way) is to take each of the instances where ordering by the Object Id is an issue and recreate each of those as new objects and in the order they appear. classic work around. It is a low percentage of impact, so the work around may be feasible. |
Re: Analysis Wizard Display Sort LMarkLewis - Mon Feb 29 12:56:33 EST 2016 Thanks for the suggestion. None of the data being pulled can be sorted upon, it has to be listed in the order it appears in the other module. I will play with it. The easy but (bad practice way) is to take each of the instances where ordering by the Object Id is an issue and recreate each of those as new objects and in the order they appear. classic work around. It is a low percentage of impact, so the work around may be feasible. You might eventually come to realize that what you call ordering by Object ID is in reality a false impression. You will soon realize that layout DXL with links serves up the data based on the order that the link is created.
|
Re: Analysis Wizard Display Sort tinker_n_time - Mon Feb 29 14:56:46 EST 2016 You might eventually come to realize that what you call ordering by Object ID is in reality a false impression. You will soon realize that layout DXL with links serves up the data based on the order that the link is created.
would be great if that were true, however my linking script, deletes all links then rebuilds them so they should be in correct order, however the results come out in the order of the absolute numbers. It may create the link based on the order of the absolute numbers, either case is the same result. |
Re: Analysis Wizard Display Sort LMarkLewis - Mon Feb 29 15:03:23 EST 2016 would be great if that were true, however my linking script, deletes all links then rebuilds them so they should be in correct order, however the results come out in the order of the absolute numbers. It may create the link based on the order of the absolute numbers, either case is the same result. Now that is funny -- you made me laugh. You remind me of the builders of Hubble telescope that used there manufacturing jig as part of the test jig -- so that they repeated their own built in errors and left Hubble farsighted. You got to admit that is funny.
|