×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Journal for expression creation

Journal for expression creation

Journal for expression creation

(OP)
Hi.
I am trying to develop the journal that will create a parameter = hole tap drill diameter
I have some code written and it works but for some reason it is not showing value of Tap drill diameter properly.
for example if TDD = 12.1 my code will create a parameter value is which is equal to 12.
I have no Idea why.
Can someone give me an example for this one?
I just do not know what is the problem.
Many many thanks in advance.

RE: Journal for expression creation

(OP)
I am using NX 7.5

RE: Journal for expression creation

It might help if you could post the code snippet you have for creating the expression.

www.nxjournaling.com

RE: Journal for expression creation

(OP)
I would love to do that, but it is at work.
I am going to try to recreate it, but it is not going to be accurate.

Here is how it looks.
I crate a Journal by recording it. So i press record then double click on the hole, then stop record.
Then i try to edit it.

And i try to do the following.
Dim A as string = ""
A = holebuilder1.tapdrill.diameter.value

Dim unit one as unit.....(do not remember) but i determine it as millimeters


Dim expression1 As Expression
expression1 = workpart.createexpression.withunits("D=1",unit 1)
workpart.expression.edit.withunit(expression1,A,unit1)


So it looks something like that. I am sorry if I got it wrong, but I can show the code, it is at work and i am home.
I tried to dim it as string, but no matter what I does not work, and the code form above gives me 12. Not 12.1
I tried to create a text file and it work fine, showing 12,1 as suppose to.

RE: Journal for expression creation

(OP)
I am done with this code)
It works, have to do some adjustments.
But I have few question:
How does NX names its parameters?
it gives them default names, i would like to do the same with the ones I create?

RE: Journal for expression creation

(OP)
So there is one more question to all of you.
I have an expressions A
And expression B
And expression C = A+B
Expression A name = ("A"+name1)
Expression B name = ("B"+name1)
Name 1 is a something a have form the input box.
Then I need to do something like that
Workpart,expression.Createexpression ("String", Dimensions = sting value (A)+""x""+string value B)
And this is not working.
code is not accurate, but i have the proper one in place.
Please advise on the meter.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources