Rational Doors 9.6 interfacing with C#

浪子不回头ぞ 提交于 2020-05-27 09:41:02

问题


I am using Rational Doors 9.6 as client. I try to integrate a feature in my C# program such is using Doors C API, to open a view and get some data in memory for further using. This includes login to Doors server with windows credentials.

Actually, I have to start Doors Client, open that view, do a excel export, then do a C# import which is not quite the elegant way.

I am not Doors expert so all I need is a opinion, since API is in C and I'm not sure this is the way, or just using DXL server (or both?)

I have been used un-managed C dll's in C# in the past, so if proper declared, should be no problems.

Thanks in advance,


回答1:


The DOORS C API is a very old artifact and not usable for your purpose.

You have to use a DXL script to perform the actions inside DOORS that you want (export). To launch the script you have three options:

  • invoke the DXL script in batch mode

The most stable approach. You should write the information to a file from your DXL and read it back from your c#. All "professional" DOORS interfaces (like MDWorkbench) use this approach.

  • invoke the DXL script in "interactive batch" (see below)

See below. You need to use this if you want to automate an existing GUI DXL script. See an example here:

https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014305335&ps=25

  • invoke the DXL script over COM

For this you need to start the client in interactive mode and then connect to it over COM. For a discussion on that see here:

https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014458173&ps=25

For the export itself there are many scripts on the rational forum. The fastest way to go, is to perform a CSV export yourself. See here:

https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014627043&ps=25



来源:https://stackoverflow.com/questions/42627376/rational-doors-9-6-interfacing-with-c-sharp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!