Submitted by Mihai Pruna on Fri, 05/22/2015 - 12:47
Forums:
I would like to create an expression using the angle between two lines.
I tried to do it in the GUI and record it but it won't let me click OK even though it gives me the angle.
re: angle expression
What version of NX are you using?
I was able to successfully record a journal (creating an expression by measuring the angle between 2 lines) in NX 8.5 and NX 9.
oops
It works now, I had to specify two straight lines, I think I was using curves. But I get a p765 as reference, and I'd like to reference the feature in a journal, is that the tag of the Measure object?
mihaipruna.com
re: angle expression
"is that the tag of the Measure object?"
No; what happens is NX creates an associative measurement feature. The value of the measurement drives an expression (p765 in your case). The expression that you create references the value of the measurement expression.
If you are editing the journal code to make it more general, you would want to query the expression created by the measurement feature and reference it when you create your expression. The journal recorder does some stuff "behind the scenes" and hard codes the expression name in the recorded code that it returns. You don't want to use this hard coded value.
Thank you, I was able to use
Thank you, I was able to use Measure.Expressions(0).Name() into formulas
mihaipruna.com