iProperty SDK editor system.OverflowException Unhandled exception

iProperty SDK editor system.OverflowException Unhandled exception

andrew_canfield
Collaborator Collaborator
394 Views
1 Reply
Message 1 of 2

iProperty SDK editor system.OverflowException Unhandled exception

andrew_canfield
Collaborator
Collaborator

Hello,

Trying a program from the SDK & seeing these returned - what do the messages mean & how are they fixed?

Thanks for taking a look. The error occurs when trying to edit an iproperty of an .idw, the file is read/write.

(same result for .ipt .iam)

System overflow.JPG

Quick Watch.JPG

Unhandled exception.JPG

 

Regards

 

Andrew

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

AlexKorzun
Autodesk
Autodesk

AddrOfPinnedObject() returns IntPtr:

https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.gchandle.addrofpinnedobje...

 

IntPtr.ToInt32() is described at:
https://docs.microsoft.com/en-us/dotnet/api/system.intptr.toint32?view=netframework-4.8

 

The Exceptions section reads:

OverflowException
On a 64-bit platform, the value of this instance is too large or too small to represent as a 32-bit signed integer.

 

 

You should probably use .ToInt64() instead, which returns long. This will require other changes in your code.

Thank you,




Alex Korzun
Inventor-Revit Interop / Inventor-Fusion Interop / Inventor ETO
Autodesk, Inc.

0 Likes