Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

using spreadsheets in UG NX3

Status
Not open for further replies.

abeschneider

Mechanical
Sep 25, 2003
189
In general, is it possible to link a UG model to an external spreadsheet (ie: one not necesarily "embedded" in the model)? My understanding so far is that one creates a spreadsheet inside the UG model, but that this spreadsheet is ONLY accessible from the model.

An application example of using an external sheet would be: a UG model pulls data from an external design sheet; another UG model also pulls data from this sheet as well; and the sheet can be edited without necesarily opening UG (just by using Excel).

If this isn't clear, let me know, I can try to clarify :) Thanks!
 
Replies continue below

Recommended for you

I know you can open an external excel file from internal excel. What I don't know is if you can get the hooks from UG to read the values in the file.


"Wildfires are dangerous, hard to control, and economically catastrophic."
"Fixed in the next release" should replace "Product First" as the PTC slogan.

Ben Loosli
CAD/CAM System Analyst
Ingersoll-Rand
 
Ug stores the excel file with the part itself and one cannot access the excel file from outside,untill you save as the file.But again that saved file is unassociative and cannot work backwards. This was what till nx2.

But, I believe that there might be some way to link an excel sheet back to Ug from outside. May be Ufunc can do it.

San-j
Automotive.
 


This can be done using the new function in the Expression subsystem
(marketing name = DesignLogic) to reach out and set the value of an
expression equal to the value of a cell in an external spreadsheet. (I haven't used it yet, so I don't know the details of usage).
To update the model after a spreadsheet
change, you'll need to use "Tools -> Update -> Update for External
Change"

Another method that does use an existing UG spreadsheet that you may find useful (available since at least NX2) is to create a Part Family spreadsheet (destination) whose cells can reference an external spreadsheet (source). To create the links (order of these step is crucial), the Part Family spreadsheet needs to be open in a UG session, then the spreadsheet with desired values is also opened in Excel, make active the Part Family spreadsheet and place cursor in cell to reference the other spreadsheets cell, type an = in the cell, then select Window, then select the other (source) spreadsheet, place the cursor in the desired cell, press Enter, (this creates reference in the Part Family spreadsheet (destination) and makes it active again. This method does not put in the full path name to the source spreadsheet, so it works if destination and source are in the same folder (there is a method to add the full path by creating the link when the source spreadsheet is not open - see Excel help to do so).
 
tinhombre's method works with the standard Modelling UG spreadsheet too. The two spreadsheets need to be open at the same time (i.e. the Modelling spreadsheet and the extenal one), but when so will update automatically, and the change to the model can then be driven down by Tools>Update UG Part
 
thank you for the replies!
I have an extension of this topic, following along the 2 possible lines suggested by tinhombre and scotty 7 (Part Family spreadsheet and modelling spreadsheet). Specifically, I am trying to set up a control structure with several variations; I'm designing a complex assembly which comes in several sizes, so I'd like to combine a "part family" method with WAVE.

I'm running into a problem when using the Tools>Part Family approach, because if I apply a WAVE level below my part family template, the family members experience problems because they're all referring to the same WAVE level (part).

On the other hand, if I try to create versions of my design in the modelling spreadsheet along the lines of the CAST example for part families in the "Expressions" tutorial, then keeping all the members up-to-date becomes a hassle, since they are all essentially now independent parts unlinked to any master part.

I think that a possible solution to the latter method is to create a "master spreadsheet" external to all my UG parts, to which each one refers for it's expression values. (Part of the problem with the "Expressions" tutorial's method is that though you may create the family members by creating several columns with the member names at the bottom, the created parts aren't actually linked to these columns, relying instead on the user to actually highlight the appropriate cells and manually update the part everytime a change is made.

I hope this problem is clear - if it isn't, please let me know and I'll try to clarify. This is causing me all sorts of headache!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor