几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】addregion (http://www.dimcax.com/hust/showthread.php?t=15056)

yang686526 2009-05-04 03:46 PM

【转帖】addregion
 
addregion
addregion
i'm trying to use the addregion method to add a region to a drawing. here's my code; what am i doing wrong ? i get an 'object doesn't support this action' error on set myregion = .....
------------------------
dim p0(2) as double, p1(2) as double, p2(2) as double, p3(2) as double
dim entarray(3) as iacadentity, myregion as iacadentity
p0(0) = 0: p0(1) = 0: p0(2) = 0
p1(0) = 20: p1(1) = 0: p1(2) = 0
p2(0) = 20: p2(1) = 20: p2(2) = 0
p3(0) = 0: p3(1) = 20: p3(2) = 0
set entarray(0) = doc.modelspace.addline(p0, p1)
set entarray(1) = doc.modelspace.addline(p1, p2)
set entarray(2) = doc.modelspace.addline(p2, p3)
set entarray(3) = doc.modelspace.addline(p3, p0)
set myregion = doc.modelspace.addregion(entarray)
------------------------
as i see your question concerns ddx. addregion method doesn't implemented yet.
misha kuzinets


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