Save iProperty info to Excel from dwg files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all.
I've created an array list of all dwg files in a directory structure and wish to iterate through each of them and send the part number, description, revision and creation date iProperties through to the excel sheet. Everything is fine except for the reading and writing of the iProperties. The code I have is as noted below and fails stating the following
iProperties:The document named "C:\Users\Public\Documents\Dropbox\design work\SAB\01-Design\00-Product Codes\01-RB1.8\02-Design\01-RB1.8.dwg" was not found.
Thanks for any help
Dim oDrawingNumbers() As String = System.IO.Directory.GetFiles(oPath, "*.dwg", System.IO.SearchOption.AllDirectories) For Each Drawing As String In oDrawingNumbers If (InStr(1, Drawing, "OldVersion")) Then 'Do nothing with this file as it is in the OldVersions Folder Else 'This is a live drawing GoExcel.CellValue("A" & oRow) = iProperties.Value(Drawing, "Project", "Description") GoExcel.CellValue("B" & oRow) = iProperties.Value(Drawing,"Project", "Description") GoExcel.CellValue("C" & oRow) = iProperties.Value(Drawing, "Project", "Revision") GoExcel.CellValue("D" & oRow) = iProperties.Value(Drawing,"Project", "Creation Date") oRow = oRow+1 End If Next
Link copied