DXL EVAL_ command

Does anyone have any experience with EVAL_ ? I was told that it could be used, from within a DXL script, to run another DXl script.

Any help is greatly apreciated.

David Schwartz
SystemAdmin - Fri Aug 14 13:51:34 EDT 2009

Re: DXL EVAL_ command
pete.kowalski - Thu Nov 05 12:17:51 EST 2009

I have experience. What would you like to learn more?

Re: DXL EVAL_ command
llandale - Fri Nov 06 14:36:59 EST 2009

Its clumsy.

You have to build the DXL script to run. You can only pass 'string' parameters to it, which are converted to actual strings. The context appears to be like batch mode; many things are not loaded. To pass in such things as the 'current module', you must pass in the fullname and have the code open the module. Slashes need to be escaped. Escapes have to be escaped. Double Quotes have to be escaped.

So far, the only use I've found is for functions that make use of higher level DOORS versions things, that need to at least run in lower versions. e.g. "AttrDef ad; ad.description" will cause DXL errors in v8 since 'description' doesn't exist in those version. You can eval_ that, trap the errors, and keep going.

Following simply dumps the obj-attr value of the current object. Yuuuuuck.


Module mCurr = current Object oCurr = current   string NameMod = fullName(mCurr) string IdObj   = identifier(oCurr)   string NameAttr = 
"Requirement"   string DxlCode = 
"  Module mod = read(\"" NameMod 
"\", false) Object obj string ID 

for obj in entire mod 

do 
{  ID = identifier(obj) 

if (ID == \
"" IdObj 
"\") break 
} bool  IsReq = probeAttr_(obj, \
"" NameAttr 
"\") == \"True\"   print    \
"In EvalCode, obj/IsReq = \" ID \"\\t\" IsReq \"\\n\" infoBox( \
"In EvalCode, obj/IsReq = \" ID \"\\t\" IsReq \"\") 
"      // end DxlCode   print 
"In Main, DxlCode = \n*********\n" DxlCode 
"\n********\n" string ErrMess = checkDXL(DxlCode) 

if (!

null ErrMess) print ErrMess 

else eval_(DxlCode)


>Louie