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

yang686526 2009-04-13 10:16 AM

【转帖】deleting features
 
deleting features
hello all,
i am trying to write some code to delete the base feature as part of a conversion i am performing from another program.
can anyone point me in the right direction with regard to how to delete the base feature of a part, please?
the parts in question will only have one base part or protrusion and i need to delete that.
any help is appreciated.
thanks
hi david,
i can think of two ways:
1. if you know the name of the feature you can use the partdoc:: featurebyname
to get the feature then select it using feature:: select2 and then delete it modeldocextension:: deleteselection2
2. you can also use partdoc:: firstfeature command to get the first feature of a document and then get rid of it.
try and create your macro and get back here if you have any more issues.
cheers,
--stav.
in this world i am nobody...
and nobody is perfect ;) !!!
---------
solidworks office 2008 sp4.0
dell precision pws390
nvidia quadro fx 3450/4000 sdi
edited: 07/04/2008 at 07:08 am by stavros antoniou
quick


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