1 Reply Latest reply on Oct 29, 2018 2:11 PM by Deepak Gupta

    Solidworks API Workflow help

    Andrew White

      Hi Everyone,

       

      I'm a new SW user converting over from Autodesk Inventor. I'm looking for a little direction on the SW API that I'm struggling with. I've been developing addins for Inventor for about 8 years so have a good understanding of programming in a 3D modeling space.

       

      In particular, I am looking to search through parameters on a sketch, identify a line segment and manipulate programmically.

       

      How I would do this in Inventor would be to set the part document oPart and:

       

      oPart > Features  > Sketches > Lines > Start Points and End Points

      Features/Sketches/Lines are all tables to which I search through looking for conditions to be met then change the values.

       

      For example:

      ...

      For i = 1 to oPart.Features.Count

           If oPart.Features(i).Type = "Extrude" then

                ....

           End If

      Next

       

      Does this exist in the context of the SolidWorks API?

       

      Thanks for any assistance you can provide.

        • Re: Solidworks API Workflow help
          Deepak Gupta

          Yes you can look for Sketch in the SOLIDWORKS API help files and can see all the functions. You may not see them like you've tabular form in inventor but otherwise it should be easy to find.

           

          For e.g. got to API help files, index tab and type sketch and you can find all the functions, methods, etc. available in the API.