#ifndef PI
#define PI 4*atan(1.0)//提高pi的精度
#endif
double dRotation=PI/2.0;//旋转角度为90度
AcGeVector3d axis=AcGeVector3d::kZAxis;//旋转轴一般设定为Z轴,二维的
//情况下
AcGePoint3d pt(0.0,0.0,0.0);//旋转中心为原点
AcGeMatrix3d mat;
mat.setToRotation(dRotation,axis,pt);
AcDbEntityPointer spEnt(objId,AcDb::kForWrite);
Acad::ErrorStatus es=spEnt.openStatus();
if(es!=Acad::eOk)
{
return es;
}
spEnt->transformBy(mat);