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

Drawing store sheet number / copy sheet

Nicolas_G
10-Marble

Drawing store sheet number / copy sheet

Hello,

 

I want to create a mapkey to copy a sheet and then come-back to the original sheet.

I imagine to use the parameter sheet_number but i don't know how to store its value.

 

Do you have any idea ?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

I created Autoit scripts + mapkeys. This "thing" works in Creo 7.0.5.0 for drawing with 2+ sheets.

MartinHanak_0-1668775785849.png

mapkeys:

mapkey x1 @SYSTEMstart "" "C:\\PTC\\mouse_position\\get_mouse_position.exe";

mapkey x2 ~ RButtonArm `main_dlg_cur` `switcher_lay_buttons_lay_ph.page_1` 0 \
mapkey(continued) ``;\
mapkey(continued) ~ Trail `UI Desktop` `UI Desktop` `SmartTabs` `selectButton \
mapkey(continued) main_dlg_cur@switcher_lay_buttons_lay page_1 0`;\
mapkey(continued) ~ PopupOver `main_dlg_cur` `PM_switcher_lay_buttons_lay_ph.tab_container` 1 \
mapkey(continued) `switcher_lay_buttons_lay_ph.page_1`;~ Command `ProCmdDwgMoveCopySheets` ;\
mapkey(continued) ~ Activate `movesheet` `ChkCopy` 1;~ Activate `movesheet` `OK`;

mapkey x3 @SYSTEMstart "" "C:\\PTC\\mouse_position\\set_mouse_position.exe";

mapkey xx %x1;%x2;%x3

usage:

  • select sheet tab (its name is displayed with bold characters)
  • type xx on keyboard to run mapkey

 

 


Martin Hanák

View solution in original post

16 REPLIES 16

You will need to use a command that it is not in the ribbon. Use the command search to find it (magnifying glass in the ribbon). Invoke that command and record the mapkey with the sheet numbers. I would make a nested mapkey starting with one that invokes this command to bring up the window.

 

This is the window for the command that will appear.

 

tbraxton_0-1668615479667.png

 

 

 

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric

Thanks,

 

Is there a possibility to use this command without manually enter the sheet number?

 

For example:

 

My drw have 5 sheets. I want to

create a copy of sheet 2 (creo goes on copy sheet) and automatically comeback on sheet 2.

create a copy of sheet 4 (creo goes on copy sheet) and automatically comeback on sheet 4.

I want to be able to do the same with any sheet of any drawing.

This is not possible with mapkeys only. Mapkeys do not generally support programming logic functions such as variables, a stack or register etc.

User defined variables at run time are possible with mapkeys in some cases where the UI supports this by pausing for user input. I think the best you will do with strictly a mapkey is to invoke the go to sheet UI and then enter the sheet number.

 

There are some methods to create mapkeys on the fly using variables, but it may not be worth it in terms of time saved as you will need to use some other programming tool to write the sequence and load it into Creo in real time. There are also ways to implement a toggle function using mapkeys by dynamically defining them within a mapkey sequence. This is not a true toggle as the mapkey is never aware of the current state.

 

The toggle mapkey trick would work but only for one set of two page numbers (i.e 1&4), if you need to do this on the fly by changing the page numbers you will need to run an external script which is probably not saving you time.

 

If this something you really need for productivity, then I would look to one of the Creo APIs to implement this. I would suggest writing pseudo code for what you need to happen and then looking at the API function calls.

 

I would look at the  Tookit API first, if it does not have an API call to switch sheets then most likely none of the other APIs have it either.

 

 

 

 

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric

Thanks  tbraxton, 

 

I am not specialist of toolkit API.

How shall I do to search for an existing one?

 

Hi,

I created Autoit scripts + mapkeys. This "thing" works in Creo 7.0.5.0 for drawing with 2+ sheets.

MartinHanak_0-1668775785849.png

mapkeys:

mapkey x1 @SYSTEMstart "" "C:\\PTC\\mouse_position\\get_mouse_position.exe";

mapkey x2 ~ RButtonArm `main_dlg_cur` `switcher_lay_buttons_lay_ph.page_1` 0 \
mapkey(continued) ``;\
mapkey(continued) ~ Trail `UI Desktop` `UI Desktop` `SmartTabs` `selectButton \
mapkey(continued) main_dlg_cur@switcher_lay_buttons_lay page_1 0`;\
mapkey(continued) ~ PopupOver `main_dlg_cur` `PM_switcher_lay_buttons_lay_ph.tab_container` 1 \
mapkey(continued) `switcher_lay_buttons_lay_ph.page_1`;~ Command `ProCmdDwgMoveCopySheets` ;\
mapkey(continued) ~ Activate `movesheet` `ChkCopy` 1;~ Activate `movesheet` `OK`;

