stephlouv
Mechanical
- Sep 10, 2013
- 125
Hello there,
Is there a way in NX8 to script expressions values as the PTC Creo "Relations" doing ?
I found that more conveniant if you have a lot of IF conditions.
Ex, in Creo :
if idtalf_xwf == 0
angif_xwf=30
cd1wxf=epf_wf*tan(angif_xwf)
idtalf_xwf=2*epf_wf+2
talf1_wf=talf_wf
angef_wf=angef_vwf
else
cd1wxf=epf_wf*tan(angif_xwf)
cd2wxf=(idtalf_xwf-idf_wf)/2
talf1_wf=talf_wf+cd2wxf
angef_wf=angef_xwf
endif
So, using only one IF condition, you can set values for several variables.
And these values can be also changed later in the script if another condition ask it. Usefull.
In NX8, it's the all way round, for each variable ou have to set a IF statement.
It's much more coding. And having a cascade of IF for each parameter is confusing.
Thank you
Stéphane
"My english is bad ? That's why i'am french."
Is there a way in NX8 to script expressions values as the PTC Creo "Relations" doing ?
I found that more conveniant if you have a lot of IF conditions.
Ex, in Creo :
if idtalf_xwf == 0
angif_xwf=30
cd1wxf=epf_wf*tan(angif_xwf)
idtalf_xwf=2*epf_wf+2
talf1_wf=talf_wf
angef_wf=angef_vwf
else
cd1wxf=epf_wf*tan(angif_xwf)
cd2wxf=(idtalf_xwf-idf_wf)/2
talf1_wf=talf_wf+cd2wxf
angef_wf=angef_xwf
endif
So, using only one IF condition, you can set values for several variables.
And these values can be also changed later in the script if another condition ask it. Usefull.
In NX8, it's the all way round, for each variable ou have to set a IF statement.
It's much more coding. And having a cascade of IF for each parameter is confusing.
Thank you
Stéphane
"My english is bad ? That's why i'am french."