I want to access DOORS content using python. I have read this answer , but it did not give clear instructions.
I want to access DOORS content using python. I have read this answer , but it did not give clear instructions.
The general information you can get from the link is: "there is no direct way to get information about DOORS content using Python". The only reliable way to get information from DOORS is by writing and starting a DXL script.
You might want to start this DXL script from "outside", e.g. using Python and after it is finished you can get the result from that script. This post sums it up quite well: Rational Doors 9.6 interfacing with C# (C# is interchangeable with any other language here).
Your python program will possibly contain something like
import subprocess
subprocess.call([r'C:\Program Files\ibm\Rational\DOORS\9.6\bin\doors.exe', '-dxl', r'C:\Users\Hazem\Desktop\DOORSScript\Doors2xml.dxl', '-user', 'Hazem', '-password', 'test'])
While your DXL file might create e.g. an .XML or .CSV file at a predefined location and then your script will read the content of this file and do whatever you want to do with it (you could also catch the script's STDOUT, but that ususally brings more problems).
You can pass parameters to a DXL script using environment variables, in DXL there is a perm string getenv (string var) to get these.