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; }
}

Product of Xarial Product of Xarial