Paint Features Example (VBA)
This example shows how to copy the source feature's parameters to the
target feature using the SolidWorks Utilities API.
' Get the SolidWorks Utilities interface
Set swUtil = swApp.GetAddInObject("Utilities.UtilitiesApp")
Set swUtilFeatPaint = swUtil.GetToolInterface(gtSwToolFeatPaint,
0)
' Copy the source feature's parameters to the target feature
longstatus = swUtilFeatPaint.FeaturePaint("Extrude1@D:\Samples\box.sldprt",
"Extrude1@D:\Samples\boxblue.sldprt")