CAM API
  • CAM API
v20.0.1
Search Results for

    Show / Hide Table of Contents

    Interface IST_PropDefaultsEditor

    Interface for accessing and modifying user-defined default values on property descriptors. Implemented by TSCPropDescriptor. Obtained via Supports/QueryInterface on IST_XMLPropDescriptor. UserDefaultValue and UserInchDefaultValue are stored in-memory only (fAttributes). The .usrdef files persist them across restarts.

    Namespace: STXMLPropTypes
    Assembly: STXMLPropTypes.dll
    Syntax
    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    [Guid("3A8F5D2C-7E14-4B93-A621-9F0C3E8B5D47")]
    public interface IST_PropDefaultsEditor

    Methods

    ClearUserDefaultValue()

    Remove both UserDefaultValue and UserInchDefaultValue from fAttributes

    Declaration
    void ClearUserDefaultValue()

    GetIsMetric()

    True if current unit system is metric

    Declaration
    bool GetIsMetric()
    Returns
    Type Description
    bool

    GetNameSpaceID()

    ID of the namespace that owns this descriptor (e.g. 'Operations')

    Declaration
    string GetNameSpaceID()
    Returns
    Type Description
    string

    GetSystemDefaultValue()

    System default value: raw DefaultValue attribute, no unit conversion, no user override

    Declaration
    string GetSystemDefaultValue()
    Returns
    Type Description
    string

    GetSystemInchDefaultValue()

    System inch default value: raw InchDefaultValue attribute, no user override

    Declaration
    string GetSystemInchDefaultValue()
    Returns
    Type Description
    string

    GetUserDefaultValue()

    User-defined metric default value (stored in fAttributes['UserDefaultValue'])

    Declaration
    string GetUserDefaultValue()
    Returns
    Type Description
    string

    GetUserInchDefaultValue()

    User-defined inch default value (stored in fAttributes['UserInchDefaultValue'])

    Declaration
    string GetUserInchDefaultValue()
    Returns
    Type Description
    string

    HasInchVariant()

    True if the descriptor has a meaningful inch variant (DimKind enables unit conversion, or InchDefaultValue is explicitly set). For non-unit-aware props (Boolean, Enumerated, String, etc.) returns False — such props should store user defaults only in UserDefaultValue.

    Declaration
    bool HasInchVariant()
    Returns
    Type Description
    bool

    HasUserDefaultValue()

    True if any user default is set (metric or inch)

    Declaration
    bool HasUserDefaultValue()
    Returns
    Type Description
    bool

    SetUserDefaultValue(string)

    Set user-defined metric default value. Triggers hot reload immediately.

    Declaration
    void SetUserDefaultValue(string Value)
    Parameters
    Type Name Description
    string Value

    SetUserInchDefaultValue(string)

    Set user-defined inch default value. Triggers hot reload immediately.

    Declaration
    void SetUserInchDefaultValue(string Value)
    Parameters
    Type Name Description
    string Value
    In this article