FunctionBuilder Class¶
-
class
NXOpen.CAE.
FunctionBuilder
¶ Bases:
NXOpen.Builder
This builder class is used to create or edit
NXOpen.CAE.Function
objects.All:
CAE.FunctionBuilder.Name()
,CAE.FunctionBuilder.SetTypes()
,CAE.FunctionBuilder.SetUnits()
;formula:
CAE.FunctionBuilder.SetDefinitions()
,CAE.FunctionBuilder.SetReferencedObjects()
,CAE.FunctionBuilder.SetMathPlotData()
;table function:
CAE.FunctionBuilder.SetTableData()
.To create a new instance of this class, use
NXOpen.CAE.FunctionCollection.CreateFunctionBuilder()
New in version NX5.0.0.
Properties¶
Property | Description |
---|---|
InitialEstimateValue | Returns or sets the initial value for function |
Name | Returns or sets the function name. |
Tag | Returns the Tag for this object. |
Methods¶
Method | Description |
---|---|
Commit | Commits any edits that have been applied to the builder. |
Destroy | Deletes the builder, and cleans up any objects created by the builder. |
GetCommittedObjects | For builders that create more than one object, this method returns the objects that are created by commit. |
GetDefinitions | Returns definition strings of a math function. |
GetMathPlotData | Returns plot data setting of a math function. |
GetObject | Returns the object currently being edited by this builder. |
GetReferencedObjects | Returns referenced objects of a math function. |
GetTableData | Returns data of a table function. |
GetTypes | Returns types of a function |
GetUnits | Returns units of a function |
SetDefinitions | Sets definition strings of a math function. |
SetMathPlotData | Sets plot data setting for a math function. |
SetReferencedObjects | Sets referenced objects of a math function. |
SetTableData | Sets data for a table function. |
SetTypes | Sets types of a function |
SetUnits | Sets units of a function |
ShowResults | Updates the model to reflect the result of an edit to the model for all builders that support showing results. |
Validate | Validate whether the inputs to the component are sufficient for commit to be called. |
Property Detail¶
InitialEstimateValue¶
-
FunctionBuilder.
InitialEstimateValue
¶ Returns or sets the initial value for function
-------------------------------------
Getter Method
Signature
InitialEstimateValue
Returns: Return type: float New in version NX12.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
InitialEstimateValue
Parameters: val (float) – New in version NX12.0.0.
License requirements: None.
Name¶
-
FunctionBuilder.
Name
¶ Returns or sets the function name.
For math function, the name is function name. For table function, the name is the AFU file name with directory
-------------------------------------
Getter Method
Signature
Name
Returns: Return type: str New in version NX5.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
Name
Parameters: name (str) – New in version NX5.0.0.
License requirements: None.
Method Detail¶
GetDefinitions¶
-
FunctionBuilder.
GetDefinitions
¶ Returns definition strings of a math function.
Only used when function type is
NXOpen.CAE.FunctionType.Math
Signature
GetDefinitions()
Returns: Return type: list of str New in version NX5.0.0.
License requirements: None.
GetMathPlotData¶
-
FunctionBuilder.
GetMathPlotData
¶ Returns plot data setting of a math function.
Only used when function type is
NXOpen.CAE.FunctionType.Math
Signature
GetMathPlotData()
Returns: a tuple Return type: A tuple consisting of (dataCount, xMinimum, xIncrement) dataCount is a int. xMinimum is a float. xIncrement is a float. New in version NX5.0.0.
License requirements: None.
GetReferencedObjects¶
-
FunctionBuilder.
GetReferencedObjects
¶ Returns referenced objects of a math function.
Only used when function type is
NXOpen.CAE.FunctionType.Math
Signature
GetReferencedObjects()
Returns: Return type: list of NXOpen.CAE.Function
New in version NX5.0.0.
License requirements: None.
GetTableData¶
-
FunctionBuilder.
GetTableData
¶ Returns data of a table function.
Only used when function type is
NXOpen.CAE.FunctionType.Table
Signature
GetTableData()
Returns: a tuple Return type: A tuple consisting of (recordIndex, recordName, recordTimestamp, interpolateMethod). recordIndex is a int. Begins with one recordName is a str. recordTimestamp is a str. A time string indicating the last creating or editing time of an afu record interpolateMethod is a NXOpen.CAE.FunctionInterpolationMethod
.New in version NX5.0.0.
License requirements: None.
GetTypes¶
-
FunctionBuilder.
GetTypes
¶ Returns types of a function
Signature
GetTypes()
Returns: a tuple Return type: A tuple consisting of (functionType, macroType, generalType). functionType is a NXOpen.CAE.FunctionType
. Math function or Table function macroType is aNXOpen.CAE.XyFunctionMacroType
. For Motion Simulation or Advanced Simulation or General Purpose generalType is aNXOpen.CAE.XyFunctionGeneralType
. Data type of functionNew in version NX5.0.0.
License requirements: None.
GetUnits¶
-
FunctionBuilder.
GetUnits
¶ Returns units of a function
Signature
GetUnits()
Returns: a tuple Return type: A tuple consisting of (xUnit, yUnit, frfUnit). xUnit is a NXOpen.CAE.XyFunctionUnit
. yUnit is aNXOpen.CAE.XyFunctionUnit
. frfUnit is aNXOpen.CAE.XyFunctionUnit
.New in version NX5.0.0.
License requirements: None.
SetDefinitions¶
-
FunctionBuilder.
SetDefinitions
¶ Sets definition strings of a math function.
Only used when function type is
NXOpen.CAE.FunctionType.Math
Signature
SetDefinitions(definitions)
Parameters: definitions (list of str) – New in version NX5.0.0.
License requirements: None.
SetMathPlotData¶
-
FunctionBuilder.
SetMathPlotData
¶ Sets plot data setting for a math function.
Only used when function type is
NXOpen.CAE.FunctionType.Math
Signature
SetMathPlotData(dataCount, xMinimum, xIncrement)
Parameters: - dataCount (int) –
- xMinimum (float) –
- xIncrement (float) –
New in version NX5.0.0.
License requirements: None.
SetReferencedObjects¶
-
FunctionBuilder.
SetReferencedObjects
¶ Sets referenced objects of a math function.
Only used when function type is
NXOpen.CAE.FunctionType.Math
Signature
SetReferencedObjects(objects)
Parameters: objects (list of NXOpen.CAE.Function
) –New in version NX5.0.0.
License requirements: None.
SetTableData¶
-
FunctionBuilder.
SetTableData
¶ Sets data for a table function.
Only used when function type is
NXOpen.CAE.FunctionType.Table
Signature
SetTableData(recordIndex, recordName, recordTimestamp, interpolateMethod)
Parameters: - recordIndex (int) – Begins with one
- recordName (str) –
- recordTimestamp (str) – A time string indicating the creating or editing time of an afu record. The string could be returned by
CAE.AfuManager.CreateRecord()
orCAE.AfuManager.EditRecord()
orCAE.AfuManager.GetAfuData()
- interpolateMethod (
NXOpen.CAE.FunctionInterpolationMethod
) –
New in version NX5.0.0.
License requirements: None.
SetTypes¶
-
FunctionBuilder.
SetTypes
¶ Sets types of a function
Signature
SetTypes(functionType, macroType, generalType)
Parameters: - functionType (
NXOpen.CAE.FunctionType
) – Math function or Table function. - macroType (
NXOpen.CAE.XyFunctionMacroType
) – For Motion Simulation or Advanced Simulation or General Purpose. - generalType (
NXOpen.CAE.XyFunctionGeneralType
) – Data type of function. If macro_type isCAEXyFunctionMacroType.Motion
, it must beCAEXyFunctionGeneralType.General
orCAEXyFunctionGeneralType.Time
. If macro_type isCAEXyFunctionMacroType.Load
or it must beCAEXyFunctionGeneralType.General
orCAEXyFunctionGeneralType.Time
orCAEXyFunctionGeneralType.Spectrum
orCAEXyFunctionGeneralType.PowerSpectralDensity
orCAEXyFunctionGeneralType.ShockResponseSpectrum
. If macro_type isCAEXyFunctionMacroType.Material
, it must beCAEXyFunctionGeneralType.General
orCAEXyFunctionGeneralType.Time
orCAEXyFunctionGeneralType.Temperature
orCAEXyFunctionGeneralType.StressStrain
orCAEXyFunctionGeneralType.Life
. If macro_type isCAEXyFunctionMacroType.Response
, it must beCAEXyFunctionGeneralType.General
orCAEXyFunctionGeneralType.Time
orCAEXyFunctionGeneralType.Spectrum
orCAEXyFunctionGeneralType.PowerSpectralDensity
orCAEXyFunctionGeneralType.ShockResponseSpectrum
orCAEXyFunctionGeneralType.CrossSpectrum
orCAEXyFunctionGeneralType.Transmissibility
.
New in version NX5.0.0.
License requirements: None.
- functionType (
SetUnits¶
-
FunctionBuilder.
SetUnits
¶ Sets units of a function
Signature
SetUnits(xUnit, yUnit, frfUnit)
Parameters: - xUnit (
NXOpen.CAE.XyFunctionUnit
) – - yUnit (
NXOpen.CAE.XyFunctionUnit
) – - frfUnit (
NXOpen.CAE.XyFunctionUnit
) –
New in version NX5.0.0.
License requirements: None.
- xUnit (
Validate¶
-
FunctionBuilder.
Validate
¶ Validate whether the inputs to the component are sufficient for commit to be called.
If the component is not in a state to commit then an exception is thrown. For example, if the component requires you to set some property, this method will throw an exception if you haven’t set it. This method throws a not-yet-implemented NXException for some components.
Signature
Validate()
Returns: Was self validation successful Return type: bool New in version NX3.0.1.
License requirements: None.