Normally you cannot change the type of an attribute but you can change a DXL Attribute to text, thereby preserving the calculated values, using the DOORS standard attribute GUI by just removing the tick. Does anyone know how to execute the same operation in DXL? |
Re: Convert a DXL Attribute to Text See DXL manual chapter "Attributes"; section "modify(attribute definition)"; functionn "modify(attribute definition)" Try this:
It knows it's not an Attr-DXL if there is null Attr-DXL Code. -Louie |
Re: Convert a DXL Attribute to Text llandale - Tue Aug 14 13:36:00 EDT 2012
It knows it's not an Attr-DXL if there is null Attr-DXL Code. -Louie
Hello,
Baseline b = baselineInfo(m)
if(!null b)
{//do something only to current}
else{//do nothing if baselined}
|
Re: Convert a DXL Attribute to Text SystemAdmin - Wed Aug 15 17:05:30 EDT 2012
Hello,
Baseline b = baselineInfo(m)
if(!null b)
{//do something only to current}
else{//do nothing if baselined}
typo sorry!!
Baseline b = baselineInfo(m)
if(null b)
{//do something only to current}
else{//do nothing if baselined}
|
Re: Convert a DXL Attribute to Text llandale - Tue Aug 14 13:36:00 EDT 2012
It knows it's not an Attr-DXL if there is null Attr-DXL Code. -Louie
-Louie This perhaps is a reasonable basis for preserving AttrDXL values before baselining. Let me think out loud...
I guess that still has the problem that the attr-DXL is still in the baseline and also still in the various views; but the new text attribute is not. Getting rather carried away, the DXL itself could determine if it is running in a baseline, and if so just display the preserved value from the Text attribute corresponding to the baseline (if it exists); otherwise calculate it normally. |
Re: Convert a DXL Attribute to Text llandale - Thu Aug 16 12:03:56 EDT 2012
-Louie This perhaps is a reasonable basis for preserving AttrDXL values before baselining. Let me think out loud...
I guess that still has the problem that the attr-DXL is still in the baseline and also still in the various views; but the new text attribute is not. Getting rather carried away, the DXL itself could determine if it is running in a baseline, and if so just display the preserved value from the Text attribute corresponding to the baseline (if it exists); otherwise calculate it normally.
Thus each Baseline has the latest version of the attr-DXL. The Baselined attr need not appear in a view, but it can. |
Re: Convert a DXL Attribute to Text llandale - Tue Aug 14 13:36:00 EDT 2012
It knows it's not an Attr-DXL if there is null Attr-DXL Code. -Louie Yes your response was pretty much spot on; and after you pointed it ou I had a doh! moment thinking back to how many times I had inadvertantly deleted the DXL code ..... The reason to do this in the first place was when transferring modules from company to company - when the attribute DXL is saved on the source company DOORS server - and of course the target company has no access to this but it could equally apply to baselines as you and James pointed out. Many thanks. I ended up using something like this // check the links are refreshed by opening incoming and outgoing links for all module objects // refresh the DXL by setting to null (I understand IBM have finally fixed the DXL thrashing on this) // reset DXL attributes to non DXL using ( variables defined of course ) for ad in currentModule do { if (ad.dxl) { // check that the user has access to modify if ( ( canCreateDef ad ) && ( canControlDef ad ) ) { strAttrName = ad.name ad = modify(ad, setDXL, nullStringValue) print "Changed DXL Attribute '" strAttrName "' to text.\n" } } } // end for ad |
Re: Convert a DXL Attribute to Text GordonWoods - Thu Aug 23 11:58:19 EDT 2012 -Louie |