chenpool 发表于 2005-7-12 22:09:00

[ARX]问一个关于自定义实体的问题:不能在CAD中显示出来

<P>dwgInFields (AcDbDwgFiler *pFiler);<BR>dwgOutFields(AcDbDwgFiler *pFiler) const;<BR>dxfInFields (AcDbDxfFiler *pFiler);<BR>dxfOutFields(AcDbDxfFiler *pFiler) const;<BR>// 必须重载的函数,实现一个自定义实体的基本功能<BR>worldDraw(AcGiWorldDraw *mode);<BR>getGeomExtents(AcDbExtents &amp; extents);<BR>(const AcGeMatrix3d &amp; xform);<BR>getTransformedCopy(const AcGeMatrix3d &amp;xform,AcDbEntity *&amp;pEnt);<BR>(AcGePoint3dArray &amp; gripPoints,AcDbIntArray &amp;osnapModes, cDbIntArray &amp; geomIds) const; <BR>moveGripPointsAt(const AcDbIntArray &amp;indices, const AcGeVector3d &amp;offset);</P>
<P>奇怪的是:该重载的我都重载了,但是都没有写实际的代码,只是在worldDraw中写了一些代码,想在CAD显示显示就够了,可是现在连显示都没有。而且,调试设断点,程序也没执行过去,不知道是什么原因,各位建议建议啊。<BR>Adesk::Boolean<BR>CWall::worldDraw(AcGiWorldDraw *mode)<BR>{<BR>&nbsp;assertReadEnabled();<BR>&nbsp;// TODO: implement this function.<BR>&nbsp;if(mode-&gt;regenAbort())<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return Adesk::kTrue;<BR>&nbsp;AcGePoint3d point;<BR>&nbsp;if(mode!=NULL)<BR>&nbsp;{<BR>&nbsp;&nbsp;mode-&gt;subEntityTraits().setColor(5);<BR>&nbsp;&nbsp;point.set(100.0,200.0,0.0);<BR>&nbsp;&nbsp;point.set(200.0,300.0,0.0);<BR>&nbsp;&nbsp;mode-&gt;geometry().polyline(2,point);<BR>&nbsp;}<BR>&nbsp;return Adesk::kTrue;<BR>}</P>

NinthOcean 发表于 2005-7-18 17:42:00

return AcDbEntity::worldDraw(mode);
页: [1]
查看完整版本: [ARX]问一个关于自定义实体的问题:不能在CAD中显示出来