I have a drop down menu that was just added to our custom properties.
It has two values, P or M.
Is it possible to update a library full of components to one of the options in the drop down list using the task scheduler or other means?
So far, the easiest solution I have found is to load all the parts into a single assembly, select them all in the tree and from there I can change the mass properties for all at once and then save the temporary assembly which updates the parts.
I think that is how I did a bunch of em in 2005 when you could use the bom to update properties cause it would write back to the parts...
You could write a macro to open all the files in a folder and change the property to the required one and save.
Dim swApp As SldWorks.SldWorks
Dim swModel As ModelDoc2
Dim swCustProp As CustomPropertyManager
Dim Property As Variant
Dim sFileName As String
Dim Path As String
Dim nErrors As Long
Dim nWarnings As Long
Set swApp = Application.SldWorks
Path = "Path of your Folder here"
Property = 'p'
sFileName = Dir(Path & "*.sldprt")
Do Until sFileName = ""
Set swModel = swApp.OpenDoc6(Path + sFileName, swDocPART, swOpenDocOptions_Silent, "", nErrors, nWarnings)
Set swModel = swApp.ActiveDoc
Set swCustProp = swModel.Extension.CustomPropertyManager("")
swModel.AddCustomInfo3 "", "Property", swCustomInfoText, Property
Set swModel = Nothing
sFileName = Dir
You can also use the tool #TASK as well to run Macro's on select folders and file types.
Retrieving data ...