急呀!请问版主和大侠们,我这个反应器怎么用不起?
<p>我在做布局视口时采用多边形作边界.我看CAD本身都把多边形都附有永久的反应器.</p><p>我用下面的代码怎么就加不起永久反应器</p><p>AcDbViewport *pViewport = new AcDbViewport();</p><p>pViewport->setHeight(height);<br/> pViewport->setWidth(width);</p><p>pViewport->setViewCenter(AcGePoint2d(rotatemodelcenterpt.x,rotatemodelcenterpt.y));<br/> pViewport->setTwistAngle(twistangle);<br/> pViewport->setLensLength(50.0); <br/> pViewport->setCustomScale(scale);<br/> pViewport->setViewHeight(height*scale);<br/> pViewport->setViewDirection(AcGeVector3d(0,0,1));<br/> pViewport->setNonRectClipEntityId(trimobjectid);<br/> pViewport->setNonRectClipOn();<br/> //acedAlert("3");<br/> // 将新的布局对象添加到图纸空间块表记录中<br/> AcDbObjectId viewportId;<br/> pBlkTblRcd->appendAcDbEntity(viewportId, pViewport);<br/> //pViewport->downgradeOpen();<br/> pViewport->setOn();<br/> pViewport->upgradeOpen();<br/> pViewport->setTransparent();<br/> pViewport->close();<br/> pBlkTblRcd->close();</p><p><font color="#ff3300"> AcDbEntity *pEnt;<br/> Acad::ErrorStatus esadddrecactor;<br/> esadddrecactor = acdbOpenAcDbEntity(pEnt, entId, AcDb::kForWrite);<br/> if (esadddrecactor == Acad::eOk)<br/> { <br/> pEnt->addPersistentReactor(viewportId);</font></p><p><font color="#ff3300"> pEnt->close();<br/> }</font></p><p><font color="#ff3300">红色代码段怎么不起作用,</font></p> 加入rector你也得用recortor对象吧!
页:
[1]