continuous dimension command is my custom command,it works like autocad command ( _dimcontinue ),but doesn't need to select first dimension.
the following code works well, but in process of debug, I found the bug of rotationdimension again, rotationdimension's rotation property always throw a exception.
protected override bool Update()
{
try
{
switch (mPromptCounter)
{
case 0:
GetRotationAndDimensionDirectio();
break;
case 1:
break;
}
GetNewEndPoint();
RotatedDimension dimEnt = ((RotatedDimension)Entity);
//dimEnt = new RotatedDimension(mRotation, mStartPt, mNewEndPt, mLocPt, "", ObjectId.Null); // this line will make dynamic dimension dispear
dimEnt.XLine1Point = mStartPt;
dimEnt.XLine2Point = mNewEndPt;
dimEnt.DimLinePoint = mLocPt;
dimEnt.Rotation = mRotation; // this line will throw a exception
}
catch (System.Exception)
{
return false;
}
return true;
}