I wrote the code below to list all attributes in a module:
Module m = current
for objAttrName in m do {
print objAttrName "\n"
}
However, I encountered the following error:
- DXL: <Line:2> Incorrect arguments for (do)
I want that code to list all names of the attributes that exist in the current module
Note that you need to predefine the variable over which you want to iterate so DOORS knows what yo want to get: all objects in the module (type
Object), all attribute types (typeAttrType) in the module, all attribute definitions etc.For your task, you can iterate over attribute definitions (type
AttrDef).This can be done using this loop
Edit: if you only want to iterate over all object attributes, not module attributes, you can use the the loop that you gave in the question (
for string in Module), but you also need to define the variable, so, for your case just add the linestring objAttrName