How to edit system attributes with DXL?
Hello,
I have imported a document that follows an unconventional numbering system that has skipped some numbers, i.e. 1,2,4,5,7. DOORs gives them the incorrect 'Object Level' and 'Object Number', which I would like to correct to be consistent with my document.
My script allows the above attributes to be found and printed out; however, I do not know how to edit them.
While looking in DOORS/9.7/lib/dxl/utils/attrutil.inc (and looking at Casting String to Char and What is NLS_ mean and what it does?) I did not find how to set a system attribute, and it also made me ask, what does NLS_ do?
Below is a snippet of my DXL script:
for o_vts in m_VTS do
{
int i_num = o_vts."Absolute Number"
if(i_num == 666 )
{
string NameAttr = "Object Level" // Change to your Attribute Name
string Value = probeAttr_(o_vts, NameAttr)
// string v_out = "" o_vts->"Object Level"
print Value "\n"
// level o_vts(NLS_("") = 9
print level o_vts(NLS_(""))
//o_vts."Object Level" = 9
break
}
}
Thank You
Accepted answer
Object Number and Object Level are not actually attributes, despite what parts of the client GUI may suggest. So they cannot be set.
They are not stored, instead they are calculated when required.
NLS_() is used for translation. It is not intended for general use.
One other answer
I think the key issue is finding the correct DXL method for modifying system attributes rather than simply reading their current values. It may also be useful to check the DOORS 9.7 documentation for restrictions on changing Object Level and Object Number, since these attributes may be handled differently from ordinary user-defined attributes.