[ARX]求助捕捉的问题
<P>小弟最近想编写程序完成以下功能:创建一个点,并设置好捕捉方式,为以后的选取做好准备,但就是行不通,望哪位大虾有空指点一下。</P><P>void ARXgetosnappoints()<BR>{<BR> AcDbPoint *p1 = new AcDbPoint(AcGePoint3d(0.0, 0.0, 0.0));</P>
<P> AcDbBlockTable *pBlockTable;<BR> acdbHostApplicationServices()->workingDatabase()<BR> ->getSymbolTable(pBlockTable, AcDb::kForRead);<BR> AcDbBlockTableRecord *pBlockTableRecord;<BR> pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForWrite);<BR> pBlockTable->close();</P>
<P> pBlockTableRecord->appendAcDbEntity(p1);<BR> pBlockTableRecord->close();</P>
<P> int gsSelectionMark;<BR> AcGePoint3d pickPoint;<BR> AcGePoint3d lastPoint;<BR> AcGeMatrix3d viewXform;<BR> AcGePoint3dArray snapPoints;<BR> AcDbIntArray geomIds;<BR> <BR> p1->getOsnapPoints(<BR> AcDb::kOsModeNear,<BR> gsSelectionMark,<BR> pickPoint,<BR> lastPoint,<BR> viewXform,<BR> snapPoints,<BR> geomIds);</P>
<P> ads_point result;<BR> acedGetPoint(NULL, "请选择一个点:", result);</P>
<P> p1->close();<BR>}</P>
页:
[1]