// get the file object
IEdmFile5 file = vault2.GetFileFromPath(Result.Path, out srcFolder);
// check out the file
file.LockFile(srcFolder.ID, 0, (int)EdmLockFlag.EdmLock_Simple);
I'm trying to open the file though. What is the proper way? It won't allow me to do Process.Start(Result.Path); any recommendations?
Depends on what program you have installed on the computer (SolidWorks, eDrawings, ?).
I'm trying to call an existing .exe program file I already have stored in EPDM.
For a side note, it would also be helpful to know solidworks and eDrawings if you had a second. But for this instance, I am interested in the .exe file.
Any ideas what I'm doing wrong?
Figured it out. There are different options for the hyperlink method which can be used in the C# API. see below
//Search for all text files in the vault
IEdmSearch5 Search = default(IEdmSearch5);
Search = (IEdmSearch5)vault2.CreateUtility(EdmUtility.EdmUtil_Search);
Search.FileName = "TemplatesCode.exe";
IEdmSearchResult5 Result = default(IEdmSearchResult5);
EdmSelItem2 SelItem = new EdmSelItem2();
Result = Search.GetFirstResult();
SelItem.mlID = Result.ID;
SelItem.mlParentID = Result.ParentFolderID;
string filepath = "Conisio://" + vault2.Name + "/open?projectid=" + SelItem.mlParentID + "&documentid=" + SelItem.mlID + "&objecttype=1";
if (Result != null)
//conisio://ACME1/get?projectid=71&documentid=126&objecttype=1&version=5 - gets a version of the file
//Conisio://MyVault/explore?projectid=127&documentid=14&objecttype=1 - browses to specified file
//options for the action where above says /get? and /explore?
//open – Open in primary application(such as SOLIDWORKS for .sldprt files)
//view – Opens the file in its “Viewer” application(like eDrawings for .sldprt files)
//explore – Opens an explorer window to the appropriate folder and selects the file
//get – Triggers a "Get" of the file to the local file vault view
//lock – Checks out the file(if the user has adequate permissions to do so)
//properties – Brings up the file properties
//history – Brings up the file history