Cancel
Showing results for 
Search instead for 
Did you mean: 

expression linked to spreadsheet

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Hi,

is there a quick way create multiple expressions linked to spreadsheet cells? I am using the formula ug_cell_read, but with this I must link every single expression one by one.

Thank you

20 REPLIES

Re: expression linked to spreadsheet

Hello,

 

After copying the cells in the EXCEL we can import it in NX.

 

Siemens Documentation: Expressions dialog box

 

Import Expressions

 

Reads a specified text file containing expressions into the current part file.

 

 

Thanks and Regards,
Mathi Krishnan.

Re: expression linked to spreadsheet

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

No, this option is not what I need, because the imported expressions will loose the link with the spreadsheet. I need to keep them linked to the Excel Sheet

Re: expression linked to spreadsheet

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

it's maybe not faster but i make an attribute that contains the excel location and name.

Then create a ug_excel_read that points to the attribute and the specified cell.

 

 


Ruud van den Brand
Pre-sales NX CAD
cards PLM Solutions

Re: expression linked to spreadsheet

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Thank you Ruud, but I think it requires the same time as to add manual link to each expression.

So far the fastest way I found seems to be: create the first expression linked to the first cell, than copy and paste the formula into all the other expressions and then modify the cell names in every expression

Re: expression linked to spreadsheet

Siemens Phenom Siemens Phenom
Siemens Phenom

Laurus --

 

I'd love to see an example of the kind of part you're working with.

 

The various list-based functions are also great ways to grab multiple values from Excel with one transaction, though these obviously would need a bit of "distribution" work on the NX side, too.

 

Another thing that's possible with the NX 11+ new dialog is using something like a text editor to rapidly create the set of formulas you need to read in multiple expressions, and then pasting this block of text into the dialog all at once, populating five or ten or a hundred rows at once.

 

...but again, I'd love to see a representative problem, to help strategize the best way (and maybe even a better way down the road.)  Feel free to contact me privately if that makes more sense.

 

Thanks!

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Tel: +1 (602) 441-0683
taylor.anderson@siemens.com

Re: expression linked to spreadsheet

Siemens Legend Siemens Legend
Siemens Legend

@Laurus,

As @TaylorAnderson mentioned, the list based functions would work along with some distribution. So you could do something like:

expression1=ug_read_list(spreadhseet path+spreadsheet name, sheet name, starting cell (e.g. A1), True) to read a horizontal list (use 'False' to read a vertical list)

Then for the rest of the expressions:

expression2=nth(1,expression1)

expression3=nth(2,expression1)

etc.

Regards,
Abe

Re: expression linked to spreadsheet

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Thank you Abe, it is what I needed.

To cut it short, I need to model customized threads, that are used as tools in many parts.

The parts must not be Read-Only (Part Families are not what I need).

I have an Excel Sheet with the values I need (10 columns and 8 rows), similar to the file used for Thread tables.

These values may change after the parts have been modeled, as a result of post production feed-back and every part must update.

So I think the best solution  is to link the expressions in the parts to the Excel Sheet directly, so that, if some value change, all I need to to is to update the expressions to the Xls Sheet, without having to check which value has changed

 

Re: expression linked to spreadsheet

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Note I don't think this applies in your case, as it sounds like each one is custom for that assembly.

But if they are "standard within your compnay", you CAN define your own thread classes/types in the thread tables.

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled


Re: expression linked to spreadsheet

Siemens Legend Siemens Legend
Siemens Legend

@Laurus,

If you do use this approach, whenever you make changes to the spreadsheet after you have set things up, you need to use the 'Update for External Change' option found under tools --> Update.

Regards,
Abe