Hi, I am using "IntersectWith" method as following...
foreach (ObjectId id in col_FillingArea)
Entity ent_FillingArea = tr.GetObject(id, OpenMode.ForRead) as Entity;
if (ent_FillingArea != null)
foreach (ObjectId id_Terrain in col_TerrainLine1)
Entity ent_TerrainLine = tr.GetObject(id_Terrain, OpenMode.ForRead) as Entity;
Point3dCollection pntCol = new Point3dCollection();
ent_FillingArea.IntersectWith(ent_TerrainLine, Intersect.OnBothOperands, pntCol,
new IntPtr(0), new IntPtr(0));
catch (Autodesk.AutoCAD.Runtime.Exception e)
foreach (Point3d pnt in pntCol)
BlockTable blkTbl = tr.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;
BlockTableRecord blkTblRec = tr.GetObject(blkTbl[BlockTableRecord.ModelSpace],O
DBPoint dbPnt = new DBPoint(pnt);
But I keep getting "MissingMethodException"
I am using ObjectARX 2011, AutoCAD 2010 Civil 3D, and VS 2010.
Solved! Go to Solution.
what type of entity is your ent_FillingArea?
What happens if you try this
Dim tCurve as DatabaseService.Curve = TryCast(ent_FillingArea,DatabaseServices.Curve)
...does this result in a valid object in tCurve or is it then nothing?
- alfred -
>> No compile error.
Does that mean the code could be compiled but the error raises at runtime?
IMHO you have the wrong references set then.
What details does the exception have for you if you use Try...Catch...End Try?
- alfred -
"I am using ObjectARX 2011, AutoCAD 2010 Civil 3D, and VS 2010." : Why are you referencing ObjectARX2011 in a 2010 project?
Well, I couldn't find ObjectARX 2010 on the download website.
Plus, I asked Autodesk Tech support about version compatibility, and they answered that AutoCAD 2010, 2011, 2012 are binary compatible. Hence ARX 2011 could work with CAD 2010.
Do you still think this could be compatibility issue?
Well the code doesn't properly catch the exception.
I think the AutoCAD catches the MessingMethodException even before it goes into my catch block.
"binary compatible" means binary BACKWARD compatible (it is hardly one can say an application is FOREWARD compatible). That means, an app compiled with older version of components/libraries will work in a computer where only newer version of the components/libraries avaline, if he components/libraries are backwork compatible. However, if the app is compiled with new version of components/libraries and run in computer where only older components/libraries available, the app may or may not work (most likely not). No software vender would gurantee its software to be FOREWARD compatible, so that their hands are tied to improve/enhance there product, even they do not break existing functionalities (BACKWARD compatibility).
"Binary Compatible" here only means that the newer version did not break existing functionalities.
So, reference a later version of library and develop against loder version is a bad practice in general, even it may work in particylar cases.
You can download ObjectArx 2010 from here: http://forums.autodesk.com/t5/Autodesk-ObjectARX/o
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.