Table of Contents

Class CommandFieldAttribute

Namespace
Hi.SessionCommands
Assembly
HiNc.dll

Marks a session-command property as a directly editable scalar field, so generic editors (e.g. the web UI's fallback command panel) can render and update it without a hand-written per-command editor. Supported property types: bool, int, double and string.

[AttributeUsage(AttributeTargets.Property, Inherited = false)]
public sealed class CommandFieldAttribute : Attribute
Inheritance
CommandFieldAttribute
Inherited Members
Extension Methods

Properties

Label

Display-label localization key (its English text). Default (null): the property name with PascalCase words spaced and any _unit suffix removed (e.g. MachiningResolution_mm → “Machining Resolution”).

public string Label { get; set; }

Property Value

string

PhysicsLicenseGated

The field configures physics simulation; GUIs disable it when the physics license is absent.

public bool PhysicsLicenseGated { get; set; }

Property Value

bool

Unit

Measurement unit shown after the input (e.g. mm), if any.

public string Unit { get; set; }

Property Value

string

Methods

GetLabel(PropertyInfo)

The effective display-label key of property: the attribute's explicit Label when set, otherwise the default derivation described on Label.

public static string GetLabel(PropertyInfo property)

Parameters

property PropertyInfo

The command property carrying this attribute.

Returns

string

The label localization key.