Inventor Engineer-To-Order (Read-Only)
Welcome to Autodesk’s Inventor ETO Forums. Share your knowledge, ask questions, and explore popular Inventor ETO topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

.Net data types in the Intent language - Method Calls

1 REPLY 1
Reply
Message 1 of 2
FarrenYoung
325 Views, 1 Reply

.Net data types in the Intent language - Method Calls

I'm trying to get the Camera extents on a drawing view in Intent. The code works in VB. In Intent I get 'No such method GetExtents'. I'm not sure if for some reason this method doesn't exist or if this is because it is converting my needed data type of Double to Number.
I'm actually not able to evaluate any methods on the Camera object, but the properties return results. I'm also able to evaluate methods on other objects with no problems.
Evaluating other methods on the Camera give me, "External(CFunc) library error typeFreeInternal: unknown type: 1233872. Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))

Method Work() As Number
Dim host As Any = Autodesk.Intent.IntentAPI.Instance.HostAPI
Dim iv As Any = host.HostApplication
Dim Camera As Any = iv.Activedocument.Activesheet.DrawingViews.get_Item(2).Camera
Dim w As Number = 0.0
Dim h As Number = 0.0
printValue(Camera.ViewOrientationType) 'This works fine
Camera.GetExtents(w, h) 'This gives no such method
Dim width As System.Double = system.Convert.ToDouble(w) 'This gives Datatype mismatch: Required a 'System.Double', received a 'Number'.
Dim height As System.Double = system.Convert.ToDouble(h)
Camera.GetExtents(width, height) 'This isn't available since there are no Double datatypes to pass it
Return 0
End Method

Can anyone offer help?
--Farren

************************************************************************************
If this post helps, please click the "thumbs up" to give kudos
If this post answers your question, please click "Accept as Solution"
************************************************************************************
1 REPLY 1
Message 2 of 2
glibardi
in reply to: FarrenYoung

We are not supporting calls to .Net methods that have ByRef parameters in their signature. We will improve the error message in future.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums