2 Replies Latest reply on Apr 26, 2017 3:58 AM by Marko Rebec

    Propagate feature to parts

    Marko Rebec

      Hi Guys,


      I am trying to make a macro to change the Propagate feature to parts within the assembly Cut feature.I found one macro witch work fine but you have to select the feature manually.I want to traverse the assembly and change this option where needed bu t I'm struggling to do so.I think i am not selecting the feature the right way because I get false in  boolstat = swExtrudeFeatureData.AccessSelections(swRootComp, swChildComp) and boolstat = swFeat.ModifyDefinition(swExtrudeFeatureData, swRootComp, swChildComp)? I'm not very experienced in macros so any I would be very happy for any help.Find attached both macros.


        • Re: Propagate feature to parts
          Peter Brinkhuis

          First of all, why create a .bas file? You need to do that manually, otherwise SolidWorks would just create a .swp file including all the references.


          What are you really trying to do? Am I understanding it correctly?

          1. You have an assembly open
          2. You run the macro
          3. Find all occurrences of an extrude cut feature?
          4. Set every feature to cut across all?
            • Re: Propagate feature to parts
              Marko Rebec

              Hi Peter,


              Yes I know about the .bas file but sometimes I edit macros in Programmer's Notepad that is why.

              The hole story is that we have problems in some assemblies with assembly cut features witch do NOT work right.We generate the assembly from a template assembly with Design Table but some of those assembly feature do not execute or do not propagate to parts.I found the macro witch works fine on the top level and manually selected feature.We did write the macro who opens and closes the assembly feature witch is enough for some features but for others we have to open them manually uncheck the Propagate feature to parts, close and reopen and recheck the same option to get the feature work right.For now we just get the list of these assy features but we would like to do the manual work with a macro.So this is the hole story.

              Yes we would like to find all the assembly features and uncheck and check the Propegate feature.... on everyone of them not to do this manually.The macro is much faster.The features have different list of parts in the list.

              I would appreciate any help and thank you in advance.