Do you have a DOORS DXL script that can move objects to other locations within the same module if the location is spectified in the object attribute?
![](http://jazz.net/_images/myphoto/bca00d116475c20da183dfa4dfb8683c.jpg)
One answer
![](http://jazz.net/_images/myphoto/bca00d116475c20da183dfa4dfb8683c.jpg)
Hi Greg,
You could use something like this. New objects are deemed to be those with a non-null value in the attribute containing the target object. So to avoid unwanted moving, objects which exist before the import will need to have it set to null before running.
// If an object has a value in the attribute specified in "targetAttrName" it will
// be moved to the Object whos Absolute Number corresponds to that value
// Exact target location can be changed by altering "move(o, targetObj)"
// Current move behaviour makes moved objects the last child of the specified target
Module m = current
Object o, targetObj
int targetObjAbsNo
string targetAttrName = "trg"
for o in entire m do {
targetObjAbsNo = null
targetObjAbsNo = o.targetAttrName
if (!null targetObjAbsNo) {
targetObj = object (targetObjAbsNo, m)
move(o, targetObj)
o.targetAttrName = null
}
}
Regards,
Stuart.