Search code examples
attributescolibm-doors

DXL Question: How List All Attribute Names in a Module


I have the following DXL code:

Module m = current

Column c

for c in m do{ print attrName c "\n" }

When I run it I get a listing of only the column names that are currently visible in the opened DOORS module. How can I get a listing of all column names in the module.


Solution

  • Don't confuse columns with attributes.

    Columns are related to representing information, attributes store information. And remember that there are object attributes and module attributes. That being said: The DXL reference manual has the chapter "for object attributes in module" in chapter 20 "Attributes". It says

    for object attributes in module
    Syntax
    for objAttrName in module do {
     ...
    }
    
    where:
        objAttrName is a string variable
        module is a variable of type Module
    
    Operation
    Assigns the string objAttrName to be each successive attribute that is defined for objects in module.
    
    Example
    
    string objAttrName
    for objAttrName in (current Module) do print objAttrName "\n"