Technote (troubleshooting)
Problem(Abstract)
The IBM Rational DOORS DXL Reference manual for DOORS 9.x contains a section called "Controlling Rational DOORS from applications that support automation" (at the end of Chapter 23). The Visual Basic code samples in this section have multiple syntax errors.
Symptom
You cannot successfully run the Visual Basic (VB) code samples from the IBM Rational DOORS DXL Reference manual's "Controlling Rational DOORS from applications that support automation" section.
Cause
This issue is a result of APAR PM25011, which is resolved as of IBM Rational DOORS 9.3.0.3.
Resolving the problem
The Visual Basic (VB) code samples in the IBM Rational DOORS DXL Reference manual's "Controlling Rational DOORS from applications that support automation" section can be run from macros in the Microsoft Office products. The versions included in the DXL Reference manual have multiple errors:
- The continuation character in VB is _ (space followed by an underscore). The VB commands that span multiple lines need to use the continuation character.
- The runStr sample has multiple quote syntax errors, as well as a DXL syntax error.
- The lines with DOORS commands cannot span multiple lines, as you cannot use the VB line continuation character inside the DOORS commands.
The following versions of the code samples will work:
- First example:
/*
This is an example of an Excel macro that calls Rational DOORS, logging in as user 'John Smith' with password 'password', and sets the result message for use with oleGetResult.
*/
Sub testDoors()
Set DOORSObj = CreateObject("DOORS.Application")
SendKeys "John Smith" & "{TAB}" & "password" & _
"{ENTER}", True
DOORSObj.Result = "Just checking"
End Sub
Note that the credentials in the sample should be updated to be valid in your environment.
- runFile sample:
Sub testDoors()
Set DOORSObj = CreateObject("DOORS.Application")
SendKeys "John Smith" & "{TAB}" & "password" & _
"{ENTER}", True
DOORSObj.runFile ("c:\doors\lib\dxl\example\ddbintro.dxl")
End Sub
Note that the DOORSObj.runFile line is one long line. The credentials and path in the sample should be updated to be valid in your environment.
- runStr sample:
Sub testDoors()
Set DOORSObj = CreateObject("DOORS.Application")
SendKeys "John Smith" & "{TAB}" & "password" & _
"{ENTER}", True
DOORSObj.runStr ("current = create(""Demo"", ""Demo"", """", 1); Object o = create current Module; o.""Object Heading"" = ""From Excel via OLE""")
End Sub
Note that the DOORSObj.runStr line is one long line. The credentials in the sample should be updated to be valid in your environment.
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.