I see. The default constructor is broken. Use the other constructor like
this:
RotatedDimension rd = new RotatedDimension(1.2,new Point3d(0,0,0),new
Point3d(1,0,0),new Point3d(1,1,1),"some text",ObjectId.Null);
Sorry about the inconvenience. I see to it that we fix this for the next
release.
albert
wrote in message news:4855391@discussion.autodesk.com...
thanks albert ,
my code is :
RotatedDimension rd = new RotatedDimension();
rd.XLine1Point = startPoint;
rd.XLine2Point = endPoint;
rd.DimLinePoint = locPoint;
//rd.Rotation = rotation; // this line will cause fatal
error
ObjectId id = Tools.AddEntity(rd);
addentity is a function of my tools class
public static ObjectId AddEntity(Entity ent)
{
try
{
using (Transaction trans = Tm.StartTransaction())
{
BlockTable bt =
(BlockTable)Tm.GetObject(Db.BlockTableId, OpenMode.ForWrite, false);
BlockTableRecord btr =
BlockTableRecord)Tm.GetObject(bt[BlockTableRecord.ModelSpace],
OpenMode.ForWrite, false);
btr.AppendEntity(ent);
Tm.AddNewlyCreatedDBObject(ent, true);
trans.Commit();
return ent.ObjectId;
}
}
catch (System.Exception e)
{
throw e;
}
}