TextWithSymbolsBuilder Class¶
-
class
NXOpen.Annotations.TextWithSymbolsBuilder¶ Bases:
NXOpen.TaggedObject,NXOpen.GeometricUtilities.IComponentBuilderRepresents a
NXOpen.Annotations.TextWithSymbolsBuilderwhich 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 |
| GetSymbolAlignment | Get the alignement of embedded symbol correspoding to symbol name |
| GetText | Returns the text of the annotation |
| RemoveSymbol | Removes specified symbol |
| SetSymbolAlignment | Set the alignement on embedded symbol correspoding to symbol name |
| SetText | Sets the text of the annotation |
| Validate | Validate whether the inputs to the component are sufficient for commit to be called. |
Enumerations¶
| TextWithSymbolsBuilderSymbolAlignmentType Enumeration | Enum for the symbol alignment |
| 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
CustomSymbolScaleReturns: Return type: float New in version NX7.5.0.
License requirements: None.
-------------------------------------Setter Method
Signature
CustomSymbolScaleParameters: 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
SymbolAspectRatioReturns: Return type: float New in version NX6.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
SymbolAspectRatioParameters: 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
SymbolHeightReturns: Return type: float New in version NX6.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
SymbolHeightParameters: 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
SymbolLengthReturns: Return type: float New in version NX6.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
SymbolLengthParameters: 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
SymbolPreferencesReturns: Return type: NXOpen.Annotations.TextWithSymbolsBuilderSymbolPreferencesTypeNew in version NX8.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
SymbolPreferencesParameters: 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
SymbolScaleReturns: Return type: float New in version NX6.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
SymbolScaleParameters: 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
SymbolSizeMethodReturns: Return type: NXOpen.Annotations.TextWithSymbolsBuilderSymbolSizingMethodNew in version NX6.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
SymbolSizeMethodParameters: 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.BaseCustomSymbolNew in version NX10.0.0.
License requirements: None.
GetSymbolAlignment¶
-
TextWithSymbolsBuilder.GetSymbolAlignment¶ Get the alignement of embedded symbol correspoding to symbol name
Signature
GetSymbolAlignment(symbolName)Parameters: symbolName (str) – Symbol Name Returns: Symbol Alignment Return type: NXOpen.Annotations.TextWithSymbolsBuilderSymbolAlignmentTypeNew in version NX11.0.1.
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”)
SetSymbolAlignment¶
-
TextWithSymbolsBuilder.SetSymbolAlignment¶ Set the alignement on embedded symbol correspoding to symbol name
Signature
SetSymbolAlignment(symbolName, symbolAlignment)Parameters: - symbolName (str) – Symbol Name
- symbolAlignment (
NXOpen.Annotations.TextWithSymbolsBuilderSymbolAlignmentType) – Symbol Alignment
New in version NX11.0.1.
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.