几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   SolidWorks二次开发 (http://www.dimcax.com/hust/forumdisplay.php?f=111)
-   -   【转帖】skippeditemarray (http://www.dimcax.com/hust/showthread.php?t=4579)

yang686526 2009-04-12 07:38 PM

【转帖】skippeditemarray
 
skippeditemarray
how to skip the holes (2,1) and 3,1 this program skip always the hole (2,1) why?
boolstatus = part.extension.selectbyid2("hole1", "bodyfeature", 0, 0, 0, false, 4, nothing, 0)
boolstatus = part.extension.selectbyid2("axis_x", "axis", 0, 0, 0, true, 1, nothing, 0)
boolstatus = part.extension.selectbyid2("axis_y", "axis", 0, 0, 0, true, 2, nothing, 0)
set swpattern = part.featuremanager.featurelinearpattern2(3, 3 * 25.4 / 1000, 2, 4 * 25.4 / 1000, false, false, "null", "null", false)
part.clearselection2 true
set swlpattern = swpattern.getdefinition
swlpattern.skippeditemarray = array(2, 1)
swlpattern.skippeditemarray = array(3, 1)
boolstatus = swpattern.modifydefinition (swlpattern, part, nothing )
although
swlpattern.skippeditemarray = array(1, 1)
he skip the hole (2,1) again
help me
marc
ok it works!
marc
quick


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