Framework for .NET (C# and VB.NET) to create modern application for CAD systems (SOLIDWORKS, SOLIDWORKS Document Manager, Autodesk Inventor, etc.)
Get technical support Connect to xCAD community on Discord server Explore code and application examples xCAD.NET Templates for Visual Studio and VS Code Access source code

Managing selection of SOLIDWORKS macro feature

using System.Collections.Generic;
using Xarial.XCad.Geometry;

namespace Xarial.XCad.Documentation
    public class MacroFeatureSelectionParams
        //selection parameter of any entity (e.g. face, edge, feature etc.)
        public IXSelObject AnyEntity { get; set; }

        //selection parameter of body
        public IXBody Body { get; set; }

        //selection parameter of array of faces
        public List<IXFace> Faces { get; set; }

Parameters of IXSelObject will be recognized as selection objects and stored appropriately in macro feature.

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

Powered by Docify