Macro to set material props for part file?

Does anyone have a VB example of how to set the material properties for a part file? Specifically I want to set the Area/Hatch Fill option to None for over 100 part files and would really like to do that with a macro rather than manually. I am a novice at programming but if someone could provide an example I think I could take it from there.

Thanks,

Sam

Reply to
Sam
Loading thread data ...

Dim swApp As Object Dim Part As Object Dim boolstatus As Boolean Dim longstatus As Long, longwarnings As Long Dim FeatureData As Object Dim Feature As Object Dim Component As Object Sub main()

Set swApp = Application.SldWorks

Set Part = swApp.ActiveDoc Part.SetUserPreferenceStringValue swMaterialPropertyCrosshatchPattern, "None" End Sub

Reply to
Craig

Thanks Craig, it looks like this worked great.

Sam

Reply to
Sam

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.