‎12-02-2018 03:14 PM
Hi,
I am trying to call a mega function from the java API but the returned object cannot be casted.
I have the following code that works fine in VB:
Dim objReverseEngine
objReverseEngine = mRoot.CallFunction("DbbReverse")
LastTempGenerationPath = objReverseEngine.GetProp("Directory")
I tried the same in java:
MegaObject objReverseEngine = (MegaObject) mRoot.callFunction("DbbReverse");
lastTempGenerationPath = objReverseEngine.getProp("Directory");
But I have the following exception:
com.mega.modeling.api.jni.ComObjectProxy cannot be cast to com.mega.modeling.api.MegaObject
Can you help me to make it works?
Many thanks
Stéphane
‎07-06-2019 04:19 PM
Try casting to MegaCOMObject