Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Linking of UG model expressions to External Spreadsheet 1

Status
Not open for further replies.

mjcole

Mechanical
Jan 8, 2003
1,063
0
0
US
Hello All,

I was wondering if it would be possible for an External Spreadsheet used for engineering analysis could be linked to Expressions in a UG model. I'm looking to be able to access model parameters and expressions directly without using UG. Is it possible to link to the UG excel spreadsheet the same way links to other excel spreadsheets can be done i.e.

cell='[Worksheet in Expression - UG_param_excel_link.prt]Sheet1'!A1

If this is not possible could it be done using a program like IMAN which could store needed part dimensions for the analysis.

Michael

[wavey3]
 
Replies continue below

Recommended for you

Mike,
The good news: Yes it's possible to use spreadsheets to drive expressions in UG.
The bad news: You can't do what you described above. You must update the spreadsheet data from within UG to get the model to update. By this I mean that if you change the values in the external spreadsheet, you must either (1) change the links between the internal spreadsheet to the new external spreadsheet, or update the links from the old to the new. It's somewhat of a convoluted process.
Associativity is maintained when working on an Intel/Window's box, but it's lost if your working on a Unix box....the excel data must be migrated to xess. Another caveat, UG is very unforgiving if the spreadsheets are not what it expects...and it's a royal pain to edit the UG file to accept the spreadsheet data. It's much easier to adapt the spreadsheet to UG, so make sure you have the format you want before releasing the template files for general consumption by the populace...

I'm currently working on an impellor template file that that utilizes an series of external spreadsheets to define the points constrained in multiple sketches (each sketch defines a cross section in the blade, with the points defining the start/end points of splines to generate the cross sections...).

I wish I could take sole credit for this, but I'm just attempting to update and "improve" the original template file created by a UGS representative that we had in-house a couple of years ago. If the new spreadsheets is exactly what UG expects, the process is slick and easy. If not, you'll wish you took the day off...

I hope this helps..

Shadowspawn
 
Maybe I'm mistaken, but couldn't you accomplish something like this using Part Families in UG? I seem to remember seeing someone do something likes this a few years ago when I was an intern, but they had to keep UG open during the Excel analysis.

I'm probably totally wrong on this since I haven't used UG in almost 2 years (I'm stuck using Pro/E).
 
jhyder,
From what I understand about part families, you create the spreadsheet from within UG, and there is no link to an external spreadsheet. Your essentially just creating multiple versions of the same part, just with different values for the expressions. What I'm doing is different in that the parts are always different and there's no 'family' or children created.
Maybe a bit more background will help... Our engineeer uses ANSYS to come up with the various blade configurations and designs that he wants. He then creates an excel file of values representing 1)angle 2) radius 3) height of each cross section of the blade, all derived from the ansys model. (There's no acceptable means of getting the ansys model into UG). So now we have a seperate .xls file for each piece of the impeller (inducer, main blade, hub, shroud, primary splitter, secondary splitter, etc...). These .xls files are then given to use for the creating of the UG model.
Our template impeller file has sketches set up using associative points whose x/y/z values are defined in an internal spreadsheet in UG (there's over 3K expressions and 50 seperate sketches for each blade btw...). Each cell in the internal spreadsheet is "linked" to a cell in an external spreadsheet (1 internal spreadsheet, multiple external .xls files). The math to convert the angle/radius/height values to x/y/z are performed at the link (take this external value in cell B2 of spreadsheet 2 and do this math to it, and make that value equal to the internal spreadsheet cell B52).
So now we have the means of creating a wide variety of differnt impeller configurations on the fly. The 'old' method of manually creating them was very time consuming and not conducive to change. By employing this method, we can create and change the impellers at will, reducing time (literally) from weeks to create to a couple of hours, an most of this time is defining the balance of the impeller which isn't associated to the .xls files (how the impeller attaches to the shaft, etc).
The dwg isn't associated to the model except for what's required for the shaft, etc. All the blade definition manufacturing and inspection data is derived from .xls files as well, making updating the drawing almost automatic.
As I alluded to in earlier posts, this method works but is kind of cumbersome and confusing if the external .xls files don't match the expected format ( <> 50 xsects defining a blade). What I'm working on now is revamping the template file into multiple template files, where there's seperate files for each impeller part (blade, inducer, hub, shroud, etc.) that can then be wavelinked into another file for creating the actual impeller model. This would allow us to easily configure impellers as desired (with or without inducer, 2 or 3 main blades, 1,2 or 3 splitter blades, cast or machined impeller, etc.)
I have a meeting coming up so I gotta blaze. I hope this helps clarify, but if not then don't hesitate to ask any questions. This is a powerful functionality of UG...

Shadowspawn
 
To clarify my original question. I'm not trying to drive a UG model from a spreadsheet. What I'm looking for is a way to have an excel spreadsheet that contains the important dimensions that are used for part analysis on several parts so that from a spreadsheet used for Design several models can be evaluated to see which one will work best.

Right now my boss would like to be able to do something like a lookup table linked to UG. CAD packages like ProE have the dimensions p0,p1,p2 listed as text within the part files or the excel sheets that drive the model can be saved outside of the CAD program and still be linked to the model. I did a few tests and it seemed that I could link to the ug spreadsheet but the part had to be in session memory or open at the same time.

Part Families are great tools but they are UG based and still show as worksheets hidden within the model and not accessable from other programs.

ShadowSpan has come the closest to answering the question I posted and has given a lot of useful information for driving UG from excel but I'm really looking to do the opposite access UG expression values from excel. I think what I'm asking for may be possible with IMAN or ANSYS but we don't really have any seats that work properly at my company.

Michael
[spineyes]

[wavey3]
 
You might try controlling the part from the spreadsheet and also making the analysis from the spreadsheet.

The way to do it in NX3.0.2 is to use ug_excell_read() in Design logic.

One additional good practice is to use named cells rather than referencing the cell address, this makes changes to the spreadsheet possible without changing anything in the part.

Jonathan T. Schmidt
 
Status
Not open for further replies.
Back
Top