获取多段线起始点和结束点
本帖最后由 chpmould 于 2011-7-31 18:27 编辑在ARX中如何获取不封闭多段线(AcDbPolyline)的起始点和结束点,请高手能在百忙中抽出一点时间举个例
就好比以下LISP中的这两句的效果
(setq ss (ssget))
(setq sen (vlax-ename->vla-object ss))
(setq pts (vlax-curve-getstartpoint sen)
pte (vlax-curve-getendpoint sen)
)
自己先顶一下,不要沉下去了 我顶一下, pline->startPoint()
pline->endPoint() virtual Acad::ErrorStatus getStartPoint(AcGePoint3d& startPoint) const;
virtual Acad::ErrorStatus getEndPoint (AcGePoint3d& endPoint) const; 上一个是直线的 ,看错了 bophy20010 发表于 2011-8-8 20:25 static/image/common/back.gif
virtual Acad::ErrorStatus getStartPoint(AcGePoint3d& startPoint) const;
virtual Acad::Err ...
谢谢,没能看明白如何用,能否抽空写个此函数的简单应用例子 本帖最后由 BDYCAD 于 2011-8-11 14:38 编辑
ads_name Ename;
ads_point p1;
AcGePoint3d Spt,Ept;
AcDbObjectId ObjID;
AcDbCurve *pCur;
if (acedEntSel(_T("\n选线:"),Ename,p1)!=RTNORM)return;
acdbGetObjectId(ObjID,Ename);
if (acdbOpenObject(pCur,ObjID,AcDb::kForWrite)!=Acad::eOk)return;
pCur->getStartPoint(Spt);//取出对象起点
pCur->getEndPoint(Ept);//取出对象终点
pCur->close();
BDYCAD 发表于 2011-8-11 14:37 static/image/common/back.gif
ads_name Ename;
ads_point p1;
AcGePoint3d Spt,Ept;
老大今天有空了,非常感谢! 原来同获取直线的方法相同,现在总算是明白了. BDYCAD 发表于 2011-8-11 14:37 static/image/common/back.gif
ads_name Ename;
ads_point p1;
AcGePoint3d Spt,Ept;
怎么选择开始点和结束点之外的别的点呢啊?
页:
[1]
2