This method copies all properties (except of location points) from one hole wizard feature to another one and also renames the destination feature according to new profile. Here is an example which copies all attributes from first selected hole wizard feature to second selected hole wizard feature. I'm not sure why this method appears under the IModeler interface IFeatureManager is more appropriate I think, but anyways.
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swSelMgr As SldWorks.SelectionMgr
Dim swModeler As SldWorks.Modeler
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swSelMgr = swModel.SelectionManager
Set swModeler = swApp.GetModeler
Dim swSourceHole As SldWorks.Feature
Dim swDestHole As SldWorks.Feature
Set swSourceHole = swSelMgr.GetSelectedObject6(1, -1)
Set swDestHole = swSelMgr.GetSelectedObject6(2, -1)
swModeler.CopyWizardHole swSourceHole, swDestHole, True
Regards, Artem Taturevych | Snr. Developer | IC3D ANZ
IC3DSteel – New Steel Solution for SolidWorks
translationXpert – SolidWorks files language translator
Thank you very much for your help Artem, this API will be useful to me.
I tried the macro and it works.