我想从另一个应用程序打开/启动Solidworks PDM中的文件夹。
我正在使用C#,并使用以下代码:
Process.Start(@"C:\Sandbox\Test");Sandbox目录是一个View目录。当我手动导航到此目录时,它会登录到vault并按需查看所有目录。
当我执行上面的代码时,我只得到了一个目录的资源管理器,但没有PDM功能。
有没有办法做到这一点?
发布于 2019-01-12 10:29:39
您可以使用在安装PDM客户端时处理的conisio链接。链接的格式如下;
conisio://<vaultname>/<action>?projectid=<ProjectID>&documentid=<DocumentID>&objecttype=1
action是explore。
您显然需要知道文件夹/项目ID,但您可以使用系统中未删除的任何文档ID。只需将该字符串传递给Process.Start()。
Process.Start("conisio://Sandbox/explore?projectid=1005&documentid=7543&objecttype=1");
作为参考,以下是其他操作。
Where: <vaultname> is the name of the file vault <ProjectID> is the database ProjectID of the folder where the file is located in the vault <DocumentID> is the database DocumentID of the file <action> is one of the following: open – Opens the file in associated application view – Opens the configured “Viewer” application for the file explore – Opens an explorer window in the folder the file resides and selects the file get – Triggers a Get of the file to the local file vault view lock – Checks out the file properties – Brings up the file properties history – Brings up the file history
https://stackoverflow.com/questions/54146079
复制相似问题