Macro to set material props for part file?

Jul 24, 2006 2 Replies

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



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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required