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

Mapkey for reading an input.txt from a specific directory for the regeneration of the model?

SOLVED
Amethyst

Mapkey for reading an input.txt from a specific directory for the regeneration of the model?

Hi,

Is it possible to make a Mapkey so it reads an input.txt file (with value of my models parameters) to use it in the "Read File" regeneration option? The file is in a very specific directory, I does not move and has a fixed name (input.txt)

Nic.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Mapkey for reading an input.txt from a specific directory for the regeneration of the model?

Yes

First step is to create a part (or assembly) with one or more INPUT parameters. That will make the "Read File" available when you regenerate your part.

Then just record a new mapkey, click on Edit --> Regenerate --> Read File --> Enter the full filename

It will look something like this (I have named the mapkey qq)

mapkey qq @MAPKEY_NAMEqq;@MAPKEY_LABELqq;~ Command `ProCmdRegenPart`;\

mapkey(continued) #READ FILE;c:\temp\input.txt;\

mapkey(continued) ~ Activate `main_dlg_cur` `main_dlg_cur`;

View solution in original post

9 REPLIES 9

Re: Mapkey for reading an input.txt from a specific directory for the regeneration of the model?

Yes

First step is to create a part (or assembly) with one or more INPUT parameters. That will make the "Read File" available when you regenerate your part.

Then just record a new mapkey, click on Edit --> Regenerate --> Read File --> Enter the full filename

It will look something like this (I have named the mapkey qq)

mapkey qq @MAPKEY_NAMEqq;@MAPKEY_LABELqq;~ Command `ProCmdRegenPart`;\

mapkey(continued) #READ FILE;c:\temp\input.txt;\

mapkey(continued) ~ Activate `main_dlg_cur` `main_dlg_cur`;

View solution in original post

Re: Mapkey for reading an input.txt from a specific directory for the regeneration of the model?

aaaaaahhhhh... thank you!!! So that was the trick!! Put the whole path to the file!!

Thank you again!

Nic.

Re: Mapkey for reading an input.txt from a specific directory for the regeneration of the model?

Could you please elaborate this a bit? This "read file" option when regeneration sounds interesting but I can't follow what's happening here.

You wrote "click on edit-->regerenate" - Edit where? In the ribbon - Model - Operations - Regeneration there is no option for "read file", and neither is in Parameters - Edit.

Andreas

Re: Mapkey for reading an input.txt from a specific directory for the regeneration of the model?

"First step is to create a part (or assembly) with one or more INPUT parameters"


Does your part/assembly have any INPUT parameters? If so, then the "Read File" option will become available.


I'm still on WildFire 4.0, so that's why I refer to "Edit" --> "Regenerate"

For Creo 4, that should look something like "Model" --> "Regenerate"


Yes, still on WF4, you've read that right 🙂

Re: Mapkey for reading an input.txt from a specific directory for the regeneration of the model?

Or just simply click on the regenerate icon and you will have the menu with:

Current Values (the one stored in the model at the moment you clicked on the"regenerate" button)

Enter (which will show the available parameter of which value you can enter from the keyboard)

Read File (which reads these values for the model's parameter from a text file. You will have inside the text file lines with the names of your parameter and the values something like

Param1 = 1 (if Param1 was defined as "number")

Param2 = "String value" (if Param2 was defined as a "string")

Param3 = Yes (if param3 was defined as a "Yes_No" value)

Re: Mapkey for reading an input.txt from a specific directory for the regeneration of the model?

"First step is to create a part (or assembly) with one or more INPUT parameters"

Yeah, you already lost me there. What is an input parameter? Our models have parameters, some are pdm driven, some are relation driven, some are to be changed manually. Type can be Real, Integer, String, Yes/no. But INPUT? I can think of that only in drawings, when a model parameter, required by the frame via template, is not present.

Highlighted

Re: Mapkey for reading an input.txt from a specific directory for the regeneration of the model?

Try to look at this post

Drawing Program User Guide, Tutorial and Hands-On Workshop

which was created primarily for

Drawing Program which is DIFFERENT from Pro/PROGRAM

but you will find very useful links for start using Pro?PROGRAM, including a Hands-on workshop (with that I started to familiarise with Pro/Program).

Nic.

Re: Mapkey for reading an input.txt from a specific directory for the regeneration of the model?

See the attachment (cilinder_example.zip) of this post https://www.ptcusercommunity.com/message/474748#474748

Re: Mapkey for reading an input.txt from a specific directory for the regeneration of the model?

OK, thanks to both of you.

Announcements
LiveWorx Call For Papers Happening Now!