I have a program that will cycle through a given directory and create drawings for all parts in that given directory. I am wondering if anyone can help me modify that to cycle through configurations instead of cycling through a directory. I am a beginner programmer who has learned by seeing other codes and then modifying mine with bits and pieces of other stuff, but I haven't found anything on configurations. I can manually enter the configuration name and get that to save as a drawing, but I have to do drawings for thousands of parts and don't want to manually enter thousands of configuration names.
Here is the code that I have that looks into the directory to get the parts.
Dim MyDir As New DirectoryInfo("C:\Documents and Settings\user\Desktop\test")
If MyDir.Exists Then
Dim MyFile As FileInfo = Nothing
Dim AllParts() As FileInfo AllParts = MyDir.GetFiles(
"*.sldprt")
For Each MyFile In AllParts
Dim errors As Integer = 0
Dim warnings As Integer = 0
'open the part
swPart = swApp.OpenDoc6(MyFile.FullName, swDocumentTypes_e.swDocPART, swOpenDocOptions_e.swOpenDocOptions_Silent,
"", errors, warnings)
'create drawing
swDoc = swApp.NewDocument(
"C:\Documents and Settings\All Users\Application Data\SolidWorks\SolidWorks 2009\t" & _
"emplates\Drawing.drwdot", 2, 0.2794, 0.4318)
SolidworksApi macros