cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying Parameters with Excel Spreadsheet

ptc-5280311
Newbie

Modifying Parameters with Excel Spreadsheet

I have a model that is controlled by 45 parameters. I want to be able to control the parameters from an excel spreadsheet. The reason for doing this because the parameters sheet is tedious to change values and make updates. It will also be easier for individuals without a lot of Creo experience to use the program.

Please let me know if there is a way to do this.

Thanks

10 REPLIES 10

Re: Modifying Parameters with Excel Spreadsheet

Have you considered creating a drawing with a table containing the parameter values? Double clicking on parameter values in a table allows you to edit them. You can use a repeat region to pull all the parameters from your model then manually filter out the ones you don't want to see. Or, if they all have a common naming convention like a prefix or suffix, you can write a repeat region filter to pull only those you want.

This would make it nearly Excel easy but still within the Creo environment.

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn

Re: Modifying Parameters with Excel Spreadsheet

Not easily with standard functionality.

I recently came across a company called NitroMation at PTC Live Global. They offer some interesting products that might do what you want. They also have a bunch of free videos on youtube.

Re: Modifying Parameters with Excel Spreadsheet

Just for controlling parameters you may try an Excel analysis. Watch this video below:

It´s not in English, but it´s easy learn from it.

For more complex jobs, maybe some programming: VB,J-Link or Toolkit.

Another alternative is addon called SmartAssembly:

Jose

Re: Modifying Parameters with Excel Spreadsheet

I think that the excel analysis will work the best for what I am trying to do. I am having an issue with the link to the excel file though. When I originally setup the file I could get it to update the parameters. However, once I close the spreadsheet and try to reopen the model the link seems to be broken. I can open up the file and modify it but the parameters do not seem to update.

Any thought?

Re: Modifying Parameters with Excel Spreadsheet

The problem with the Excel Analysis is getting it to update. If there has been no change to a feature, Creo will not recalculate it even when you regenerate. If there has been a change to a feature, Creo will recalculate that feature and everything below. The fact that you edit the Excel sheet does not register in Creo as a change in the feature, thus it will not regenerate. To get it to regenerate, you'll have to do one of two things:

 

  1. Edit the definition of the Analysis Feature or a feature above it.
  2. Pull up the "Insert Here" arrow (or green line in Creo 6) above the feature and then pull it down again.

And even after that, you might still have to hit the Regenerate button. I have a mapkey for triggering a "deep regeneration". What it does is search for the first feature of the part, selects it, goes into insert mode, then exits insert mode, followed by two regenerations. That does a full recalculation of the entire part (except the first feature, but that's likely a csys or plane).

 

It's annoying that Creo can't check for changes in the Excel file, but that's how it is. You have to force the software to recalculate the feature.

Re: Modifying Parameters with Excel Spreadsheet

A different way of doing it would be to have an Excel output a text file, then use Pro/Program to read the text file for input parameters. You'll likely have to create a macro in Excel and a mapkey in Creo to get this to work well.

Re: Modifying Parameters with Excel Spreadsheet

Came up with a solution for forcing Creo to regenerate the Excel Analysis every time. I made a simple parameter called "TOGGLE" and a relation that sets it to 1 if it's 0 and sets it to 0 if it's not. Then I pass that parameter to the Excel Analysis, pasting it in some empty cell. Excel doesn't need to do anything with it; just the fact that it has changed forces Creo to re-check the Excel sheet.

 

After this, I still had to regenerate twice for my simple part to update. The reason was that I had my output parameters connected to my extrude in the part relations, and these are checked before regeneration, so Creo would set them to the Excel Analysis output parameters and then do the Excel Analysis. to get it to work with a single regeneration, I had to set the relations as feature relations in my Extrude feature, so it's evaluated after the Excel Analysis is done. I normally advise against using feature relations, since it's so hard for others to find, but if you want to make the part update with a single regeneration, that's how you have to do it, I think. You could add some comments to the part level relations to say that there are feature relations in some specific features.

 

Of course, the above solution will cause really long regen times, as Creo has to open the spreadsheet every time you regenerate. For a real fancy solution, you could do something like this:

 

  1. Have a text file containing just the text "VERSION=0"
  2. Make an Excel macro that increases the version number in the text file every time you save.
  3. Make a PRO/PROGRAM that inputs a VERSION parameter.
  4. Send the VERSION parameter to the Excel Analysis as described above.
  5. Make a mapkey that regenerates the part using the text file as input.

Now, when you use the mapkey to regenerate, Creo will read the version number from the text file. If it is the same as last time, the Excel Analysis won't get recalculated, as the input is the same. If the Excel file has been changed, the version number has updated, and the input to the Excel file is different, so Creo will regenerate it. Of course, this requires a special mapkey to regenerate, and it's not evident how you'd do this with several different parts. I wish Creo had a way to hard-code into the part which text file to read its inputs from, but as far as I know, that can't be done.

 

 

Yet another way to do this is as described in this thread: https://community.ptc.com/t5/Part-Modeling/How-do-you-drive-a-Creo-Parametric-Part-prt-parameters/td...

 

That method instead uses Excel to save a text file with parameter values and a mapkey that imports the text file contents into the relations, bypassing the need for an Excel Analysis or PRO/PROGRAM completely.

Re: Modifying Parameters with Excel Spreadsheet

Simplified Logic Inc specializes in bi-directional Excel to Creo or Creo to Excel data transfer this with an application called Nitro-CELL.  Please see this Website: Simplified Logic, Inc. and YouTube Channel:  Simplified Logic, Inc. - YouTube

Re: Modifying Parameters with Excel Spreadsheet

Re: Modifying Parameters with Excel Spreadsheet

I found your question, while looking for something similar (I have a lot of text boxes which my boss frequently requests I change the wording on.) While I read your question, I had a brainwave. If you (and I) pull all the parameters we want to control with excel into a family table, we can click the "Edit the current table using Excel" button and just copy and paste the new values from our spreadsheet. (It would be nice if we could keep the spreadsheet in the family table, but I've found that Creo strips out the formulas and other tricks, so that is a no go.) It is a long setup, but it would pay off in the satisfaction of the click of "Paste" and everything changes.

Announcements