Search Results for

    Show / Hide Table of Contents

    Interface IParameters

    Gives access to operation parameters. A parameter is mainly defined by its name, composed of a simple name, with categories following :

    LeadRadius@Lead|LeadIn

    where LeadRadius is the simple name, '@' is a separator between the name and the categories. Lead and LeadIn are two categories, separated by a '|' character. To be sure to get the parameter from the correct operation, insert the operation type as a new category :

    LeadRadius@Lead|LeadIn|NCOperation

    Namespace: TopSolid.Cam.NC.Kernel.Automating
    Assembly: TopSolid.Cam.NC.Kernel.Automating.dll
    Syntax
    public interface IParameters

    Methods

    GetCategories(String)

    Gets the categories, of a Cam operation parameter.

    Declaration
    string[] GetCategories(string inFullName)
    Parameters
    Type Name Description
    System.String inFullName

    Identifier of the parameter to analyze.

    Returns
    Type Description
    System.String[]

    Categories. is added as a new category.

    GetEnumTypeName(ParameterId)

    Gets the enum type name corresponding to the parameter.

    Declaration
    string GetEnumTypeName(ParameterId inParameterId)
    Parameters
    Type Name Description
    ParameterId inParameterId

    Identifier of the parameter to analyze.

    Returns
    Type Description
    System.String

    Enum type name corresponding to the parameter.

    Remarks

    An integer parameter can hold a value taken from an enumeration. This function will give the enumeration type full name (like TopSolid.Cam.NC.Kernel.common.DrillingType) for later usage. If the parameter is not containing an enum value, the string will be empty.

    GetEnumValueNames(String, Boolean)

    Gets the enum value names corresponding to the given enum type.

    Declaration
    List<string> GetEnumValueNames(string inEnumTypeName, bool inLocalized)
    Parameters
    Type Name Description
    System.String inEnumTypeName

    Type full name of the enum to analyze.

    System.Boolean inLocalized

    True if the names must be localized according to TopSolid user interface culture.

    Returns
    Type Description
    System.Collections.Generic.List<System.String>

    Enum value names corresponding to the enum type. The result is a list where each value of the enum is at its index in the list. For instance, an enum with 0,1,2 and 4 will return the list { zero, one, two, __, four }. Result[4] gives "four" !

    Remarks

    An integer parameter can hold a value taken from an enumeration. To know which values can be used, a user must be able to select this value in a listbox or a combo. But if a combo filled with 0,1 and 2 is not very expressive. So use this function to get the localized text corresponding to 0,1 and 2!

    GetFullName(ParameterId)

    Gets the full name with categories, of a Cam operation parameter.

    Declaration
    string GetFullName(ParameterId inParameterId)
    Parameters
    Type Name Description
    ParameterId inParameterId

    Identifier of the parameter to analyze.

    Returns
    Type Description
    System.String

    Full name of the parameter, with categories. The type of the operation is added as a new category.

    GetLocalizedName(ParameterId)

    Gets the translated name of a Cam operation parameter.

    Declaration
    string GetLocalizedName(ParameterId inParameterId)
    Parameters
    Type Name Description
    ParameterId inParameterId

    Identifier of the parameter to analyze.

    Returns
    Type Description
    System.String

    Translated name of the parameter. The TopSolid culture is used for the translation.

    GetName(ParameterId)

    Gets the name of a Cam operation parameter.

    Declaration
    string GetName(ParameterId inParameterId)
    Parameters
    Type Name Description
    ParameterId inParameterId

    Identifier of the parameter to analyze.

    Returns
    Type Description
    System.String

    Name of the parameter, without categories.

    GetNamedValue(ElementExId, String)

    Gets the value of the given parameter. The kind of SmartObject is fixed by the ParameterType. If the parameter is a bound, the returned object is a SmartInteger with the type. Use GetNamedValueBoundValue(ElementExId, String) and GetNamedValueBoundElement(ElementExId, String) to get other items of the bound parameter.

    Declaration
    SmartObject GetNamedValue(ElementExId inElementId, string inName)
    Parameters
    Type Name Description
    ElementExId inElementId

    Element owner of the parameter.

    System.String inName

    Full or partial name of the parameter to get.

    Returns
    Type Description
    SmartObject

    A new SmartObject with the current value of the parameter. A SmartInteger with the type for a bound parameter.

    GetNamedValueBoundElement(ElementExId, String)

    From a bound parameter, get a ElementId with the bound limitation element. Use GetValue(ParameterId) to get the bound type, and GetValueBoundValue(ParameterId) to get the limitation value.

    Declaration
    ElementId GetNamedValueBoundElement(ElementExId inElementId, string inName)
    Parameters
    Type Name Description
    ElementExId inElementId

    Element owner of the parameter.

    System.String inName

    Full or partial name of the parameter to get.

    Returns
    Type Description
    ElementId

    The element id or empty id.

    GetNamedValueBoundValue(ElementExId, String)

    From a bound parameter, get a SmartReal with the computed bound value. Use GetValue(ParameterId) to get the bound type, and GetValueBoundElement(ParameterId) to get the limitation element.

    Declaration
    SmartReal GetNamedValueBoundValue(ElementExId inElementId, string inName)
    Parameters
    Type Name Description
    ElementExId inElementId

    Element owner of the parameter.

    System.String inName

    Full or partial name of the parameter to get.

    Returns
    Type Description
    SmartReal

    A new SmartReal with the computed value of the parameter.

    GetNamedValueFeedRateValue(ElementExId, String)

    From a feedrate parameter, get a SmartReal with the computed feedrate value. Use GetValue(ParameterId) to get the feedrate type.

    Declaration
    SmartReal GetNamedValueFeedRateValue(ElementExId inElementId, string inName)
    Parameters
    Type Name Description
    ElementExId inElementId

    Element owner of the parameter.

    System.String inName

    Full or partial name of the parameter to get.

    Returns
    Type Description
    SmartReal

    A new SmartReal with the computed value of the parameter.

    GetNamedValueSpindleRateValue(ElementExId, String)

    From a spindle rate parameter, get a SmartReal with the computed spindle rate value. Use GetValue(ParameterId) to get the spindle rate type.

    Declaration
    SmartReal GetNamedValueSpindleRateValue(ElementExId inElementId, string inName)
    Parameters
    Type Name Description
    ElementExId inElementId

    Element owner of the parameter.

    System.String inName

    Full or partial name of the parameter to get.

    Returns
    Type Description
    SmartReal

    A new SmartReal with the computed value of the parameter.

    GetParameter(ElementExId, String)

    Gets the parameter id of the first parameter with the given name. The name can be full, with all categories. This is the best way to find the correct parameter. It can also be only the simple name, with partial categories, or no categories at all. The first name found with the given argument is returned.

    Declaration
    ParameterId GetParameter(ElementExId inElementId, string inName)
    Parameters
    Type Name Description
    ElementExId inElementId

    Owner of the parameter.

    System.String inName

    Name of the parameter, with categories or not.

    Returns
    Type Description
    ParameterId

    Found parameter id.

    GetParameterEnumValueNames(ParameterId, Boolean)

    Gets the enum value names corresponding to the given enum parameter.

    Declaration
    List<string> GetParameterEnumValueNames(ParameterId inParameterId, bool inLocalized)
    Parameters
    Type Name Description
    ParameterId inParameterId

    Id of the parameter to analyze.

    System.Boolean inLocalized

    True if the names must be localized according to TopSolid user interface culture.

    Returns
    Type Description
    System.Collections.Generic.List<System.String>

    Enum value names corresponding to the enum type of the given parameter. The result is a list where each value of the enum is at its index in the list. For instance, an enum with 0,1,2 and 4 will return the list { zero, one, two, __, four }. Result[4] gives "four" !

    Remarks

    An integer parameter can hold a value taken from an enumeration. To know which values can be used, a user must be able to select this value in a Listbox or a combo. But if a combo filled with 0,1 and 2 is not very expressive. So use this function to get the localized text corresponding to 0,1 and 2 ! The list will use of course the enum type from the parameter. Some parameters exclude specific values not relevant in this particular use case. The list will not contain those forbidden values.

    GetParameters(ElementExId)

    Gets the parameters of the given operation.

    Declaration
    List<ParameterId> GetParameters(ElementExId inElementId)
    Parameters
    Type Name Description
    ElementExId inElementId

    Identifier of the Cam operation to analyze.

    Returns
    Type Description
    System.Collections.Generic.List<ParameterId>

    Operation parameters found.

    Remarks

    Parameters come from all the operations inside the main one. A new category is automatically added to specify from which kind of operation is extracted the parameter... The categories are "NCOperation", "SetupOperation", "WeakTuningOperation", "StrongTuningOperation"

    GetType(ParameterId)

    Gets the type corresponding to the parameter.

    Declaration
    ParameterType GetType(ParameterId inParameterId)
    Parameters
    Type Name Description
    ParameterId inParameterId

    Identifier of the parameter to analyze.

    Returns
    Type Description
    ParameterType

    Type corresponding to the parameter.

    GetValue(ParameterId)

    Gets the value of the given parameter. The kind of SmartObject is fixed by the ParameterType: SmartInteger for integer parameter, SmartReal for real parameter, et caetera... If the parameter is a composite, like bound or feedrate, the returned object is a SmartInteger with the type. Use GetValueBoundValue(ParameterId) and GetValueBoundElement(ParameterId) to get other items of the bound parameter.

    Declaration
    SmartObject GetValue(ParameterId inParameterId)
    Parameters
    Type Name Description
    ParameterId inParameterId

    Parameter to get.

    Returns
    Type Description
    SmartObject

    A new SmartObject with the current value of the parameter. A SmartInteger with the type for a bound parameter.

    GetValueBoundElement(ParameterId)

    From a bound parameter, get a ElementId with the bound limitation element. Use GetValue(ParameterId) to get the bound type, and GetValueBoundValue(ParameterId) to get the limitation value.

    Declaration
    ElementId GetValueBoundElement(ParameterId inParameterId)
    Parameters
    Type Name Description
    ParameterId inParameterId

    Parameter to get.

    Returns
    Type Description
    ElementId

    The element id or empty id.

    GetValueBoundValue(ParameterId)

    From a bound parameter, get a SmartReal with the bound value. Use GetValue(ParameterId) to get the bound type, and GetValueBoundElement(ParameterId) to get the limitation element.

    Declaration
    SmartReal GetValueBoundValue(ParameterId inParameterId)
    Parameters
    Type Name Description
    ParameterId inParameterId

    Parameter to get.

    Returns
    Type Description
    SmartReal

    A new SmartReal with the current value of the parameter.

    GetValueFeedRateValue(ParameterId)

    From a feedrate parameter, get a SmartReal with the type value. Use GetValue(ParameterId) to get the feedrate type.

    Declaration
    SmartReal GetValueFeedRateValue(ParameterId inParameterId)
    Parameters
    Type Name Description
    ParameterId inParameterId

    Parameter to get.

    Returns
    Type Description
    SmartReal

    A new SmartReal with the current value of the parameter.

    GetValueSpindleRateValue(ParameterId)

    From a spindle rate parameter, get a SmartReal with the type value. Use GetValue(ParameterId) to get the spindle rate type.

    Declaration
    SmartReal GetValueSpindleRateValue(ParameterId inParameterId)
    Parameters
    Type Name Description
    ParameterId inParameterId

    Parameter to get.

    Returns
    Type Description
    SmartReal

    A new SmartReal with the current value of the parameter.

    IsReadOnly(ParameterId)

    Checks if the given parameter can be modified or not.

    Some parameters are computed and only readable. Others can be modified to change the element owner behavior. If modifiable, a parameter value can be changed with SetValue functions.

    Declaration
    bool IsReadOnly(ParameterId inParameterId)
    Parameters
    Type Name Description
    ParameterId inParameterId

    Parameter to check.

    Returns
    Type Description
    System.Boolean

    True if a SetValue function can be called to change its value.

    SetNamedValue(ElementExId, String, SmartObject)

    Sets the value of the given parameter. The kind of SmartObject is fixed by the ParameterType: SmartInteger for integer parameter, SmartReal for real parameter, et caetera... Bound parameters must be set by the according functions.

    Declaration
    bool SetNamedValue(ElementExId inElementId, string inName, SmartObject inValue)
    Parameters
    Type Name Description
    ElementExId inElementId

    Element owner of the parameter.

    System.String inName

    Full or partial name of the parameter to fix.

    SmartObject inValue

    New value.

    Returns
    Type Description
    System.Boolean

    True if the value has been changed. False if the value have not changed.

    Remarks

    Warning : this function is only usable for Real, Int, Bool and Text parameters. All other types are not available here.

    SetValue(ParameterId, SmartObject)

    Sets the value of the given parameter. The kind of SmartObject is fixed by the ParameterType: SmartInteger for integer parameter, SmartReal for real parameter, et caetera... Bound parameters must be set by the according functions.

    Declaration
    bool SetValue(ParameterId inParameterId, SmartObject inValue)
    Parameters
    Type Name Description
    ParameterId inParameterId

    Parameter to fix.

    SmartObject inValue

    New value.

    Returns
    Type Description
    System.Boolean

    True if the value has been changed. False if the value have not changed.

    Remarks

    Warning : this function is only usable for Real, Int, Bool and Text parameters types. All other types are not available here.

    ToInvariantStringValue(ParameterId)

    Gets the text corresponding to the parameter value, without translation.

    Declaration
    string ToInvariantStringValue(ParameterId inParameterId)
    Parameters
    Type Name Description
    ParameterId inParameterId

    Identifier of the parameter to analyze.

    Returns
    Type Description
    System.String

    Text corresponding to the parameter value. The invariant culture is used.

    Remarks

    The numerical values are given in meters and radians without any unit.

    ToStringValue(ParameterId)

    Gets the localized text corresponding to the parameter value.

    Declaration
    string ToStringValue(ParameterId inParameterId)
    Parameters
    Type Name Description
    ParameterId inParameterId

    Identifier of the parameter to analyze.

    Returns
    Type Description
    System.String

    Localized text corresponding to the parameter value. The TopSolid culture is used for the translation.

    In This Article
    • Mentions légales
    • C.G.U
    • Données personnelles

    Copyright © 2024 TopSolid Tous droits réservés