2 Replies Latest reply on Mar 20, 2018 10:43 AM by Harold Black

    Selecting all entities for trim

    Harold Black

      I'm having the hardest time finding how to select all entities in a sketch for a Trim away inside operation

        • Re: Selecting all entities for trim
          Tony Tieuli

          Harold Black wrote:

           

          I'm having the hardest time finding how to select all entities in a sketch for a Trim away inside operation

          Don't forget you have to select two bounding entities first then you can just box select the whole sketch.

          Any part of any entities that are inside the two bounding entities will be trimmed.

           

          EDIT:

          I didn't notice that this message is in the API/Macro forum. Sorry about that.

            • Re: Selecting all entities for trim
              Harold Black

              I set variables as SldWorks.SketchSegment for the spline, horizontal line, and seed vertical line and I can't seem to figure out how to do this for the array of vertical lines I created.

               

              EDIT: Figured it out

               

              I use these lines to select the boundary lines

              vSegs = swSketch.GetSketchSegments

              Set swSketchSeg = vSegs(UBound(vSegs))

              swSketchSeg.Select4 True, seldata

               

              I then use these lines to select all the sketch segments

              vSegs = swSketch.GetSketchSegments

              For Each Seg In vSegs

                   Set swSketchSeg = Seg

                        swSketchSeg.Select True

              Next Seg

               

              Followed by my trim operation