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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

´Can a Mapkey read an input from a dialog box, store it and use it in a saveas

TK_10673424
3-Newcomer

´Can a Mapkey read an input from a dialog box, store it and use it in a saveas

I want to make a mapkey, which converts a *.stp file into a *.prt file. 

First step is to convert it into a *.sat file using save as. with a pause

That saveas name should be reused when naming the  the final *.part.

How can I get the mapkey to read, store and give the final *.prt that name?

15 REPLIES 15

Hi,

mapkey is not able to remember a name entered during .sat export and use it during .prt save operation.

You can record trail file, modify name of file and play the trail file.


Martin Hanák

What a pity.  I was hoping that i could add some VBA like you can do in inventor.

The mapkey was intended for everyone to use, so using the trail file is not an option.

StephenW
23-Emerald III
(To:TK_10673424)

The first question I would have is...Why are you converting it to a .sat file?

Why not just convert the .stp file in to a creo .prt file?

 

If i convert it directly the Stepfile (pcb assembly) is all over the place. But if i make a .sat first, every component is at its right place.

StephenW
23-Emerald III
(To:TK_10673424)

It's an assembly in the original .stp file. And then you are trying to convert it to a single part file. There is an option in Creo, if you add it, it will import the step assy as a part file and keep the parts in the correct location. The standard method, as you have discovered, imports all the part at the default coordinate system of each part

 

intf3d_in_as_part yes

 

So at least you can reduce your effort for the import.

 

Chris3
21-Topaz I
(To:StephenW)

Some caveats with that config:

 

  1. It is a hidden config which means it has not been extensively tested (although PTC has talked about making it not hidden or incorporating the functionality into a future release)
  2. It is known to crash Creo for some things. It does not currently handle mixed units for example
  3. It changes the default radio box to be part even if the stp file is an assembly. So if you want an assembly you need to change it back

We are currently running Creo 7, that should not pose a problem or?

will it only crash when using the import function

What do you mean mixed units? mm and Inches together?

Mixed units means trying to merge one part that is in metric and another part that is in English units.

 

Enabling the config in of itself will not make Creo crash. Creo crashes usually when you have very small surfaces close to each other or interferences and the math for figuring out that merging is complicated.

StephenW
23-Emerald III
(To:TK_10673424)

You would need to test it on your data. I have never seen it crash.

I haven't seen the mixed units issue but maybe I haven't gotten one that had mixed units.

It does automatically set the dialog to part, that is sometimes annoying when you really do want to import as an assembly, but I have learned to check every time now.

I tried to find the command, but it seems to me that its not avaiable in Creo 7

That's because its hidden. Its not going to show up. You have to just manually type it in.

StephenW
23-Emerald III
(To:TK_10673424)

It's a hidden option. You can just add it to the config.pro using a text editor or use the ADD button in the configuration editor and type in the name and value and then OK.  (don't hit find, it won't find it)

 

Name : intf3d_in_as_part

Value:  yes

 

StephenW_0-1696422589778.png

 

Ahhh I will try that

 

The answer is yes but not with mapkeys by themselves.

 

You can have a mapkey that does the save and then calls an external script which reads the file name and then generates a new mapkey which the original mapkey reads in and executes.

 

Its a little complicated but possible.

ohhh that sounds complicated.😁

Announcements
NEW Creo+ Topics: PTC Control Center and Creo+ Portal


Top Tags