1 Reply Latest reply on Feb 19, 2016 8:17 AM by Matt Martens

    How to absorb parent features in a macro feature?

    Johannes Kronberger

      If I write a Macro feature I would like it's selections to be absorbed so that they subnodes in the tree? How do I do this?

        • Re: How to absorb parent features in a macro feature?
          Matt Martens

          You need to capture all the wanted subfeatures as IFeature objects. When you create your macro feature you need to capture it as an IFeature object and use IFeature::MakeSubFeature for each subfeature. You can't pass an array. You have to do each one individually. The two lines below show it in action. They are from one of my macro features.

           

          Set swFeat = swModel.FeatureManager.InsertMacroFeature3(name, "", (Methods), (Names), (Types), (Values), DimTypes, DimValues, editBody, (IconFiles), options)      'create the macrofeature

          swFeat.MakeSubFeature swSkFeat      'make the sketch a subfeature of the macro feature