i am trying to chang the existed distant value in an assembelly. i record the macro and following program is obtained .
I dont know how to chang valu of distance.
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
Dim myModelView As Object
Set myModelView = Part.ActiveView
myModelView.FrameState = swWindowState_e.swWindowMaximized
boolstatus = Part.Extension.SelectByID2("Distance2", "MATE", 0, 0, 0, False, 0, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("", "FACE", 0.1074672313101, 0.1167464688998, 0.1098230459615, True, 1, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("", "FACE", 0.110331837419, 0.1176407117497, 0.1058237508278, True, 1, Nothing, 0)
Part.EditMate2 5, 1, False, 0.005, 0.005, 0.005, 0.001, 0.001, 0, 0.5235987755983, 0.5235987755983, longstatus
Part.ClearSelection2 True
Part.EditRebuild3
End Sub
SolidworksApi macros