Hi,
We have noticed that already and informed our engineering team for an appropriate fix. In the meantime, here is a workaround using the RXClass which resolves this issue in 2012 release. I am sharing the relevant code snippet below -
using (DBObject obj = tr.GetObject(mP, OpenMode.ForWrite))
{
MPolygon mpoly = null;
if (obj.GetRXClass() ==
RXClass.GetClass(typeof(MPolygon)))
{
mpoly =
(MPolygon)DisposableWrapper.Create(
typeof(MPolygon),
obj.UnmanagedObject, obj.AutoDelete);
Interop.DetachUnmanagedObject(obj);
}
if (mpoly != null)
{
// Do something with the MPolygon
}
else
{
doc.Editor.WriteMessage("\nNOT an MPolygon ...\r\n");
}
}
Hope this helps,
Partha Sarkar
Autodesk Developer Network