cancel
Showing results for 
Search instead for 
Did you mean: 

NX Open TitleBlock operations

Experimenter
Experimenter

Hello,

 

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.

3 REPLIES

Re: NX Open TitleBlock operations

PLM World Member Legend PLM World Member Legend
PLM World Member Legend

On cell, use right mouse...

Edit text

Under the symbols group select Relationships

Now you can select an expression or an attribute

 

Patrick Delisse
KMWE - DutchAero
NX11.0, CAMPOST V22, Vericut 8.1

Re: NX Open TitleBlock operations

Experimenter
Experimenter

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

Re: NX Open TitleBlock operations

PLM World Member Legend PLM World Member Legend
PLM World Member Legend

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

Patrick Delisse
KMWE - DutchAero
NX11.0, CAMPOST V22, Vericut 8.1