明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2060|回复: 1

急呀!请问版主和大侠们,我这个反应器怎么用不起?

[复制链接]
发表于 2008-8-23 22:56:00 | 显示全部楼层 |阅读模式

我在做布局视口时采用多边形作边界.我看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();
 }

红色代码段怎么不起作用,

发表于 2011-1-4 17:00:52 | 显示全部楼层
加入rector你也得用recortor对象吧!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-25 11:27 , Processed in 0.155876 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表