TextWithSymbolsBuilder Class¶
-
class
NXOpen.Annotations.
TextWithSymbolsBuilder
¶ Bases:
NXOpen.TaggedObject
,NXOpen.GeometricUtilities.IComponentBuilder
Represents a
NXOpen.Annotations.TextWithSymbolsBuilder
which collects internationalized text strings from the user for processing on an annotation object.This is a sub-builder class and cannot be directly instantiated
New in version NX6.0.0.
Properties¶
Property | Description |
---|---|
CustomSymbolScale | Returns or sets the scale of the custom symbols |
SymbolAspectRatio | Returns or sets the aspect ratio of the embedded user-defined symbols if the symbol size method is NXOpen.Annotations.TextWithSymbolsBuilderSymbolSizingMethod.ScaleAndAspectRatio |
SymbolHeight | Returns or sets the height of the embedded user-defined symbols if the symbol size method is NXOpen.Annotations.TextWithSymbolsBuilderSymbolSizingMethod.LengthAndHeight |
SymbolLength | Returns or sets the length of the embedded user-defined symbols if the symbol size method is NXOpen.Annotations.TextWithSymbolsBuilderSymbolSizingMethod.LengthAndHeight |
SymbolPreferences | Returns or sets the symbol preferences |
SymbolScale | Returns or sets the scale of the embedded user-defined symbols if the symbol size method is NXOpen.Annotations.TextWithSymbolsBuilderSymbolSizingMethod.ScaleAndAspectRatio |
SymbolSizeMethod | Returns or sets the method in which embedded user-defined symbols are scaled |
Tag | Returns the Tag for this object. |
Methods¶
Method | Description |
---|---|
AddAttributeReference | Adds an attribute reference |
AddExpressionReference | Adds an expression reference |
AddSymbol | Adds a symbol |
GetEmbeddedCustomSymbols | Retrieves the embedded custom symbols @return |
GetText | Returns the text of the annotation @return |
RemoveSymbol | Removes specified symbol |
SetText | Sets the text of the annotation |
Validate | Validate whether the inputs to the component are sufficient for commit to be called. |
Enumerations¶
TextWithSymbolsBuilderSymbolPreferencesType Enumeration | Enum for the symbol preferences |
TextWithSymbolsBuilderSymbolSizingMethod Enumeration | sizing method for embedded user-defined symbols |
Property Detail¶
CustomSymbolScale¶
-
TextWithSymbolsBuilder.
CustomSymbolScale
¶ Returns or sets the scale of the custom symbols
-------------------------------------
Getter Method
Signature
CustomSymbolScale()
Returns: Return type: float New in version NX7.5.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
CustomSymbolScale(customSymbolScale)
Parameters: customSymbolScale (float) – New in version NX7.5.0.
License requirements: drafting (“DRAFTING”) OR geometric_tol (“GDT”)
SymbolAspectRatio¶
-
TextWithSymbolsBuilder.
SymbolAspectRatio
¶ Returns or sets the aspect ratio of the embedded user-defined symbols if the symbol size method is
NXOpen.Annotations.TextWithSymbolsBuilderSymbolSizingMethod.ScaleAndAspectRatio
-------------------------------------
Getter Method
Signature
SymbolAspectRatio()
Returns: Return type: float New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
SymbolAspectRatio(symbolAspectRatio)
Parameters: symbolAspectRatio (float) – New in version NX6.0.0.
License requirements: drafting (“DRAFTING”) OR geometric_tol (“GDT”)
SymbolHeight¶
-
TextWithSymbolsBuilder.
SymbolHeight
¶ Returns or sets the height of the embedded user-defined symbols if the symbol size method is
NXOpen.Annotations.TextWithSymbolsBuilderSymbolSizingMethod.LengthAndHeight
-------------------------------------
Getter Method
Signature
SymbolHeight()
Returns: Return type: float New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
SymbolHeight(symbolHeight)
Parameters: symbolHeight (float) – New in version NX6.0.0.
License requirements: drafting (“DRAFTING”) OR geometric_tol (“GDT”)
SymbolLength¶
-
TextWithSymbolsBuilder.
SymbolLength
¶ Returns or sets the length of the embedded user-defined symbols if the symbol size method is
NXOpen.Annotations.TextWithSymbolsBuilderSymbolSizingMethod.LengthAndHeight
-------------------------------------
Getter Method
Signature
SymbolLength()
Returns: Return type: float New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
SymbolLength(symbolLength)
Parameters: symbolLength (float) – New in version NX6.0.0.
License requirements: drafting (“DRAFTING”) OR geometric_tol (“GDT”)
SymbolPreferences¶
-
TextWithSymbolsBuilder.
SymbolPreferences
¶ Returns or sets the symbol preferences
-------------------------------------
Getter Method
Signature
SymbolPreferences()
Returns: Return type: NXOpen.Annotations.TextWithSymbolsBuilderSymbolPreferencesType
New in version NX8.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
SymbolPreferences(symbolPreferences)
Parameters: symbolPreferences ( NXOpen.Annotations.TextWithSymbolsBuilderSymbolPreferencesType
) –New in version NX8.0.0.
License requirements: drafting (“DRAFTING”)
SymbolScale¶
-
TextWithSymbolsBuilder.
SymbolScale
¶ Returns or sets the scale of the embedded user-defined symbols if the symbol size method is
NXOpen.Annotations.TextWithSymbolsBuilderSymbolSizingMethod.ScaleAndAspectRatio
-------------------------------------
Getter Method
Signature
SymbolScale()
Returns: Return type: float New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
SymbolScale(symbolScale)
Parameters: symbolScale (float) – New in version NX6.0.0.
License requirements: drafting (“DRAFTING”) OR geometric_tol (“GDT”)
SymbolSizeMethod¶
-
TextWithSymbolsBuilder.
SymbolSizeMethod
¶ Returns or sets the method in which embedded user-defined symbols are scaled
-------------------------------------
Getter Method
Signature
SymbolSizeMethod()
Returns: Return type: NXOpen.Annotations.TextWithSymbolsBuilderSymbolSizingMethod
New in version NX6.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
SymbolSizeMethod(symbolSizeMethod)
Parameters: symbolSizeMethod ( NXOpen.Annotations.TextWithSymbolsBuilderSymbolSizingMethod
) –New in version NX6.0.0.
License requirements: drafting (“DRAFTING”) OR geometric_tol (“GDT”)
Method Detail¶
AddAttributeReference¶
-
TextWithSymbolsBuilder.
AddAttributeReference
¶ Adds an attribute reference
Signature
AddAttributeReference(ownerTag, title, displayTokens, lineNo, cursorPos)
Parameters: - ownerTag (
NXOpen.NXObject
) – object that owns the attribute. If we are trying to reference a part attribute then this should be the part object - title (str) – title of attribute
- displayTokens (bool) – True to display using TC tokens. False to display as plain text.
- lineNo (int) – line number to insert token with index from 1
- cursorPos (int) – cursor position in the line with index from 1
New in version NX8.0.0.
License requirements: drafting (“DRAFTING”)
- ownerTag (
AddExpressionReference¶
-
TextWithSymbolsBuilder.
AddExpressionReference
¶ Adds an expression reference
Signature
AddExpressionReference(expName, format, lineNo, cursorPos)
Parameters: - expName (str) – expression name
- format (str) – format to use for displaying an expression. ‘A’ for displaying the expression formula, or ‘m.n’ where ‘m’ is the minimum number of characters displayed and ‘n’ is the number of decimal places to display
- lineNo (int) – line number to insert token with index from 1
- cursorPos (int) – cursor position in the line with index from 1
New in version NX8.0.0.
License requirements: drafting (“DRAFTING”)
AddSymbol¶
-
TextWithSymbolsBuilder.
AddSymbol
¶ Adds a symbol
Signature
AddSymbol(newObject, name, lineNo, cursorPos)
Parameters: - newObject (
NXOpen.NXObject
) – symbol instance object - name (str) – symbol name
- lineNo (int) – line number to insert token with index from 1
- cursorPos (int) – cursor position in the line with index from 1
New in version NX7.0.0.
License requirements: drafting (“DRAFTING”)
- newObject (
GetEmbeddedCustomSymbols¶
-
TextWithSymbolsBuilder.
GetEmbeddedCustomSymbols
¶ Retrieves the embedded custom symbols
Signature
GetEmbeddedCustomSymbols()
Returns: Return type: list of NXOpen.Annotations.BaseCustomSymbol
New in version NX10.0.0.
License requirements: None.
GetText¶
-
TextWithSymbolsBuilder.
GetText
¶ Returns the text of the annotation
Signature
GetText()
Returns: Return type: list of str New in version NX6.0.0.
License requirements: None.
RemoveSymbol¶
-
TextWithSymbolsBuilder.
RemoveSymbol
¶ Removes specified symbol
Signature
RemoveSymbol(path)
Parameters: path (str) – Symbol name New in version NX7.0.0.
License requirements: drafting (“DRAFTING”)
SetText¶
-
TextWithSymbolsBuilder.
SetText
¶ Sets the text of the annotation
Signature
SetText(text)
Parameters: text (list of str) – New in version NX6.0.0.
License requirements: drafting (“DRAFTING”) OR geometric_tol (“GDT”)
Validate¶
-
TextWithSymbolsBuilder.
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.