Error in 2018 Autodesk.Inventor.Interop when trying to get the ScreenQuadrant

Error in 2018 Autodesk.Inventor.Interop when trying to get the ScreenQuadrant

Anonymous
Not applicable
829 Views
1 Reply
Message 1 of 2

Error in 2018 Autodesk.Inventor.Interop when trying to get the ScreenQuadrant

Anonymous
Not applicable

Hello,

 

I'm trying to get the different values for the new 3D annotations in Inventor 2018 parts using the Inventor 2018 API, and this mostly goes OK.

 

I have found one error in the Autodesk.Inventor.Interop where there is a property with an incorrect type definition.

 

On the ModelGeneralNoteDefinition object there is a property called ScreenQuadrant which according to the API help should be of a ScreenQuadrantEnum type.

 

This is also the type I get when accessing the property from a VBA macro

 

When I try the same from a VB.NET program where I have referenced the Autodesk.Inventor.Interop dll in version 22.0.0.0 for Inventor 2018, the object browser in Visual Studio shows this property as an IntPtr, which is clearly wrong, and I get an illegal type cast exception if I try to get the property directly.

 

If I do a QuickWatch in Visual Studio on an instance of a ModelGeneralNoteDefinition I can find the correct type and value under the dynamic properties for the COM object.

 

To get the value of the ScreenQuadrant property in VB.NET I have to use Option Strict Off and dynamic dispatch to get the actual type and the correct enum value, in C# this could be done with a Dynamic declaration and dynamic dispatch.

 

It would be easier, and more type safe, if the property type was fixed in the Autodesk.Inventor.Interop definition.

 

 

There is also some errors in the Inventor 2018 API help for this property, when you try to click through to get to the actual enumeration definition for ScreenQuadrantEnum, you get a page not found error and the ScreenQuadrantEnum is not in the list of enumerations in the content tree

 

 

Regards,

Jens Bejer Pedersen

Developer

www.Symetri.com

0 Likes
830 Views
1 Reply
Reply (1)
Message 2 of 2

MjDeck
Autodesk
Autodesk

Sorry it took so long to reply! This is still a problem in Inventor 2025. It is internal issue INVGEN-81798.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes