Hello, we have the part in a folder or we would be able toapply equations during the night with the task scheduler. Today wehave a macro that works manually. We'd like to put it in the taskscheduler to make the entire file during the night. How can i dothat?
Our macro today
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("Equations", "EQNFOLDER",0, 0, 0, False, 0, Nothing, 0)
Part.ClearSelection2 True
Part.DeleteAllRelations
Part.AddRelation """ENTREAXE""=152"
Part.AddRelation """DistBord""=""D2@Sketch16""*2"
Part.AddRelation"""D1@LPattern2""=INT((IIF((""D1@Sketch1""-""DistBord"")<""ENTREAXE"",""ENTREAXE"", ""D1@Sketch1"")-""DistBord"")/""ENTREAXE"")+2"
Part.AddRelation"""D3@LPattern2""=(""D1@Sketch1""-(2*""D2@Sketch16""))/(""D1@LPattern2""-1)"
boolstatus = Part.EditRebuild3()
End Sub
I put this in the task scheduler but where could I define the filewho do this macro ??
Richard
My first language is french I hope you understand my requesthihihihihi
SolidworksApi macros

Our macro today
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("Equations", "EQNFOLDER",0, 0, 0, False, 0, Nothing, 0)
Part.ClearSelection2 True
Part.DeleteAllRelations
Part.AddRelation """ENTREAXE""=152"
Part.AddRelation """DistBord""=""D2@Sketch16""*2"
Part.AddRelation"""D1@LPattern2""=INT((IIF((""D1@Sketch1""-""DistBord"")<""ENTREAXE"",""ENTREAXE"", ""D1@Sketch1"")-""DistBord"")/""ENTREAXE"")+2"
Part.AddRelation"""D3@LPattern2""=(""D1@Sketch1""-(2*""D2@Sketch16""))/(""D1@LPattern2""-1)"
boolstatus = Part.EditRebuild3()
End Sub
I put this in the task scheduler but where could I define the filewho do this macro ??
Richard
My first language is french I hope you understand my requesthihihihihi
SolidworksApi macros