mapkey x3 @SYSTEMstart "" "C:\\PTC\\mouse_position\\set_mouse_position.exe";

mapkey xx %x1;%x2;%x3

usage:

  • select sheet tab (its name is displayed with bold characters)
  • type xx on keyboard to run mapkey

 

 


Martin Hanák

Thanks,

 

very interesting.

I will try.

Hi Martin,

 

Your mapkey answered my question. Thanks

I tried to use it also for mapkeys where it is needed to select the same view at different steps to eliminate repetitive dialog box and users actions but what is strange, when I register a new action after your mapkey, it seems all following actions are done (or tried to be done) before the left click of the mapkey. The left click is done at the end of all actions.

 

Actually, the whole story is to copy a drawing view to convert the copy as draft view. So for that:

0- with the cursor located on the view, the location can be registered with x1

1- copy the sheet including the view. The copied sheet is inserted as 1st sheet (unfortunatly copy view doesn't exist)

2- The copied sheet is the active one. Pause to ask user to select the view to convert as draft entity 

actions performed to convert the view and activate skectch tab

4- Pause to ask user to select the entities to group as draft view.

action performed to group entities

5- Pause to ask user to select the draft view. (could be replaced by x3) 

6- Atcivate move to sheet

7- Pause to ask user to select the original sheet

8- go to sheet 1

9- delete sheet 1

 

If you have any idea to be able to use x1 and x3 to simplify or any other idea is welcomed.

 

Thanks,

Nicolas


@Nicolas_G wrote:

Hi Martin,

 

Your mapkey answered my question. Thanks

I tried to use it also for mapkeys where it is needed to select the same view at different steps to eliminate repetitive dialog box and users actions but what is strange, when I register a new action after your mapkey, it seems all following actions are done (or tried to be done) before the left click of the mapkey. The left click is done at the end of all actions.

 

Actually, the whole story is to copy a drawing view to convert the copy as draft view. So for that:

0- with the cursor located on the view, the location can be registered with x1

1- copy the sheet including the view. The copied sheet is inserted as 1st sheet (unfortunatly copy view doesn't exist)

2- The copied sheet is the active one. Pause to ask user to select the view to convert as draft entity 

actions performed to convert the view and activate skectch tab

4- Pause to ask user to select the entities to group as draft view.

action performed to group entities

5- Pause to ask user to select the draft view. (could be replaced by x3) 

6- Atcivate move to sheet

7- Pause to ask user to select the original sheet

8- go to sheet 1

9- delete sheet 1

 

If you have any idea to be able to use x1 and x3 to simplify or any other idea is welcomed.

 

Thanks,

Nicolas


Hi,

unfortunately, I don't understand exactly what activity you want to automate. I understand that you need to convert copy of drawing view to draft view.
Suggestion: Please publish a couple of pictures containing notes explaining your "process".


Martin Hanák

Hi Martin,

Please find a ppt with the different steps of the mapkey I created.
At steps 2 and 4, user have to click (approximatly) at the same position on the screen. That's why I imagine to use your mapkey to do these click automatically.

 

Thanks,

Nicolas

 

With the file.

Hi,

please tell me what Creo version do you use.


Martin Hanák

Sorry,

I forgot to put the information: I use Creo 8.0.2.0.

 

Thanks for your interest,

Nicolas

... and one more question. Why do you need to convert drawing view to draft group? What do you get out of it?


Martin Hanák

We have big parametric assemblies with Pro/program. (Details parts are also parametric with pro/program to be regenerated with differents dimensions depending on input parameters values). We create assembly instances to display different configurations on the drawing.

1- To have correct drawing views,  instances have to be put on different sheets to regenerate model sheet by sheet. PDF of each sheet have to be done individually to finally combined them.

2- Consequently, windchill published PDF of drw display views not properly regenerated.

3- It creates drawings wtih long time to regenerate and update even to add or modify a simple note.

 

The idea is to convert the views as draft views to fix them for these benefits:

- No time lost to regenerate when going on any sheet. 

- Windchill Published PDF is correct. No more need to create PDF manually.

- Drawing views from CAD models are only erased. Possibility to unerase to display the original views from the model to update drawing view when needed.

 

Thanks,

Nicolas

Hi,

I'm sorry, but after reviewing the information provided, I've decided not to continue the discussion. The problem seems too complicated to solve with a mapkey.

 

 


Martin Hanák

No problem,

 

Thanks for your time.

 

Best Regards,

Nicolas Guillot

Announcements