iPart gets modified when requesting its worksheet by Inventor API

iPart gets modified when requesting its worksheet by Inventor API

Anonymous
Not applicable
530 Views
3 Replies
Message 1 of 4

iPart gets modified when requesting its worksheet by Inventor API

Anonymous
Not applicable

Hello Community,

 

Recently I found some curious behavior while using Inventor API which, from my PoV, is a bug. For some actions I programmatically open iPart spreadsheet using iPartFactory.ExcelWorkSheet(), extract required data and close it without any modification. And despite there are no changes applied to a table, a part factory becomes dirty and its instances get “requires update” state in Inventor.

 

The issue appears only once per Inventor session: subsequent request-close operations from work fine. Also corresponding actions executed from user interface (open internal spreadsheet in Excel and close it) do not modify an iPart.

 

To reproduce the issue, open any iPart in new Inventor session and execute simple VBA code:
Set partDoc = ThisApplication.ActiveDocument
Set factory = partDoc.ComponentDefinition.iPartFactory
Set WB = factory.ExcelWorkSheet.Parent
Call WB.Close
After it, source part becomes dirty.

 

The issue is observed on Inventor 2016 to 2019 with Excel 2016.

Did anyone faced such a behavior? Is there any resolution for a problem?

 

Thanks in advance,
Paul

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

bradeneuropeArthur
Mentor
Mentor

use this instead:

 

Call wb.Close(False)

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 4

Anonymous
Not applicable

Arthur,

 

Unfortunately, your suggestion doesn't work. Even if we pass SaveChanges = False to Workbook.Close(), iPart still becomes Dirty.

 

Thanks,

Paul

0 Likes
Message 4 of 4

Anonymous
Not applicable

Hello Community,

 

It's been a while since the last response which, unfortunately, is not helpful. Does anyone know how to report an issue to Autodesk related to API? Regular support accepts only issues with CAD application, but not with its Automation.

 

Thanks,

Paul

0 Likes