Hi all
I've been designing a macro since the beginning of the year to automate drawings. Depending on my parts, they have options that I have set and some of its options are pairs of two options. I was recently told that rather than copying / pasting for the latter it was possible to do like calls to make my macro more understandable but I have absolutely no idea how to go about it.
I give you as an example option n°1 that I have set as below, moreover the selection of each option is made according to the value of "U" example: U=1 then make option n°1.
ElseIf U = 1 Then
boolstatus = Part.Extension.SelectByID2("Right Plan", "PLANE", 0, 0, 0, False, 0, Nothing, 0)
If O < 6 / 1000 Then
Set SkCircle = Part.SketchManager.CreateCircle(-Length / 1000 - M + 0.0035, 0, 0, -Length / 1000 - M + 0.0035, -0.001, 0)
ElseIf O >= 6 / 1000 Then
Set SkCircle = Part.SketchManager.CreateCircle(-Length / 1000 - M + 0.0035, 0, 0, -Length / 1000 - M + 0.0035, -0.001, 0)
End If
boolstatus = Part.Extension.SelectByID2("Arc1", "SKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
Part.FeatureManager.FeatureCut False, False, False, 1, 0.04, 0.04, False, False, False, 0.01745329251994, 0.01745329251994, False, False, False, False, 0, 1, 1
Part.SelectionManager.EnableContourSelection = 0
The option I'm trying to set more briefly is n°5 which merges option n°1 and n°2.
Thank you in advance for your attention