Skip to main content
Oct 4, 2023 6:30 AM UTC
Question

´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

Oct 4, 2023 11:23 AM UTC

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.

Oct 4, 2023 11:38 AM UTC

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.

Oct 4, 2023 11:32 AM UTC

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?

 

Oct 4, 2023 11:35 AM UTC

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.

Oct 4, 2023 11:43 AM UTC

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.

 

Oct 4, 2023 11:36 AM UTC

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.

Oct 4, 2023 11:40 AM UTC

ohhh that sounds complicated.😁