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!

Pro E and Excel 1

Status
Not open for further replies.

junaidyusfzai

Mechanical
Apr 21, 2011
3
0
0
PK
Dear all:
I need to link a simple pro-e assembly with an external
excel sheet.in a way that if i suppress any component in excel
so that the pro-e will act accordingly while regenerating updates from
the excel sheet.Can any one help me in this.
 
Replies continue below

Recommended for you

Yes. You can add components as items in a family table then switch them on and off in the assembly using the family table. Creating the family table by adding components to it creates Yes (Y) and No (N) parameters that effectively suppress or resume components. In Excel, you can change the Y and N parameters to N and Y to suppress one and resume the other. As far as I know there is no limit on how many components you can add to the family table in this way. The option to edit the family table with Excel should appear when you choose to edit the family table.



Tunalover
 
junaidyusfzai-
The spreadsheet simply pops up as an option when you enter the family table. I don't think you can keep the spreadsheet as a separate document external to the model.


Tunalover
 
thanks tunalover for help.I am thinking here a bit differently.My intentions are that I will add features in assembly and simply apply the if else condition in Pro-E program code before the feature.and use that feature id in excel sheet with Y or N option.Thus i think of not using the family tables.
 
Yes, you can "link" an Excel spreadsheet to PRO/Engineer and keep that as a separate document external to the model.

As soon as your assembly has any INPUT parameters, you will have the option to "Read File" when you regenerate your model.
So create these three INPUT parameters in your assembly

INPUT
MY_PARAMETER_NAME_1 NUMBER
MY_PARAMETER_NAME_2 YES_NO
MY_PARAMETER_NAME_3 STRING
END INPUT

Next, create a text-file:
MY_PARAMETER_NAME_1 = 500
MY_PARAMETER_NAME_2 = YES
MY_PARAMETER_NAME_3 = "SOME TEXT"

Save this text-file as: "c:\temp\input.txt"

Regenerate your assembly, choose Read File, and enter "c:\temp\input.txt"

Check the values of your INPUT parameters, they should be like the values from the text-file.


From Excel:
If you want to do this from Excel, you must write a simple marco which creates the "input.txt" file. In our case, we create an OUTPUT workheet which holds three columns. Columns A holds the NAME of the parameter, column B holds the equal sign ("="), column C holds the actual value. The macro must combine those three columns to a text-line and write it to the "input.txt" file.

Within PRO/E: Create a mapkey which will execute these steps: Edit --> Regenerate --> Read File --> "c:\temp\input.txt"
You can also create a button which will execute that mapkey.

HTH!
 
too bad that creo doesn't include a proper excel interface like other cad packages (solidworks, even catia i think) do.
probably a remnant from the linux era.
 
Status
Not open for further replies.
Back
Top