nx exppyressions your way - - nx/anderson%20-%20design... · nx exppyressions your way (making...
TRANSCRIPT
NX Expressions Your Wayp y(Making Custom DesignLogic Functions)
Taylor Andersonay o de soNX Product Manager(DesignLogic, Knowledge Fusion and Validation)Wednesday, June 4th, 2008
© 2008. Siemens Product Lifecycle Management Software Inc. All rights reservedSiemens PLM Software
UGS Connection Conference
Page 2© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
The Expressions Dialog:“Where are the equations anyway?”Where are the equations, anyway?
Page 3© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
This is actually not a new NX 6 thing…This is actually not a new NX 6 thing…
This became possible at the same time as the new Expressions dialog (and more importantly, the introduction of Knowledge Fusion in the background behind model expressions) in NX 3.
..and we haven’t changed the syntax at all, so
Page 4© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
new functions move forward very reliably.
Demonstration
Page 5© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
Contents of:angle conversions.dfaangle_conversions.dfa
Page 6© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
Contents of:angle conversions.dfaangle_conversions.dfa
First, this filename determines the
category name in the Insert Function
dialog.
(If you put multiple functions in one
file, they will appear under the same Category.)
Page 7© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
Contents of:angle conversions.dfaangle_conversions.dfa
Knowledge Fusion version statement
(This needs to appear only once, pp y ,and must be in the first line of the file.)
Page 8© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
Contents of:angle conversions.dfaangle_conversions.dfa
Name of yournew function
(This is OUTSIDE (the comments.)
Page 9© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
Contents of:angle conversions.dfaangle_conversions.dfa
States that this function SHOULDfunction SHOULD
be visible to DesignLogic
(…should show up in expressions )in expressions.)
If this equals “no”, then the function will only be visiblewill only be visible
to Knowledge Fusion.
Page 10© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
Contents of:angle conversions.dfaangle_conversions.dfa
The #. .# syntax identifies the
Description here.
This description will be visible in
the Insert Function dialog…g
Page 11© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
Contents of:angle conversions.dfaangle_conversions.dfa
The #. .# syntax identifies the
Description here.
..and also in the Function
Arguments dialog.
Page 12© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
Contents of:angle conversions.dfaangle_conversions.dfa
These three lines are identifying the
inputs to this function.
Again, the #. .# syntax identifies text that will be displayed at the
bottom of the Insert Function
dialog.
Page 13© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
g
Contents of:angle conversions.dfaangle_conversions.dfa
These three lines are identifying the
inputs to this function.
…and in the detailed Function Arguments dialog.g g
Page 14© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
Contents of:angle conversions.dfaangle_conversions.dfa
The code insideThe code inside the procedural
block @{ } here is where the rubber
hits the road.hits the road.
The three inputs are combined to create an outputcreate an output
value…
Page 15© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
Contents of:angle conversions.dfaangle_conversions.dfa
We set the return it f th l tunits of the value to be an Angle…
Page 16© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
Contents of:angle conversions.dfaangle_conversions.dfa
d t ll…and tell Knowledge Fusion
to send back a floating point
bnumber.
(…as opposed to a string or a vector,
f i t )
Page 17© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
for instance.)
Contents of:angle conversions.dfaangle_conversions.dfa
This comment isThis comment is also automatically displayed in the Insert Function
dialog describingdialog, describing the return value.
Page 18© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
Contents of:angle conversions.dfaangle_conversions.dfa
…and functions listed under the
“See Also:” h di illheading will populate the
“Related Functions” button.
Page 19© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
Another D t tiDemonstration
Page 20© 2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
Thank you!Thank you!
www.siemens.com/plm
© 2008. Siemens Product Lifecycle Management Software Inc. All rights reservedSiemens PLM Software