简体   繁体   English

从另一个程序打开Solidworks PDM目录

[英]Open Solidworks PDM directory from another program

I want to open/start a folder that is in Solidworks PDM from another application. 我想从其他应用程序打开/启动Solidworks PDM中的文件夹。

I'm using C# and use this code: 我正在使用C#并使用以下代码:

Process.Start(@"C:\Sandbox\Test");

The Sandbox directory is a View directory. 沙箱目录是一个View目录。 When I manually navigate to this directory it logs into the vault and view all directories as it should. 当我手动导航到该目录时,它将登录到Vault并按应查看所有目录。

When I execute the above code I just get an explorer of the directory, but without PDM functionality. 当我执行上面的代码时,我只会得到目录的浏览器,但是没有PDM功能。

Is there any way to be able to do this? 有什么办法可以做到这一点?

You can use a conisio link that is handled when the PDM client is installed. 您可以使用安装PDM客户端时处理的conisio链接。 The format of the link is like this; 链接的格式如下:

conisio://<vaultname>/<action>?projectid=<ProjectID>&documentid=<DocumentID>&objecttype=1

action being explore . 正在explore action

You'll obviously need to know the folder/project ID, but you can use any document ID that is not deleted in the system. 您显然需要知道文件夹/项目ID,但是您可以使用系统中未删除的任何文档ID。 Just pass that string to Process.Start() . 只需将该字符串传递给Process.Start()

Process.Start("conisio://Sandbox/explore?projectid=1005&documentid=7543&objecttype=1");

For reference, here are the other actions. 供参考,以下是其他操作。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM