I have a layout dxl column that displays info pulled in from another module based on OBJ_ID stored in the current module. However, the code would fail when the OBJ_ID is that of a object that has been deleted. Anyway to check to see if the object is deleted? |
Re: check if object is deleted I would suggest that you create links instead, then you can use the wizard to display information in a layout column. Tony |
Re: check if object is deleted Tony_Goodman - Fri Dec 03 04:30:30 EST 2010 Thanks for the recommendation. However, that's not an option for me. I was hoping that it's just my lack of DXL expertise that I couldn't figure out how to check if an object is deleted and DXL experts in this forum would be able to help. Thanks! |
Re: check if object is deleted DOORS_USER - Fri Dec 03 08:59:04 EST 2010
Thanks all for taking the time to read this. Looks like a simple null object check was all I needed.
if (null oTarget) //check is object is deleted
display("DELETED")
else
display(oTarget."OTHER_MOD_INFO")
|
Re: check if object is deleted
That 'object' search command is inferior in that it only finds objects that are currently displayed. If you need to use it to get a handle on a deleted object then you are going to have to tweak the 'display' of that open invisible module. current = mTargetMod filtering off outlining off showTables on level(0) showDeletedObjects(true) refresh mTargetMod
bool Found = false
int iAbsNo = intOf(obj."OBJ_ID" "")
for oTarget in entire mTargetMod do
{ if (identifier(oTarget) == iAbsNo) {Found = true; break}
}
if (Found) then use oTarget...
|