Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
I want to export my parts list to a .csv file and that is working.
But i want to save the .csv file to the folder: Z:\Uni_Link\Import\CSV
I have tried this with this code but I cannot get it done.
The .csv file is now always saved in the folder that also contains the .dwg in which the parts list was created.
Dim oDoc As Inventor.DrawingDocument oDoc = ThisDoc.Document path_and_name = ThisDoc.PathAndFileName(False)' without extension Dim oSheet As Inventor.Sheet 'oSheet = oDoc.Sheets(1) ' first sheet oSheet = oDoc.Sheets("Sheet:1") ' sheet by name ' say there is a Partslist on the sheet. Dim oPartslist As PartsList oPartslist = oSheet.PartsLists(1) ''set the folder to save to 'Dim sFolder As String 'sFolder = Left(sPath, InStrRev(sPath, "\")) & "Z:\Uni_Link\Import\CSV" ''check for the folder and create it if it does not exist 'If Not System.IO.Directory.Exists(sFolder) Then 'System.IO.Directory.CreateDirectory(sFolder) 'End If ' export the Partslist to Excel. oPartslist.Export(path_and_name & ".csv", PartsListFileFormatEnum.kTextFileCommaDelimited, oOptions)
Mvg Jos
Youre drawings are as good as the symbols that compleet them.....
Youre drawings are as good as the symbols that compleet them.....
Solved! Go to Solution.