几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】macro to update cut lis (http://www.dimcax.com/hust/showthread.php?t=5513)

yang686526 2009-04-13 12:42 PM

【转帖】macro to update cut lis
 
macro to update cut list
i'm trying to use the following to force an update to the cutlist of a weldment with no success.
any body else have code to manually update the cut list?
description
this method updates an automatically generated cut list.
syntax (ole automation)
retval = bodyfolder.updatecutlist ()
output (variant_bool) retval true to update an automatically generated cut list, false to not or false because the document does not contain an automatically generated cut list
thanks
dim mybodyfolder as bodyfolder = nothing
dim mysubfeature as feature = mydoc.firstfeature
do while not myfeature is nothing
if myfeature.gettypename2 = "solidbodyfolder" then
mybodyfolder = myfeature.getspecificfeature2
if mybodyfolder.updatecutlist then
exit do
end if
end if
myfeature = myfeature.getnextfeature
loop
--john
thanks for the help. that gave me what i needed.
thanks again!
dan
quick


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