Number Box in SOLIDWORKS Property Manager Page

Edit ArticleEdit Article

Simple number box
Simple number box

Number box will be automatically created for the properties of int and double types.

using CodeStack.SwEx.PMPage.Attributes;
using SolidWorks.Interop.swconst;

public class NumberBoxDataModel
{
    public int Number { get; set; }
    public double FloatingNumber { get; set; }

}

Style of the number box can be customized via the NumberBoxOptionsAttribute

Number boxes with additional styles allowing specifying the units and displaying thumbwheel for changing the value
Number boxes with additional styles allowing specifying the units and displaying thumbwheel for changing the value

using CodeStack.SwEx.PMPage.Attributes;
using SolidWorks.Interop.swconst;

public class NumberBoxDataModel
{

    [NumberBoxOptions(swNumberboxUnitType_e.swNumberBox_Length, 0, 1000, 0.01, true, 0.02, 0.001,
        swPropMgrPageNumberBoxStyle_e.swPropMgrPageNumberBoxStyle_Thumbwheel)]
    public double Length { get; set; }
}

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