Excel spreadsheet driving sketches in NX8
Excel spreadsheet driving sketches in NX8
(OP)
I created an excel spreadsheet with all different stress calculations for a track roller bearing and was wondering if there is a way to import the file into UG NX8 and have it drive my sketches and fill in information in my notes.





RE: Excel spreadsheet driving sketches in NX8
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: Excel spreadsheet driving sketches in NX8
RE: Excel spreadsheet driving sketches in NX8
OK for a fully standalone part containing all of the spreadsheet logic, if you have an existing spreadsheet with a full set of formulas which resolve to the values that you would now like to drive your NX model, what you need to do is first create your model with all the varibles (expressions) needed to drive the parameters of your Sketch or modeling features as desired. Now go to...
Tools -> Spreadsheet...
...and when the Excel window opens, go to the 'Office Button' and Open your existing spreadsheet. Now select either the whole page or just the cells that you wish to reuse and hit 'Copy'. Now close YOUR spreadsheet and Paste the contents of your Copy into the Spreadsheet which was opened by NX. Now you have your data in the NX part file, however you still need to hook it up to your model. So select some random cell near where your formulas/data is located and select the 'Add-Ins' tab at the top of the Excel window, and from the list of function on that tab, select the one titled 'Extract Expr' and all of your expressions from your model will be inserting into the spreadsheet. If there any expressions which there is no need to create links to, you can simply delete them. Of the expressions that you do wish to link to, simply edit the 'value' cells so that they are set equal to the appropriate cells of your original spreadsheet data.
Now to force the NX model to update using the new data go back to the 'Add-Ins' tab and select the item titled 'Update NX Part'. Once that the update has finished you can simply exit/close the Excel window, but when you do you will be asked if you wish to save your spreadsheet data or not. You will want to select OK so that it's saved INSIDE the NX Part file. Remember, you must always perform the 'Update NX Part' operation from within the spreadsheet for the NX model to update. If you do not, when you leave the spreadsheet and return to the Part file nothing will have changed.
Now when you wish to make future changes using your spreadsheet data, simply go back to...
Tools -> Spreadsheet...
...and you will find all of your data is still there in the Excel window. Simply make your changes, select the 'Update NX Part' option once more and then return to the NX session by exiting/closing the Excel window (always remembering to select OK when you exit so that the spreadsheet changes are saved).
Anyway, I hope this helps you accomplish what you looking to do.
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: Excel spreadsheet driving sketches in NX8
RE: Excel spreadsheet driving sketches in NX8
RE: Excel spreadsheet driving sketches in NX8
Tools -> Spreadsheet...
...and go from there as previously described.
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: Excel spreadsheet driving sketches in NX8
RE: Excel spreadsheet driving sketches in NX8
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: Excel spreadsheet driving sketches in NX8
RE: Excel spreadsheet driving sketches in NX8
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: Excel spreadsheet driving sketches in NX8
RE: Excel spreadsheet driving sketches in NX8
Open a file that you currently have expressions in. (Make sure all your expressions have no spaces in the names.)
Export your current expressions (use the icon next to the excel icon on the expressions tab that shows P1= P2=)
& Open the exp file in notepad
(This is just to get a feel of what the expression import needs to look like)
Create an excel spreadsheet like the one attached
(Cell A is the unit, name, and equal sign all in one cell and no spaces. Cell B is the value)
Export the excel file as a .txt
(Use Save As and from the Save as type: drop downselect "Text (MS-Dos) (*.txt)
Close the excel sheet
Open the .txt file in Notepad
Find and replace all the tabs or spaces (" ") with nothing or blanks (no spaces) to remove all the spaces.
Click Save As and make sure the encoding is set to ANSI and save.
Import your expressions in NX (use the icon next to the excel icon on the expressions tab that shows P1= P2=)
Done.
You can see how you can modify this method to use this with your existing excels sheets. It may not be the best practice in the world but a huge time saver. (I had issues doing it other ways).