求助!!!!!!!!!!1
请看下面的程序://pick a LINE
ads_name usrent;
ads_point usrpt;
int status;
status=acedEntSel("\nspecify a line:",usrent,usrpt);
if(status!=RTNORM)
{
if(status==RTCAN)return;
}
//open entity
AcDbObjectId cId;
AcDbLine *pCurve;
if(acdbGetObjectId(cId,usrent)!=Acad::eOk)return;
acdbOpenObject(pCurve,cId,AcDb::kForRead);
AcGePoint3d pt3;
if((status=pCurve->getStartPoint(pt3))!=Acad::eOk)
{
pCurve->close();
return;
}
acutPrintf("\nStartPoint=%d,%d,%d",pt3.x,pt3.y,pt3.z);
pCurve->close();
我选择了一条端点是(100,100,0)和(200,200,0)的直线,可结果却显示0,1079574528,0
请教高手为什么会是这样呢?? 有没有高手给解答一下呀???? 将
acutPrintf("\nStartPoint=%d,%d,%d",pt3.x,pt3.y,pt3.z);
改为:
acutPrintf("\nStartPoint=%lf,%lf,%lf",pt3.x,pt3.y,pt3.z);看看吧 问题解决了,谢谢楼上的解答!!!:)
页:
[1]