本文介绍了Rational Doors 9.6与C#的接口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Rational Doors 9.6作为客户端.我试图在我的C#程序中集成一个功能,例如使用Doors C API,以打开视图并获取内存中的一些数据以备将来使用.这包括使用Windows凭据登录Doors服务器.

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.

实际上,我必须启动Doors Client,打开该视图,执行excel导出,然后执行C#导入,这不是很优雅的方法.

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.

我不是Doors专家,所以我只需要发表意见,因为API使用C语言,并且我不确定这是采用这种方式,还是仅使用DXL服务器(或同时使用这两种方式?)

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?)

我过去曾在C#中使用非托管C dll,因此,如果正确声明,应该没有问题.

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

谢谢,

推荐答案

DOORS C API是一个非常古老的工件,不能用于您的目的.

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

您必须使用DXL脚本在DOORS内部执行所需的操作(导出).要启动脚本,您有三个选择:

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:

  • 以批处理模式调用DXL脚本

最稳定的方法.您应该将信息从DXL中写入文件,然后从c#中读回.所有专业" DOORS接口(如MDWorkbench)都使用这种方法.

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.

  • 以交互式批处理"调用DXL脚本(见下文)

请参阅下文.如果要自动化现有的GUI DXL脚本,则需要使用此功能.在此处查看示例:

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

  • 通过COM调用DXL脚本

为此,您需要以交互方式启动客户端,然后通过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

对于导出本身,理性论坛上有许多脚本.最快的方法是自己执行CSV导出.看到这里:

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

这篇关于Rational Doors 9.6与C#的接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 20:19