AnsweredAssumed Answered

PDM - Getting files programatically

Question asked by Eric Snyder on Jun 27, 2018
Latest reply on Jun 27, 2018 by Craig Schultz

Using PDM, SW 2018 SP1


I have written a program to open a list of files, iterate components and then iterate features in the components and collect some data about the files. I have noticed that if I don't do a manual vault "get" of the files I am trying to open in the program then swApp.OpenDoc6 reports that it cannot find the file. Is there a way around having to do a manual get of the files I need? I need to open around 2,000 files. If I do a get I find I can only do around 50 or so at a time. It seems like the time it takes to do the get goes up exponentially as I add more files to the list I am getting.


My core code:


Dim swApp As SldWorks.SldWorks

Dim swModel As ModelDoc2

Dim filename as string = "Some file path"


swApp = New SldWorks.SldWorks               

swModel = swApp.OpenDoc6(filename, swDocumentTypes_e.swDocASSEMBLY, swOpenDocOptions_e.swOpenDocOptions_Silent, "", errors, warnings)


My file paths look something like with ENG Vault being my vault view:

C:\ENG Vault\SL24 Tools\Project 234\Project 234 tool.SLDASM

Is there perhaps a different path that I could use?