求助,图块问题!
我的例子程序在VC和CAD中都无错运行,但在视图区中没有任何反应,问题出在哪儿!请高手指点:void ACADcucaodu()<BR>{<BR>#ifdef OARXWIZDEBUG<BR> acutPrintf ("\nOARXWIZDEBUG - ACADcucaodu() called.");<BR>#endif // OARXWIZDEBUG<BR> // TODO: Implement the command<BR> AcDbBlockTableRecord *pbtr=new AcDbBlockTableRecord();<BR> pbtr->setName("YD");<BR> AcGePoint3d basep(0,0,0);<BR> pbtr->setOrigin(basep);<BR> AcDbBlockTable *pbt;<BR> acdbHostApplicationServices()->workingDatabase()->getBlockTable(pbt, AcDb::kForWrite);<BR> AcDbObjectId id;<BR> pbt->add(id,pbtr);<BR> pbt->close();<BR> AcGePoint3dArray ptarr,ptarr1;<BR> ptarr.setLogicalLength(4);<BR> ptarr.set(0,0,0);<BR> ptarr.set(18,0,0);<BR> ptarr.set(18,6,0);<BR> ptarr.set(0,6,0);<BR> AcGePoint3d pt1(6,0,0),pt2(6,6,0);<BR> AcDb2dPolyline *ppline=new AcDb2dPolyline(AcDb::k2dSimplePoly,ptarr,0,Adesk::kTrue);<BR> AcDbLine *pline=new AcDbLine(pt1,pt2);<BR> AcGePoint3d center(3,3,0);<BR> AcGeVector3d normal(0,0,1);<BR> AcDbCircle *pcir=new AcDbCircle(center,normal,1.5);<BR> AcDbObjectId plineid;<BR> pbtr->appendAcDbEntity(plineid,ppline);<BR> pbtr->appendAcDbEntity(pline);<BR> pbtr->appendAcDbEntity(pcir);<BR> ppline->close();<BR> pline->close();<BR> pcir->close();
AcGePoint3d pt(8,1.5,0);<BR> AcDbAttributeDefinition *pattdef=new AcDbAttributeDefinition;<BR> pattdef->setPosition(pt);<BR> pattdef->setHeight(3);<BR> pattdef->setRotation(0);<BR> pattdef->setHorizontalMode(AcDb::kTextLeft);<BR> pattdef->setVerticalMode(AcDb::kTextBase);<BR> pattdef->setPrompt("请输入圆度公差:");<BR> pattdef->setTextString("0.3");<BR> pattdef->setTag("Tag");<BR> pattdef->setInvisible(Adesk::kFalse);<BR> pattdef->setVerifiable(Adesk::kFalse);<BR> pattdef->setPreset(Adesk::kFalse);<BR> pattdef->setConstant(Adesk::kFalse);<BR> pbtr->appendAcDbEntity(plineid,pattdef);<BR> pattdef->close();<BR> pbtr->close();<BR> pbt->close();<BR>} 呵呵,我知道是怎么一回事了!!我想问一下,怎么在ARX程序中调用块插入啊?
页:
[1]