NXOpen .NET Reference Guide
1899
|
Associative text class creates text associated to object and part attributes as well as object properties such as a drawing sheet name. More...
Public Types | |
enum | PropertyType { DrawingNumberOfSheets, DrawingNumberOfPrimarySheets, DrawingSheetName, DrawingSheetNumber, DrawingSheetRevision, DrawingSheetScaleNumerator, DrawingSheetScaleDenominator, DrawingSheetSize, DrawingSheetUnits, DrawingSheetZone, DrawingSheetProjectionAngle, DrawingMasterPartName, DrawingPartName, DrawingViewPrefix, DrawingViewRotationAngle } |
the associative text property type to be used with the object More... | |
Public Member Functions | |
unsafe string | GetEvaluatedText (NXOpen.Annotations.Annotation ann, string text) |
Evaluate the associative text specified. More... | |
unsafe bool | GetObjectAttribute (string text, out NXOpen.NXObject @object, out string attributeTitle) |
Returns the title and owning object of the object attribute referenced in the associative text. More... | |
unsafe string | GetObjectAttributeText (NXOpen.NXObject @object, string attributeTitle) |
Returns the associative text for the input object and attribute title. More... | |
unsafe string | GetObjectPropertyText (NXOpen.NXObject @object, NXOpen.Annotations.AssociativeText.PropertyType type) |
Returns the associative text for the input object and its property. More... | |
unsafe bool | GetPartAttribute (string text, out string attributeTitle) |
Returns the title of the part attribute referenced in the associative text. More... | |
unsafe string | GetPartAttributeText (string attributeTitle) |
Returns the associative text for the part attribute title. More... | |
Public Member Functions inherited from NXOpen.TransientObject | |
void | Dispose () |
Frees the object from memory. More... | |
void | PrintTestData (String variableName) |
<exclude> More... | |
void | PrintTestData (String variableName, int lineNumber) |
<exclude> More... | |
new string | ToString () |
Returns a String that represents the current Object. More... | |
Public Member Functions inherited from NXOpen.Utilities.NXRemotableObject | |
IMessageCtrl | AsyncProcessMessage (IMessage msg, IMessageSink replySink) |
Asynchronously processes the given message. More... | |
IMessage | SyncProcessMessage (IMessage msg) |
Synchronously processes the given message. More... | |
Protected Member Functions | |
override void | FreeResource () |
Frees the object from memory. More... | |
Additional Inherited Members | |
Properties inherited from NXOpen.TransientObject | |
IntPtr | Handle [get] |
Handle of the internal object represented by this object. More... | |
Associative text class creates text associated to object and part attributes as well as object properties such as a drawing sheet name.
The associative text is constructed using special NX text control sequences.
The text created using this class can be added to a table cell, note text, dimension appended text etc...
Use functions in this class to query/extract information from text and create associative text.
The client shouldn't parse NX text control sequences to extract informtation. The text control sequences can change from release to release.
Created in NX8.0.0
the associative text property type to be used with the object
|
inlineprotectedvirtual |
Frees the object from memory.
After this method is called, it is illegal to use the object. In .NET, this method is automatically called when the object is deleted by the garbage collector.
Created in NX8.0.0
License requirements: None.
Implements NXOpen.TransientObject.
|
inline |
Evaluate the associative text specified.
Convert associative text to the string that it represents. The following associative text control sequences will be evaluated: part attribute references, object attribute references, expression references, and object property references. Example: The value of part attribute "ATT1" is "Value1". The text that represents the reference to part attribute "ATT1" is "<W@ATT1>" The value of expression "p1" is "3.00". The text that represents the reference to expression "p1" is "<X0.2@p1>". The value of object property "<WRef1*0@$SH_SHEET_NAME>" is "Sheet 1". Given the input text "<WRef1*0@$SH_SHEET_NAME> <X0.2@p1> <W@ATT1>" the evaluated text returned will be "Sheet 1 3.00 Value1"
Created in NX8.0.0
License requirements: None.
ann | Annotation used to determine the object property value when the object is not specified. For example, given annotation 123 and 456 where 123 resides in "Sheet 1" and 456 resides in "Sheet 2" then the evaluated text returned for the input text "<W@$SH_SHEET_NAME>" for annotation 123 is "Sheet 1" and for annotation 456 is "Sheet 2" |
text | the text containing associative text to evaluate |
|
inline |
Returns the title and owning object of the object attribute referenced in the associative text.
The reference is considered found if the syntax of the text control sequence reflects an object attribute reference. An error will be returned for attribute references that do not exist.
Example 1: "<WRef2*0@PartAttTitle>" is an existing reference to part attribute "PartAttTitle" so the reference will be considered a part attribute reference. No object or title will be returned.
Example 2: "<W@AttTitle>" uses the part attribute syntax so the reference will be considered a part attribute reference. No object or title will be returned.
Example 3: "<WRef1*0@ObjAttTitle>" is an existing reference to object attribute "ObjAttTitle" so the reference will be considered an object attribute reference. The object containing the attribute and "ObjAttTitle" will be returned as the attribute title. Note that the object that contains the attribute will reside in the part that owns the associative text object.
Example 4: "<WRef10*0@AttTitle>" where "Ref10*0" reference does not exist will be considered an invalid attribute reference. An error will be returned. Note that the existance of "Ref10*0" is only checked for in the part that owns the associative text object.
Created in NX8.5.3
License requirements: None.
text | the associative text to query |
object | the object |
attributeTitle | the object attribute title |
|
inline |
Returns the associative text for the input object and attribute title.
Created in NX8.0.0
License requirements: None.
object | the object |
attributeTitle | the object attribute title |
|
inline |
Returns the associative text for the input object and its property.
For example, to obtain a reference to a drawing name, the object is the NXOpen.Drawings.DraftingView of the NXOpen.Drawings.DrawingSheet . It is not the NXOpen.Drawings.DrawingSheet itself, but rather the type is NXOpen.Annotations.AssociativeText.PropertyType.DrawingSheetName .
Created in NX8.0.0
License requirements: None.
object | the object |
type | the object property |
|
inline |
Returns the title of the part attribute referenced in the associative text.
Text references such as "Ref2*0" "<WRef2*0@title>" must exist as a part attribute reference in the part that owns the associative text object in order to be considered part attributes. The reference is considered found if the syntax of the text control sequence reflects a part attribute reference. An error will be returned for attribute references that do not exist.
Example 1: "<WRef2*0@PartAttTitle>" is an existing reference to part attribute "PartAttTitle" so the reference will be considered a part attribute reference. "PartAttTitle" will be returned as the title. Note that "Ref2*0" must exist as a part attribute reference in the part that owns the associative text.
Example 2: "<W@AttTitle>" uses the part attribute syntax so the reference will be considered a part attribute reference. "AttTitle" will be returned as the title.
Example 3: "<WRef1*0@ObjAttTitle>" is an existing reference to object attribute "ObjAttTitle" so the reference will be considered an object attribute reference. No title will be returned.
Example 4: "<WRef10*0@AttTitle>" where "Ref10*0" reference does not exist will be considered an invalid attribute reference. An error will be returned.
Created in NX8.5.3
License requirements: None.
text | the text containing associative text to query |
attributeTitle | the part attribute title |
|
inline |
Returns the associative text for the part attribute title.
Created in NX8.0.0
License requirements: None.
attributeTitle | the part attribute title |