0 Replies Latest reply on Jun 29, 2017 4:36 PM by Ryan Nesteruk

    Library Feature Macro

    Ryan Nesteruk

      I am trying to write my first Macro and really having a hard time


      Macro Needs to

           -Measure a hole on an imported .stp file from a users face selection

           -From the holes measurement open the dialogue for a specific library feature

           -there are 4 different hole sizes that need to be linked to 4 different library features

           -User will select the faces and axis required for the library features


      Just finished going through the Solidworks API Fundamentals book for the first time and still having a really hard time grasping the API object Model


      was thinking the code should go something like this


      use the face2 object and the measure object to get the dimension from selection

      use if statements to somehow open up the library features

                    ex. If (measurement from above) = (required measurement) then

                              Execute code to initialize library feature

      I thought that this would be an easy project but as soon as I start actually trying to make the code from scratch I feel like I don't understand anything


      any help or suggestions with this problem would be greatly appreciated