Managing selection of SOLIDWORKS macro feature

Edit ArticleEdit Article
public class MacroFeatureParams
{
    //selection parameter of any entity (e.g. face, edge, feature etc.)
    [ParameterSelection]
    public object AnyEntity { get; set; }

    //selection parameter of body
    [ParameterSelection]
    public IBody2 Body { get; set; }

    //selection parameter of array of faces
    [ParameterSelection]
    public List<IFace2> Faces { get; set; }

Parameter properties can be specified either using the direct SOLIDWORKS type or as object if type is unknown. List of selections is also supported.

OnRebuild handler will be called if any of the selections have changed.

Notifications

Join session by SOLIDWORKS and PDM API expret Artem Taturevych at 3DEXPERIENCE World 2025 on Feb 26 at 08:30 AM CST to explore 10 essential macros for automating drawings, assemblies, custom properties, and more


Product of Xarial Product of Xarial