Is it possible to add expression(NX expression) to a Cell or TitleBlockCell using NXOpen(C#), and can it be changed afterwards(using NX interface).
Thank you in advance for any help.
On cell, use right mouse...
Under the symbols group select Relationships
Now you can select an expression or an attribute
Thanks, but I ment assigning expression by means of NX Open(C# in the program code) or using Journal Tool.
I'm trying to write program for creating template which automaticly fill TitleBlock including mass of part.(ESKD type).
To the template table add the attributes you want and add them to the desired cell.
Write the journal to first read and/or write the desired attributes, and then insert the template-table.
Afterwadrs when you edit the attributes, the table automatically updates
To read an attribute:
Dim attClassification As String = Nothing Try attClassification = workPart.GetUserAttributeAsString("CLASS", NXObject.AttributeType.String, -1) Catch exc As NXException attClassification = "Attribute Not found" End Try
To write an attribute:
If attClasification <> Nothing Then Try workPart.SetUserAttribute("CLASS", -1, attClasification.ToUpper, Update.Option.Now) Catch ex As Exception 'Nothing End Try End If
Attached is a sample of my code I use for this