Hello
I'm far from being an expert in VBA, and yet I'm looking for a way to modify tolerances according to a conditional formula in VBA. For the moment I can just select a dimension and modify its tolerance, but I get stuck because I can't get the value of this controlled dimension for the conditional formula from which the choice of tolerance results.
I already have this:
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.ActivateView("Drawing View12")
boolstatus = Part.Extension.SelectByID2("RD1@Drawing View12", "DIMENSION", 0.133426296089701, 0.207466790382401, 0, False, 0, Nothing, 0)
boolstatus = Part.EditDimensionProperties2(4, 0.0001, 0, "", "", True, 9, 1, True, 12, 12, "", "", True, "", "", True)
Part.ClearSelection2 True
End Sub
Does anyone have a proposal?
Thanks in advance