Você está na página 1de 21

NX Expressions

p Your Way
y
(Making Custom DesignLogic Functions)

Taylor
ay o Anderson
de so
NX Product Manager
(DesignLogic, Knowledge Fusion and Validation)
Wednesday, June 4th, 2008
UGS Connection Conference
2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software
2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 2 Siemens PLM Software
The Expressions Dialog:
Where
Where are the equations
equations, anyway?
anyway?

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 3 Siemens PLM Software
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 havent changed the syntax at all, so


new functions move forward very reliably.
2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 4 Siemens PLM Software
Demonstration

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 5 Siemens PLM Software
Contents of:
angle conversions.dfa
angle_conversions.dfa

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 6 Siemens PLM Software
Contents of:
angle conversions.dfa
angle_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.)

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 7 Siemens PLM Software
Contents of:
angle conversions.dfa
angle_conversions.dfa

Knowledge Fusion
version statement
(This needs to
appear
pp only
y once,,
and must be in the
first line of the file.)

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 8 Siemens PLM Software
Contents of:
angle conversions.dfa
angle_conversions.dfa

Name of your
new function
((This is OUTSIDE
the comments.)

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 9 Siemens PLM Software
Contents of:
angle conversions.dfa
angle_conversions.dfa

States that this


function SHOULD
be visible to
DesignLogic
(should show up
in expressions.)
expressions )

If this equals no,


then the function
will only be visible
to Knowledge
Fusion.

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 10 Siemens PLM Software
Contents of:
angle conversions.dfa
angle_conversions.dfa

The #. .# syntax
identifies the
Description here.

This description
will be visible in
the Insert Function
dialog
g

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 11 Siemens PLM Software
Contents of:
angle conversions.dfa
angle_conversions.dfa

The #. .# syntax
identifies the
Description here.

..and also in the


Function
Arguments dialog.

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 12 Siemens PLM Software
Contents of:
angle conversions.dfa
angle_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
g
dialog.

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 13 Siemens PLM Software
Contents of:
angle conversions.dfa
angle_conversions.dfa

These three lines


are identifying the
inputs to this
function.

and in the
detailed Function
Arguments
g dialog.
g

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 14 Siemens PLM Software
Contents of:
angle conversions.dfa
angle_conversions.dfa

The code inside


the procedural
block @{ } here is
where the rubber
hits the road.

The three inputs


are combined to
create an output
value

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 15 Siemens PLM Software
Contents of:
angle conversions.dfa
angle_conversions.dfa

We set the return


units
it off the
th value
l tot
be an Angle

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 16 Siemens PLM Software
Contents of:
angle conversions.dfa
angle_conversions.dfa

and d ttellll
Knowledge Fusion
to send back a
floating point
number.
b

(as opposed to a
string or a vector,
f instance.)
for i t )

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 17 Siemens PLM Software
Contents of:
angle conversions.dfa
angle_conversions.dfa

This comment is
also automatically
displayed in the
Insert Function
dialog describing
dialog,
the return value.

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 18 Siemens PLM Software
Contents of:
angle conversions.dfa
angle_conversions.dfa

and functions
listed under the
See Also:
h di will
heading ill
populate the
Related
Functions button.

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 19 Siemens PLM Software
Another
D
Demonstration
t ti

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 20 Siemens PLM Software
Thank you!

www.siemens.com/plm

2008. Siemens Product Lifecycle Management Software Inc. All rights reserved
Siemens PLM Software

Você também pode gostar