Posted by: | MichiMichbeck | |
Data created: | 1 June 2010 |
Hey, I am trying to convert a GeomObject to a TriObject in Max.Net. I am using this code: if (os.Obj.CanConvertToType(global.TriObjectClassID) != 0) { } At runtime Max.Net throws an exception: "Object of type Autodesk.Max.Wrappers.GeomObject" can not be converted to type "Autodesk.Max.ITriObject". Thx ind advance | |
1 June 2010
#2025 | |
Hi Mitchbeck, I think this is the same issue as http://ephere.com/autodesk/max/forums/general/thread_960.html Marsel Khadiyev (Software Developer, EPHERE Inc.) | |
1 June 2010
#2027 | |
Yes I guess this is the same issue, but there was no solution found in this thread either, was it? I tried to set the ClassID given in this thread but it didnt work. Actually I tried the following: ITriObject triObj = this.global.CreateNewTriObject; IClass_ID objID = triObj.ClassID; IClass_ID triObjID = global.TriObjectClassID;
Both ClassID's (tribObjID and objID) are different: objID = ( 3830386867 , 0 ) , triObjID = ( 9 , 0 ). So ClassID's for different triObject should always be equal, right? Is that somehow the root of the problem? Thx,Regards | |
1 June 2010
#2028 | |
The solution doesn't exist in current build, however, I already fixed it and it should be working in next build. The reason is that returned objects are of editable mesh or editable poly types (rather than triobject or polyobject). Marsel Khadiyev (Software Developer, EPHERE Inc.) | |
1 June 2010
#2029 | |
Thank you very much Marsel - I am looking forward to getting the next build :) Greets | |
4 June 2010
#2044 | |
The new build is up, give it a try when you can and let me know if it fixed the problem. Cheers Marsel Khadiyev (Software Developer, EPHERE Inc.) |