Custom CSV table "ReferencedDocumentDescriptor" broken
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have an iLogic script that is creating cutlists for an old piece of equipment we use in the shop. The software on this equipment reads the cutlist as a CSV file, and we bring this CSV file into the drawing as a custom table. We recently updated to 2021 Inventor and one of my colleagues was the first to make a new drawing with these CSV files and encountered a fatal error.
I have the follow iLogic rule that gives an example of the error:
Dim oDrawDoc As DrawingDocument = ThisApplication.ActiveDocument
Dim oActiveSheet As Sheet = oDrawDoc.ActiveSheet
Dim oPoint As Point2d = ThisApplication.TransientGeometry.CreatePoint2d(25, 25)
Dim oExcelTable As CustomTable = oActiveSheet.CustomTables.AddExcelTable("YourTestFilePath.xlsx", oPoint, "Excel Table")
Logger.Trace(CType(oExcelTable.ReferencedDocumentDescriptor.Type, ObjectTypeEnum).ToString)
Dim oExcelTable2 As CustomTable = oActiveSheet.CustomTables.AddCSVTable("YourTestFilePath.csv", oPoint, "CSV Table")
'Error ocurs calling this line:
Logger.Trace(CType(oExcelTable2.ReferencedDocumentDescriptor.Type, ObjectTypeEnum).ToString)
Replace the String: "YourTestFilePath" with a test file saved as both a CSV and XLSX files to test.
Upon trying to access the "ReferencedDocumentDescriptor" of the newly created CSV table, a Fatal Error Occurs.
I get the same results when in Excel Engine Option: COM & Internal
Also Inventor seems to be reading the CSV table straight [as in printing the equation not the result], which is also a new behavior, and behaves the same in both Excel Engine Options: COM & Internal
As a work around I will have to export 2 files, CSV for the shop equipment and XLSX for our drawings... I would prefer to only have 1 file to manage...
Is this a bug that can be fixed, or has Inventor abandoned CSV files?