AnsweredAssumed Answered

playing back recorded macro fails...

Question asked by Nick Middleton on Jul 5, 2017
Latest reply on Jul 6, 2017 by Nick Middleton

I am trying to create a macro button that will modify precision on both normal angle and also chamfer angle precision. I can get the button to change the normal angle precission however it will not update the chamfer precision. can anybody explain what is wrong? the crazy thing is... when I record the macro, the precision changes fine.

 

Any help would be appreciated.

 

 

Dim swApp As Object

 

 

Dim Part As Object

Dim boolstatus As Boolean

Dim longstatus As Long, longwarnings As Long

 

 

Sub main()

 

 

Set swApp = _

Application.SldWorks

 

 

Set Part = swApp.ActiveDoc

boolstatus = Part.Extension.SetUserPreferenceInteger(swUserPreferenceIntegerValue_e.swDimensionsExtensionLineStyleThickness, swUserPreferenceOption_e.swDetailingChamferDimension, swLineWeights_e.swLW_THIN)

boolstatus = Part.Extension.SetUserPreferenceInteger(swUserPreferenceIntegerValue_e.swDetailingAngularDimPrecision, swUserPreferenceOption_e.swDetailingChamferDimension, 0)

End Sub

 

 

 

precision.png

Outcomes