Custom CSV table "ReferencedDocumentDescriptor" broken

Custom CSV table "ReferencedDocumentDescriptor" broken

J-Camper
Advisor Advisor
720 Views
8 Replies
Message 1 of 9

Custom CSV table "ReferencedDocumentDescriptor" broken

J-Camper
Advisor
Advisor

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?

 

0 Likes
721 Views
8 Replies
Replies (8)
Message 2 of 9

J-Camper
Advisor
Advisor

I meant to post this in the Inventor Customization Forum.  Can someone move it for me?

0 Likes
Message 3 of 9

Ralf_Krieg
Advisor
Advisor

Hello

 

Are you really sure your path to CSV is correct? I can only reproduce this behaviour if I use a filename/path to a file that doesn't exist.


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
Message 4 of 9

J-Camper
Advisor
Advisor

Yes, I'm sure it is the correct path:

both files existboth files existboth paths are correctboth paths are correcterror trying to access ReferencedDocumentDescriptor for CSV Table onlyerror trying to access ReferencedDocumentDescriptor for CSV Table only

Are you testing in 2021 Inventor [Build: 289, Release: 2021.2.2 - Date: Wed 02/24/2021]

0 Likes
Message 5 of 9

Ralf_Krieg
Advisor
Advisor

Hello

 

No, I tested it with Inventor 2021.3.


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
Message 6 of 9

J-Camper
Advisor
Advisor

Oh I see 2021.3 update showed up in my Desktop manager sometime last night.  I will update and see if that fixes it.

0 Likes
Message 7 of 9

J-Camper
Advisor
Advisor

So the update is letting me access the CSV table ReferencedDocumentDescriptor, but It is still reading the equation and not the value. 

 

The topic title no longer makes sense because I can get the document from the table but the table is still reading CSV document differently than in previous versions, so I still need to use 2 documents.. It seems Inventor is reading CSV as a text file instead of how excel reads the CSV file [where equations get evaluated].

 

I have tried using both Excel Engines: COM & Internal, which both produce the same result

0 Likes
Message 8 of 9

Ralf_Krieg
Advisor
Advisor

Hello

 

I think this is not an Inventor problem. Can you control that if you opened the xlsx file in Excel that there are the results and not the formulas displayed. If I saved the xlsx and the csv while the formulas are displayed in cells instead of the results, the import also shows formulas.

Or I missunderstood what you mean.


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
Message 9 of 9

J-Camper
Advisor
Advisor

The only issue I am experiencing now is how Inventor is displaying CSV files.  It's not so much of an issue moving forward because I'm converting my CSV file into an XLSX for our drawings.  It also means, we'll have to replace the Table references of old drawings that haven't been sent to the shop yet.

 

Inventor used to display CSV tables the same way you see it if opening in excel.  I know you can make the equations show up in excel, but it is not the default when opening a file.

CSV in Text EditorCSV in Text EditorCSV in ExcelCSV in Excel

Inventor used to bring the CSV table in the way it looks in excel, but now it brings it in like it's reading through a text editor.  I have the formulas so we can adjust oversized settings depending on material, finish, and/or shaping/profiling needs. 

 

For the past 2+ years the tables have been reading correctly, but when we finally updated this year [2019-2020 for about 2 months then 2020-2021 recently] Inventor started showing these tables differently.  I thought it was due to the Excel Engine change, but both options produce the same result.  It seems as though CSV files can only be used if no excel formulas are written in.

0 Likes