我在做布局视口时采用多边形作边界.我看CAD本身都把多边形都附有永久的反应器. 我用下面的代码怎么就加不起永久反应器 AcDbViewport *pViewport = new AcDbViewport(); pViewport->setHeight(height); pViewport->setWidth(width); pViewport->setViewCenter(AcGePoint2d(rotatemodelcenterpt.x,rotatemodelcenterpt.y)); pViewport->setTwistAngle(twistangle); pViewport->setLensLength(50.0); pViewport->setCustomScale(scale); pViewport->setViewHeight(height*scale); pViewport->setViewDirection(AcGeVector3d(0,0,1)); pViewport->setNonRectClipEntityId(trimobjectid); pViewport->setNonRectClipOn(); //acedAlert("3"); // 将新的布局对象添加到图纸空间块表记录中 AcDbObjectId viewportId; pBlkTblRcd->appendAcDbEntity(viewportId, pViewport); //pViewport->downgradeOpen(); pViewport->setOn(); pViewport->upgradeOpen(); pViewport->setTransparent(); pViewport->close(); pBlkTblRcd->close(); AcDbEntity *pEnt; Acad::ErrorStatus esadddrecactor; esadddrecactor = acdbOpenAcDbEntity(pEnt, entId, AcDb::kForWrite); if (esadddrecactor == Acad::eOk) { pEnt->addPersistentReactor(viewportId); pEnt->close(); } 红色代码段怎么不起作用, |