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.
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
RE: Journal for expression creation
www.nxjournaling.com
RE: Journal for expression creation
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
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
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.