I want to open/start a folder that is in Solidworks PDM from another application.
I'm using C# and use this code:
Process.Start(@"C:\Sandbox\Test");
The Sandbox directory is a View directory. When I manually navigate to this directory it logs into the vault and view all directories as it should.
When I execute the above code I just get an explorer of the directory, but without PDM functionality.
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. The format of the link is like this;
conisio://<vaultname>/<action>?projectid=<ProjectID>&documentid=<DocumentID>&objecttype=1
action
being explore
.
You'll obviously need to know the folder/project ID, but you can use any document ID that is not deleted in the system. Just pass that string to 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