...so auf die schnelle:
Option Strict Off
Imports System
Imports NXOpen
Module NXJournal
Sub Main
Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim theUI As UI = UI.GetUI()
' abfragen ausdruck "hoehe"
dim hoehe1 as double = workpart.expressions.findobject("hoehe").value
System.Windows.Forms.MessageBox.Show("hoehe = " + hoehe1.toString)
' neue hoehe
dim hoehe2 as double = hoehe1 + 1
System.Windows.Forms.MessageBox.Show("hoehe_neu = " + hoehe2.toString)
' überschreieben ausdruck mit neuem wert
Dim expression1 As Expression = CType(workPart.Expressions.FindObject("hoehe"), Expression)
Dim unit1 As Unit = CType(workPart.UnitCollection.FindObject("MilliMeter"), Unit)
workPart.Expressions.EditWithUnits(expression1, unit1, hoehe2)
End Sub
End Module
------------------
gruss urs 
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP