Edit the Plate Info annotation symbol rule. The file to edit is defined by the annotation type definition in the SMS_ANNOTATION.xml file under the PROGID value.
VB6
[Product Folder]\SharedContent\Src\StructManufacturing\Rules\Services\AnnotationSymbols\
-
Edit the PlateIdInfo.cls file. Create some Private variables to load the text box placement that was added to the SMS_GEOM_ARG section.
The attribute added in this example is a simple string. For examples of more detailed attributes that require units and numerical values, see other sections of code that use the IsNumeric(...) function call.
-
In the function IJDMfgOutputAnnotation_Evaluate(...), create a new string variable, sMyAttribute.
-
Retrieve the attribute from the XML, and set it to the new string variable.
-
Add the attribute to a temporary XML that is used as part of drawing the annotation. The highlighted line of code is similar to the line above it.
.NET
[Product Folder]\SharedContent\Src\StructManufacturing\Rules\Services\AnnotationSymbolsRule
-
Edit the EntityName.cs file. Create some Private variables to load the text box placement that was added to the SMS_GEOM_ARG section.
-
Set some default values in the constructor. Update the constructor documentation as shown in the following figure:
-
Add two calls to the GetGeomStringAttributeValue function to load these values from the input XML to the SetArguments(...) function.
The attribute added in this example is a simple string. For examples of more detailed attributes that require units and numerical values, see other sections of code that use the GetGeomDoubleAttributeValue, GetGeomLongAttributeValue, or GetGeomBooleanAttributeValue functions.
-
Add an additional Position instance variable, compute its position, and translate that position to get the text "#1" to display in the correct position. Follow the examples in the EntityName code.
-
Get the attribute again. Because the Geom arguments are editable, they may have changed.
-
Add the attribute to a temporary XML file that is used as part of drawing the annotation.
AnnotationSymbolsRule.CreateTextNode(outputDoc, outputElement, this.controlPointValue,
annotationPoint, this.myAttributeValue, myAttributeName, orientation,
this.textFontValue, ValConst.partmon, this.textSizeValue, 0, AttribConst.DESCRIPTION); -
Place a Plate Info annotation on a plate part.
The software places "My_Attribute".
-
Change My_Attribute from #1 to #2 on the Properties dialog box.
The software updates the Plate Info annotation object.