Skip to main content
3-Newcomer
October 4, 2023
Question

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

  • October 4, 2023
  • 3 replies
  • 3599 views

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?

3 replies

24-Ruby III
October 4, 2023

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.

3-Newcomer
October 4, 2023

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.

23-Emerald III
October 4, 2023

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?

 

3-Newcomer
October 4, 2023

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.

23-Emerald III
October 4, 2023

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
October 4, 2023

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.

3-Newcomer
October 4, 2023

ohhh that sounds complicated.😁