DrawingViewHatchRegion is not defined Inventor 2022 .NET 4.8

DrawingViewHatchRegion is not defined Inventor 2022 .NET 4.8

lmc.engineering
Advocate Advocate
283 Views
2 Replies
Message 1 of 3

DrawingViewHatchRegion is not defined Inventor 2022 .NET 4.8

lmc.engineering
Advocate
Advocate

Hi all,

 

As the title, I seem to be having an issue getting hold of the DrawingViewHatchRegion object in visual studio. I note this was added as of Inventor 2022 and appears  I am up-to-date with the Inventor object Library & .NET version, yet I can't figure out why I can't use it? Am I overlooking something?

 

Cheers.

 

0 Likes
284 Views
2 Replies
Replies (2)
Message 2 of 3

Ralf_Krieg
Advisor
Advisor

Hello

 

What means can't use it? Is there an error message like "Type undefined" or something?

You need to add a reference to the Inventor 2022 Interop.dll. Earlier versions don't know this object. If you don't import the Inventor Namespace in your class, you need to add the namespace to the variable declaration like

Dim oHatchRegion as Inventor.DrawingViewHatchRegion

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

lmc.engineering
Advocate
Advocate

It turns out that I'd failed to update the Autodesk.Inventor.Interop reference. My mistake!

 

Thanks

0 Likes