Inserting a csv file as a table in drawing leaves it open in background process

Inserting a csv file as a table in drawing leaves it open in background process

J-Camper
Advisor Advisor
362 Views
3 Replies
Message 1 of 4

Inserting a csv file as a table in drawing leaves it open in background process

J-Camper
Advisor
Advisor

I'm not sure if anyone else has run into this or if there is a way to avoid it.

 

I have a table i write out from part files to a csv file.  Our users then bring the csv file into a drawing as a table.  When the user inserts the table into a drawing, the file remains open in a background "Microsoft Excel" process until the user manually closes the background process, or restarts the system.  Even closing inventor leaves the background process running.

This becomes an issue when trying to update the data with the write function.  I get this error:

"System.IO.IOException: The process cannot access the file 'redacted file path\redacted file name.csv' because it is being used by another process."

 

Is there some application option that would help prevent this background process from remaining open?

0 Likes
363 Views
3 Replies
Replies (3)
Message 2 of 4

Michael.Navara
Advisor
Advisor

Do you use user interface or code for export/import?

Can you post the repro steps? When I test it using user interface no issue was found. Only when I start editing the table in Excel, I'm not able to modify the file in Notepad at the same time. But this is expected behavior.

0 Likes
Message 3 of 4

J-Camper
Advisor
Advisor

Sure here are the steps I can do to get the persistent background process:

  1. Open a drawing file [we use dwg, haven't tried in idw]
  2. Go to Annotate Tab
  3. Select "General" from Table panel
  4. Select browse for file, and pick your file [using a csv file in my example]
  5. Place the table on your sheet

Now you should have a background process for Microsoft Excel in task manager.  If I try to write to this file it says the file is open in another process.  Closing the drawing file does not end the process.  Closing inventor entirely does not end the process.  Opening the excel application and then closing the application does not end the process.  Opening the file from an excel application notifies me that I can only open it read-only because it "is locked for editing by another user".

This persistent background process does not want to end without manually ending from task manager or restarting the PC.

 

Using 2023.4.2 Inventor  |  Microsoft 365 Excel  |  Windows 11

 

0 Likes
Message 4 of 4

J-Camper
Advisor
Advisor

I just did another little test.  If i have the excel application open before creating the table with the steps above, the background process does not immediately appear.  It still acts the same way, of locking me out of editing, but after closing the excel application, the background process appears for about 30 seconds then goes away and I can write to the file again without closing anything in Inventor. 

0 Likes