几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(VB.NET/C#) (http://www.dimcax.com/hust/forumdisplay.php?f=176)
-   -   【转帖】关于填充的问题? (http://www.dimcax.com/hust/showthread.php?t=9342)

yang686526 2009-04-20 08:02 PM

【转帖】关于填充的问题?
 
关于填充的问题?
www.dimcax.com
关于填充的问题?
调试程序时,跟踪到填充时, 出现了下下列错误: "eambiguosoutput" 希望遇到过此类问题,并已解决的高手指点一下怎么解决这个错误! 先行谢过了
请把程序贴上来
c#最适合开发autocad,因为它拥有vb容易的特点,却具有vc++的强大功能。
呵呵, 谢谢老大了, 不过, 这个问题我已经在autodesk 讨论组找到了解决办法, 如果填充小面积,或填充比例太大,就会引发evaluatehatch函数,抛出"eambiguousoutput"异常!" 我的源码是这样的: dim doc as document = application.documentmanager.mdiactivedocument using tran as transaction = doc.transactionmanager.starttransaction dim bt as blocktable = tran.getobject(doc.database.blocktableid, openmode.forread) dim btr as blocktablerecord = tran.getobject(bt(blocktablerecord.modelspace), openmode.forwrite) dim hat as hatch = new hatch hat.setdatabasedefaults() dim normal as vector3d = new vector3d(0.0, 0.0, 1.0) hat.normal = normal hat.patternscale = 0.1 / m_dmscale hat.patternangle = patternang if bsort then hat.sethatchpattern(hatchpatterntype.predefined, "ar-sand") else hat.sethatchpattern(hatchpatterntype.predefined, "ar-brstd") end if '加入填充边界 dim ids as new objectidcollection ids.add(objid) hat.appendloop(hatchlooptypes.default, ids) hat.evaluatehatch(true) dim hatid as objectid = btr.appendentity(hat) tran.addnewlycreateddbobject(hat, true) tran.commit() tran.dispose() end using 里面有我自己定义的参数(objid 是封闭的曲线) 希望这些代码对大家有些帮助!


所有的时间均为北京时间。 现在的时间是 01:04 AM.