turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Navigation
- NX Design
- Forums
- Blogs
- Knowledge Bases
- Groups

- Siemens PLM Community
- NX Design
- NX Design Forum
- Update Point From Spreadsheet

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-11-2016 04:06 PM - edited

Dear All,

I have pionts in NX part and I want to link their x,y,z cordinates to the spreadsheet. It means whenever I change the excel they update automatically. Is there any suggestion using expressions os internal spreadsheets? I use NX 11

Sina shojaee

Solved! Go to Solution.

Labels:

9 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-13-2017 08:52 AM - edited 01-13-2017 08:52 AM

@sina wrote:Dear All,

I have pionts in NX part and I want to link their x,y,z cordinates to the spreadsheet. It means whenever I change the excel they update automatically. Is there any suggestion using expressions os internal spreadsheets? I use NX 11

Hello Sina,

Did you find a solution?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-16-2017 08:21 AM

Hi,

Will it be ok for you to use UG_EXCEL_READ to link the co-ordinate values of the points with a spreadsheet value ? I did it for an automated piping project (NX 5).

Regards

Kapil

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-16-2017 08:22 AM

You can also look into Knowledge Fusion for automating it .

Regards

Kapil

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-19-2017 08:08 PM

@kapilsharma wrote:Hi,

Will it be ok for you to use UG_EXCEL_READ to link the co-ordinate values of the points with a spreadsheet value ? I did it for an automated piping project (NX 5).

Regards

Kapil

Hi @kapilsharma,

Is it somehow possible to provide an example?

Thank you!

Danijel

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-20-2017 08:30 PM - edited 01-20-2017 08:31 PM

danijelVR --

Here's an example that might be useful.

NX File (Saved in NX 9)

XLSX File

AVI File

It covers a bit more than you're asking for, I think, but might give you some interesting ideas. :-)

This one uses ug_read_list() to collect ten 2D points from a spreadsheet (could easily be adapted to 3D, of course) and create points for them. A sketch is then created referencing these points, and a solid is constructed from the sketch.

The spreadsheet actually contains four different options for the Y coordinates, and the expression logic is set up to easily swap between these (or add additional sets, if desired.)

And then there's a Product Template interface on the model to allow REALLY simple swapping of the Y coordinates. :-)

To try this, just save the files locally, open the PRT in NX, and edit the "point_data_spreadsheet" expression to point to the XLSX file. Make sense?

I've added a movie, too, so you can see what to expect:

Any questions?

Taylor Anderson

NX Product Manager, Knowledge Reuse and NX Design

Tel: +1 (602) 441-0683

taylor.anderson@siemens.com

NX Product Manager, Knowledge Reuse and NX Design

Tel: +1 (602) 441-0683

taylor.anderson@siemens.com

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-23-2017 04:17 AM

Hi,

Very good example!

Would you please explain below expression and its formula?

Name: point01

Formula: Point(nth(1,points_X_coordinates),nth(1,points_Y_coordinates),0)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-23-2017 05:30 PM

My pleasure. :-)

First, the expression is a "Point" expression, meaning that rather than holding a single number, it holds a 3D point coordinate location. The most basic Point expression might have a formula that looks something like this:

point(1,2,3)

...indicating a 3D location with an X coordinate of 1, Y coordinate of 2, and z coordinate of 3.

So far, so good?

Now... in the expression you mention, there's one more interesting expression type at work. In the middle of the formula, there are references to points_X_coordinates and points_Y_coordinates. Each of these is a "List" expression. Rather than holding a single number, a "List" expression can store a set of values. (These might be numbers, strings, points, etc., or even other lists.) Each of these expressions is using a function called ug_read_list() to pull a series of values from the Excel spreadsheet and populate the list expression. If you look at the value of each of these expressions, they each look something like this:

{55,65,70,65,50,35,25,20,25,40}

Now, back to the Point expression "point01"...

The curve we're going to create from these points is planar and lies on the XY plane, so within the point() function, the Z coordinate of this point is just zero.

Point(nth(1,points_X_coordinates),nth(1,points_Y_coordinates),)0

That's the easy one. :-)

This expression "point01" is the first of ten point expressions we're creating here. As such, for the X coordinate, we want to pull the FIRST value out of the points_X_coordinates List expression. We'll do that using a function called nth(). This function pulls the "N-th" value out of a list. (fourth, fifth, twelfth, etc. or first, second, third, even though they don't actually end in -th.) But this little expression:

nth(1,points_X_coordinates)

...is what makes that happen. For reference, further down the expression list, we pull out the sixth value for the "point06" expression with the same method:

nth(6,points_X_coordinates)

And so then we do a similar thing for the Y coordinate:

nth(1,points_Y_coordinates)

...and then we insert each of those into the X and Y coordinate locations in the point() function and we end up with the final formula:

Point(nth(1,points_X_coordinates),nth(1,points_Y_coordinates),0)

Once the point expressions have been created, ten Point features were created referencing these ten Point expressions:

And the spline curve in Sketch(11) references these ten points.

See how that all works? Pretty cool, huh? :-)

Any more questions?

Taylor Anderson

NX Product Manager, Knowledge Reuse and NX Design

Tel: +1 (602) 441-0683

taylor.anderson@siemens.com

NX Product Manager, Knowledge Reuse and NX Design

Tel: +1 (602) 441-0683

taylor.anderson@siemens.com

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-24-2017 02:48 AM

@TaylorAnderson wrote:danijelVR --

Here's an example that might be useful.

NX File (Saved in NX 9)

XLSX File

AVI File

It covers a bit more than you're asking for, I think, but might give you some interesting ideas. :-)

This one uses ug_read_list() to collect ten 2D points from a spreadsheet (could easily be adapted to 3D, of course) and create points for them. A sketch is then created referencing these points, and a solid is constructed from the sketch.

The spreadsheet actually contains four different options for the Y coordinates, and the expression logic is set up to easily swap between these (or add additional sets, if desired.)

And then there's a Product Template interface on the model to allow REALLY simple swapping of the Y coordinates. :-)

To try this, just save the files locally, open the PRT in NX, and edit the "point_data_spreadsheet" expression to point to the XLSX file. Make sense?

I've added a movie, too, so you can see what to expect:

Any questions?

This is very helpful! I will try to adapt it on my case and if I have some question, I will post it.

Thank you very much!

Danijel

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-24-2017 02:41 PM

I'm very much looking forward to it, Danijel.

Thanks!

Taylor Anderson

NX Product Manager, Knowledge Reuse and NX Design

Tel: +1 (602) 441-0683

taylor.anderson@siemens.com

NX Product Manager, Knowledge Reuse and NX Design

Tel: +1 (602) 441-0683

taylor.anderson@siemens.com

Follow Siemens PLM Software

© 2018 Siemens Product Lifecycle Management Software Inc