At the risk of being a bit "heavy", why not use Smartproperties (Axemble utility for sale on Lynkoa) rather than running macros (personally I don't master, that's why !!!).
For people who don't master macro programming, this type of utility is still the best thing we do, right?
For your information, I don't get a cent on the sale of the Smartproperties van!!!!!!!!
Here is an example that completes prossignol's answer
I use this macro to remove properties in all part and assembly configurations:
Option Explicit Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim swModelDocExt As SldWorks.ModelDocExtension Dim swConfig As SldWorks.Configuration Dim swCustPropMgr As SldWorks.CustomPropertyManager Sun i As Long Dim vConfName as Variant Dim valOut As String
Public Enum swDocumentTypes_e swDocNONE = 0 ' Used to be TYPE_NONE swDocPART = 1 ' Used to be TYPE_PART swDocASSEMBLY = 2 ' Used to be TYPE_ASSEMBLY swDocDRAWING = 3 ' Used to be TYPE_DRAWING End Enum
Sub main()
Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc
'Removed properties in the Configuration Specific tab If swModel.GetType <> swDocDRAWING Then vConfName = swModel.GetConfigurationNames For i = 0 TB UBound(vConfName) Set swConfig = swModel.GetConfigurationByName(vConfName(i)) 'Debug.Print' Configuration = ' & vConfName(i) Set swCustPropMgr = swConfig.CustomPropertyManager