3 Replies Latest reply on Dec 4, 2012 10:55 AM by Jacob Johnson

    Edit Extrude in 2 directions

    Jacob Johnson

      Hey guys,


      I need to edit an extrude that is extruded in 2 directions, one direction ends on a reference plane and so does the second direction. Currently I am using ExtrudeFeatureData2::AccessSelections to get access. Then I am using ExtrudeFeatureData2::GetEndConditionReference to get one of the directions.


      The other direction is where I am having touble, it makes sense to me that if you are extruding to a single plane that "GetEndConditionReference" is the correct call. It's almost like I need a method that will get multiple end conditions.. but I am not seeing something I can use to return multiple objects - unless I have to build my own loop and iterate trough it.


      Anyone out there willing to take a stab at this one? Thanks!

        • Re: Edit Extrude in 2 directions
          Artem Taturevych

          Please check the picture.




          This is what this method expected to return. As you can see SolidWorks only supports single objects there. Could you please clarify what are you going to get (sample models and expecetd results woudl be the best)?



          Artem Taturevych

          Application Engineer at Intercad


          Tel: +61 2 9454 4444

            • Re: Edit Extrude in 2 directions
              Jacob Johnson

              Ultimately I am deleteing an extrude, but prior to doing this I need to capture the planes it used and the name of the sketch that it used.


              Once I have that data I can delete the extrude feature (leaving the sketch behind). Then I need to recreate 2 new planes and name them after the sketch used for the extrude and append the word "plane_x" to the end of it I also need to set those reference planes to the original planes found in the extrude.


              I have it all working for an extrude that only uses 1 direction. I have roughly 600+ extrudes over about 100+ parts that need this conversion. I ran into a situation where some of these extrudes extrude in 2 directions.


              Now I have to write a condition that checks for mulitple directions and handle them differently.


              The example shows 2 planes called "Ref1 and Ref2" These are for example purposes only. The real parts have a part reference inserted into them containing many planes, ref 1 & 2 would be found inside.


              There is additional code later that needs to find sketches and thier matching planes to perform other tasks.

              • Re: Edit Extrude in 2 directions
                Jacob Johnson

                Ah I was misinterpreting the true / false on the params of the method. True returns the frist direction, false returns the second?




                Tested this - it works


                This is what confused me in the API help:



                True for forward direction, false for reverse

                I mistook that description as the toggle button on the extrude to change directions and not Direction 1 and 2.