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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Does anyone have a mapkey to close all windows?

MadhaviG
11-Garnet

Does anyone have a mapkey to close all windows?

Does anyone have a mapkey to close all windows?

1 ACCEPTED SOLUTION

Accepted Solutions
TomU
23-Emerald IV
(To:MadhaviG)

Try this:

mapkey qw @MAPKEY_NAMEClose all open windows;@MAPKEY_LABELQuit Window;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;

 

It will close up to 20 windows but Creo is currently limiting me to 18 windows open at one time.

Too Many Windows.PNG

View solution in original post

8 REPLIES 8
cadcam
12-Amethyst
(To:MadhaviG)

People may better, but a cludge

 

We use qw to Quit Window (C is used as a prefix for our Create related mapkeys), and thus

qaw Quit All Windows - map have to be called a couple of times if there are alot of windows open

 

 Regards

 

 

 

mapkey qaw @MAPKEY_NAMEQuit All Windows;@MAPKEY_LABELQuit All Windows...[qaw];\
mapkey(continued) %qw;%qw;%qw;%qw;%qw;%qw;%qw;%qw;%qw;%qw;%qw;%qw;%qw;
!
mapkey qw @MAPKEY_LABELQuit Window...[qw];\
mapkey(continued) ~ Activate `main_dlg_cur` `page_View_control_btn` 0;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup`;

MadhaviG
11-Garnet
(To:cadcam)

@cadcam Thanks for the reply and sharing the code but looking for more simplified solution. Specially for a big assemblies.

 

We are using the same method.

QW = Quit Window

Then create a new mapkey that re-uses the "QW mapkey" multiple times to close multiple windows.

 

How many windows do you have open when working on a large assembly?

around 20 😐

cadcam
12-Amethyst
(To:MadhaviG)

To close 1 or 1-20 windows 😉

 

mapkey qw @MAPKEY_LABELQuit Window [qw];\
mapkey(continued) ~ Command `ProCmdWinCloseGroup`

!

mapkey qaw @MAPKEY_NAMEQuit All Windows;@MAPKEY_LABELQuit All Windows...[qaw];\
mapkey(continued) %qw;%qw;%qw;%qw;%qw;%qw;%qw;%qw;%qw;%qw;\
mapkey(continued) %qw;%qw;%qw;%qw;%qw;%qw;%qw;%qw;%qw;%qw;


We use this as well.  A surprisingly useful alternative is a mapkey I created to close Creo and start a new session.  Basically record shutting down Creo, then put that after use a batch command to start Creo.  Make sure to make the name something no one would accidentally type because closes without saving! 🙂

(Note, you must replace C:\\dir\\StartCreo.bat with whatever file you use to start Creo)

 

 

mapkey somethingrediculous @MAPKEY_NAMEExit Creo without saving and Start new Creo Session;\
mapkey(continued) @MAPKEY_LABELExit & Restart!;\
mapkey(continued) @SYSTEM\@echo off\n\n \
mapkey(continued) C:\\dir\\StartCreo.bat;\
mapkey(continued) %exitnosave;


mapkey exitnosave @MAPKEY_NAMEExit Creo without saving;\
mapkey(continued) @MAPKEY_LABELExit!;\
mapkey(continued) ~ Select `main_dlg_cur` `appl_casc`;\
mapkey(continued) ~ Close `main_dlg_cur` `appl_casc`;~ Command `ProCmdExit` ;\
mapkey(continued) ~ FocusIn `UI Message Dialog` `yes`;~ Activate `UI Message Dialog` `yes`;


"When you reward an activity, you get more of it!"
TomU
23-Emerald IV
(To:MadhaviG)

Try this:

mapkey qw @MAPKEY_NAMEClose all open windows;@MAPKEY_LABELQuit Window;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;\
mapkey(continued) ~ Command `ProCmdWinCloseGroup` ;~ Command `ProCmdWinCloseGroup` ;

 

It will close up to 20 windows but Creo is currently limiting me to 18 windows open at one time.

Too Many Windows.PNG

That is the simple solution.

Top Tags