请问如何改变UCS?我的这个方法没有效果(想改变Z坐标值,其他的值不变): void SetNewUCSZ(double Z) { acDocManager->lockDocument(curDoc(),AcAp::kWrite,NULL,NULL,true); AcDbViewportTable* pVPTable; acdbHostApplicationServices()->workingDatabase() ->getViewportTable(pVPTable,AcDb::kForWrite); AcGePoint3d ptOrigin; AcGeVector3d vecXAxis; AcGeVector3d vecYAxis; //获得当前视口记录 AcDbViewportTableRecord *pVPCurrent; pVPTable->getAt("*ACTIVE", pVPCurrent, AcDb::kForWrite); //改变UCS pVPCurrent->getUcs(ptOrigin,vecXAxis,vecYAxis); ptOrigin.z=Z; Acad::ErrorStatus aa=pVPCurrent->setUcs(ptOrigin,vecXAxis,vecYAxis); pVPCurrent->close();
pVPTable->close(); acDocManager->unlockDocument(curDoc()); } |