NXOpen .NET Reference Guide  1899
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Types | Public Member Functions | Protected Member Functions | List of all members
NXOpen.Annotations.AssociativeText Class Reference

Associative text class creates text associated to object and part attributes as well as object properties such as a drawing sheet name. More...

Inheritance diagram for NXOpen.Annotations.AssociativeText:
NXOpen.TransientObject NXOpen.Utilities.NXRemotableObject IDisposable IMessageSink

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...
 

Detailed Description

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

Member Enumeration Documentation

the associative text property type to be used with the object

Enumerator
DrawingNumberOfSheets 

Drawing sheet number of sheets

DrawingNumberOfPrimarySheets 

Drawing sheet number of primary sheets

DrawingSheetName 

Drawing sheet name

DrawingSheetNumber 

Drawing sheet number

DrawingSheetRevision 

Drawing sheet revision

DrawingSheetScaleNumerator 

Drawing sheet scale numerator

DrawingSheetScaleDenominator 

Drawing sheet scale denominator

DrawingSheetSize 

Drawing sheet size

DrawingSheetUnits 

Drawing sheet units

DrawingSheetZone 

Drawing sheet zone

DrawingSheetProjectionAngle 

Drawing sheet projection angle

DrawingMasterPartName 

Drawing master part name

DrawingPartName 

Drawing part name

DrawingViewPrefix 

Drawing view prefix

DrawingViewRotationAngle 

View rotation angle

Member Function Documentation

override void NXOpen.Annotations.AssociativeText.FreeResource ( )
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.

unsafe string NXOpen.Annotations.AssociativeText.GetEvaluatedText ( NXOpen.Annotations.Annotation  ann,
string  text 
)
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 "&lt;W@ATT1&gt;" The value of expression "p1" is "3.00". The text that represents the reference to expression "p1" is "&lt;X0.2@p1&gt;". The value of object property "&lt;WRef1*0@$SH_SHEET_NAME&gt;" is "Sheet 1". Given the input text "&lt;WRef1*0@$SH_SHEET_NAME&gt; &lt;X0.2@p1&gt; &lt;W@ATT1&gt;" the evaluated text returned will be "Sheet 1 3.00 Value1"

Created in NX8.0.0

License requirements: None.

Parameters
annAnnotation 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 "&lt;W@$SH_SHEET_NAME&gt;" for annotation 123 is "Sheet 1" and for annotation 456 is "Sheet 2"
textthe text containing associative text to evaluate
Returns
the text with the evaluated associative text
unsafe bool NXOpen.Annotations.AssociativeText.GetObjectAttribute ( string  text,
out NXOpen.NXObject object,
out string  attributeTitle 
)
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: "&lt;WRef2*0@PartAttTitle&gt;" 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: "&lt;W@AttTitle&gt;" uses the part attribute syntax so the reference will be considered a part attribute reference. No object or title will be returned.

Example 3: "&lt;WRef1*0@ObjAttTitle&gt;" 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: "&lt;WRef10*0@AttTitle&gt;" 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.

Parameters
textthe associative text to query
objectthe object
attributeTitlethe object attribute title
Returns
the object attribute reference was found.
unsafe string NXOpen.Annotations.AssociativeText.GetObjectAttributeText ( NXOpen.NXObject object,
string  attributeTitle 
)
inline

Returns the associative text for the input object and attribute title.

Created in NX8.0.0

License requirements: None.

Parameters
objectthe object
attributeTitlethe object attribute title
Returns
the associative text
unsafe string NXOpen.Annotations.AssociativeText.GetObjectPropertyText ( NXOpen.NXObject object,
NXOpen.Annotations.AssociativeText.PropertyType  type 
)
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.

Parameters
objectthe object
typethe object property
Returns
the associative text
unsafe bool NXOpen.Annotations.AssociativeText.GetPartAttribute ( string  text,
out string  attributeTitle 
)
inline

Returns the title of the part attribute referenced in the associative text.

Text references such as "Ref2*0" "&lt;WRef2*0@title&gt;" 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: "&lt;WRef2*0@PartAttTitle&gt;" 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: "&lt;W@AttTitle&gt;" uses the part attribute syntax so the reference will be considered a part attribute reference. "AttTitle" will be returned as the title.

Example 3: "&lt;WRef1*0@ObjAttTitle&gt;" 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: "&lt;WRef10*0@AttTitle&gt;" 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.

Parameters
textthe text containing associative text to query
attributeTitlethe part attribute title
Returns
the part attribute reference was found
unsafe string NXOpen.Annotations.AssociativeText.GetPartAttributeText ( string  attributeTitle)
inline

Returns the associative text for the part attribute title.

Created in NX8.0.0

License requirements: None.

Parameters
attributeTitlethe part attribute title
Returns
the associative text

The documentation for this class was generated from the following file:
Copyright 2019 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.