Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spreadsheet Functions in NX

Status
Not open for further replies.

nilanjana2012

Chemical
Aug 20, 2009
9
Spreadsheet function in NX is limited to only 8. Is it possible to insert more excel function?
 
Replies continue below

Recommended for you

If you're talking about the functions available from within the NX Expression system, yes, but it will require you to program them using the KF (Knowledge Fusion) tool set.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
nilanjana2012 --

What functions are you looking for here?

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)
 
Dear Taylor,

I am looking for the following functions.
In lookup/reference function - MATCH, OFFSET, INDEX, ADDRESS
LOGICAL FUNCTIONS
STRING/MATHEMATICAL FUNCTION
DATABASE FUNCTION

Regards,




 
nilanjana2012 said:
I am looking for the following functions.
In lookup/reference function - MATCH, OFFSET, INDEX, ADDRESS
LOGICAL FUNCTIONS
STRING/MATHEMATICAL FUNCTION
DATABASE FUNCTION

These are Excel functions; you can (and should) use them in the Excel spreadsheet. The "8" spreadsheet functions you refer to are mainly used to bridge between NX and Excel - to exchange information between the Excel sheet and the NX expression system. When working with Excel, you still have access to all of Excel's available functions.

www.nxjournaling.com
 
nilanjana2012 --

So, there are a bunch of string functions and math functions available inside NX now... These are found very near the spreadsheet functions you've mentioned:

150120_dl_functions1.jpg


150120_dl_functions2.jpg


There are also some new spreadsheet functions in NX 9 that might be of interest. In particular, [tt]ug_read_list()[/tt] and [tt]ug_read_fixed_list()[/tt] are quite similar to the OFFSET and INDEX function you mentioned.

There is a [tt]position()[/tt] function in KF that is very similar to MATCH, but the answer it returns when it can't find a match in the list doesn't play very well with expressions, so I always either formulate the problem differently (to use the [tt]nth()[/tt] function, for instance) or make sure my logic and options are rock-solid. :)

For ADDRESS, I just use normal string operations to do this, because the cell references in the NX spreadsheet functions are just strings. And you can concatenate strings with the "plus" operator like this:

[pre]row = "12"
column = "C"
address = column + row = "C12"[/pre]

As for logical functions... While Excel uses functions for logical operations, NX uses key words and/or operators within expression formulas. For instance, you would set up the basic [tt]if-then-else[/tt] pattern like this:

[pre]if (height >= 12) then (6) else (2)[/pre]

...and you can build up more complex statements using the "pipe" symbol (|) to represent "or" and the "ampersand" symbol (&) to represent "and", like this:

[pre]if ( ( (height > 12) & (height <= 48) ) | (width < 1) ) then (6) else (2)[/pre]

...or...

[pre]if ( ( (height > 12) & (height <= 48) ) ) then (6) else if (width < 1) then (1) else (3)[/pre]

And you can get very creative with these logical statements, up to about 1000 characters. Customers do some amazing things here. :)

Does this help?

And as John mentions, you certainly have the option of adding to the function list, using a bit of Knowledge Fusion programming. (In fact, now that I think about it, the "rounding functions" and "tba_excel_calc" categories in the image above are both custom sets of functions.) Knowledge Fusion has some ODBC database access functionality that might be of use to you here, if that's really critical. And of course, once you make the leap into customization programming, you could also start to leverage .NET, Java, C++ etc. if needed.

I'm curious about the specific workflow you're trying to accomplish here, and/or the new DesignLogic functions you need to perform these things. Can you tell us more?

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor