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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

mapkey to delete existing views and create a "standard" set

mdebower
18-Opal

mapkey to delete existing views and create a "standard" set

Hey Mapkey gurus....


I am trying to create a mapkey that will delete any existing defined views and recreate a standard set of views. You know the usual Front, Right, Left, Top, Bottom, Back, Isometric views.


Anybody got any examples or hints, tips, or tricks for doing this? For example, there doesn't appear to be any way to delete all the existing views without somebody picking them first. I would like to make this as automatic as possible.



Creo Elements Pro 5.0 m200 (Pro/ENGINEER Wildfire 5.0)


-marc


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
6 REPLIES 6
mlocascio
4-Participant
(To:mdebower)

Marc,



IF your documents have standard view naming conventions you could use a
macro to do what you want to do. I would rather do that with a drawing setup
file. It seems to be more practical.



Mike Locascio

Michael,


Sorry, I should have remembered to state that I am trying to standardize the model views. We have some models that start parts were not used when they were created and I am trying add the same views as the start part has defined.


-marc

cprice
10-Marble
(To:mdebower)

Here's one for when no views are existing -

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!New Define View for files that were started without a template
!Note: First, orient model to desired front view, open the mapkey dialog,
! reopen the View Orient dialog, run the mapkey
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
mapkey define_views @MAPKEY_NAMECreate Multiple views;\
mapkey(continued) @MAPKEY_LABELAuto Define Views;~ Input `orient` `namedviewPH.NameVw_IP` `F`;\
mapkey(continued) ~ Activate `orient` `NmViewCheckBtn`1;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Fr`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Fro`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Fron`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Front`;\
mapkey(continued) ~ Update `orient` `namedviewPH.NameVw_IP` `Front`;\
mapkey(continued) ~ Activate `orient` `namedviewPH.NameVw_PB_Save`;\
mapkey(continued) ~ Open `orient` `SetupOptions`;~ Close `orient` `SetupOptions`;\
mapkey(continued) ~ Select `orient` `SetupOptions`1  `dynorient`;\
mapkey(continued) ~ Activate `orient` `spinPH.YSpinBox`90.000000 ;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `L`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Le`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Lef`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Left`;\
mapkey(continued) ~ Update `orient` `namedviewPH.NameVw_IP` `Left`;\
mapkey(continued) ~ Activate `orient` `namedviewPH.NameVw_PB_Save`;\
mapkey(continued) ~ Activate `orient` `spinPH.YSpinBox`-90.000000 ;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `R`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Ri`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Rig`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Righ`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Right`;\
mapkey(continued) ~ Update `orient` `namedviewPH.NameVw_IP` `Right`;\
mapkey(continued) ~ Activate `orient` `namedviewPH.NameVw_PB_Save`;\
mapkey(continued) ~ Activate `orient` `spinPH.YSpinBox`180.000000 ;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `B`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Ba`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Bac`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Back`;\
mapkey(continued) ~ Update `orient` `namedviewPH.NameVw_IP` `Back`;\
mapkey(continued) ~ Activate `orient` `namedviewPH.NameVw_PB_Save`;\
mapkey(continued) ~ Activate `orient` `spinPH.YSpinBox`0.000000 ;\
mapkey(continued) ~ Activate `orient` `spinPH.XSpinBox`90.000000 ;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `T`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `To`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Top`;\
mapkey(continued) ~ Update `orient` `namedviewPH.NameVw_IP` `Top`;\
mapkey(continued) ~ Activate `orient` `namedviewPH.NameVw_PB_Save`;\
mapkey(continued) ~ Activate `orient` `spinPH.YSpinBox`180.000000 ;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `B`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Bo`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Bot`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Bott`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Botto`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `Bottom`;\
mapkey(continued) ~ Update `orient` `namedviewPH.NameVw_IP` `Bottom`;\
mapkey(continued) ~ Activate `orient` `namedviewPH.NameVw_PB_Save`;~ Activate `orient` `OkPB`;

Charlie Price
Strategic Technical Services LLC
Phone 330.887.9295 Desk/Mobile/FAX
Main 888.479.1566x127
charlie.price@stechservices.com
----------

Charlie,

Thanks for the mapkey; I used it as the basis for my own, once I saw what you were doing. Thanks!!

-marc


mapkey tview @MAPKEY_NAMECreate TMC STD views in the model.;\
mapkey(continued) @MAPKEY_LABELCreate std model views;~ Command `ProCmdViewDefault` ;\
mapkey(continued) ~ Command `ProCmdViewOrient` ;\
mapkey(continued) @MANUAL_PAUSESelect each saved view and delete, one by one.\nThe only \
mapkey(continued) remaining views will need to be the\nStandard and Default Orientation.;\
mapkey(continued) ~ Activate `orient` `orientsurfPH.OrientSel1`;\
mapkey(continued) @MANUAL_PAUSESelect the "Front" datum plane.;\
mapkey(continued) @MANUAL_PAUSESelect the "Base" datum plane.;\
mapkey(continued) ~ Activate `orient` `namedviewPH.NameVw_PB_Save`;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `front`;\
mapkey(continued) ~ Update `orient` `namedviewPH.NameVw_IP` `front`;\
mapkey(continued) ~ Activate `orient` `namedviewPH.NameVw_PB_Save`;\
mapkey(continued) ~ Open `orient` `SetupOptions`;~ Close `orient` `SetupOptions`;\
mapkey(continued) ~ Select `orient` `SetupOptions`1 `dynorient`;\
mapkey(continued) ~ Update `orient` `spinPH.YSpinBox`90.000000 ;\
mapkey(continued) ~ Activate `orient` `spinPH.YSpinBox`90.000000 ;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `left`;\
mapkey(continued) ~ Update `orient` `namedviewPH.NameVw_IP` `left`;\
mapkey(continued) ~ Activate `orient` `namedviewPH.NameVw_PB_Save`;\
mapkey(continued) ~ Update `orient` `spinPH.YSpinBox`180.000000 ;\
mapkey(continued) ~ Activate `orient` `spinPH.YSpinBox`180.000000 ;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `back`;\
mapkey(continued) ~ Update `orient` `namedviewPH.NameVw_IP` `back`;\
mapkey(continued) ~ Activate `orient` `namedviewPH.NameVw_PB_Save`;\
mapkey(continued) ~ Update `orient` `spinPH.YSpinBox`-90.000000 ;\
mapkey(continued) ~ Activate `orient` `spinPH.YSpinBox`-90.000000 ;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `right`;\
mapkey(continued) ~ Update `orient` `namedviewPH.NameVw_IP` `right`;\
mapkey(continued) ~ Activate `orient` `namedviewPH.NameVw_PB_Save`;\
mapkey(continued) ~ Update `orient` `spinPH.YSpinBox`0.000000 ;\
mapkey(continued) ~ Activate `orient` `spinPH.YSpinBox`0.000000 ;\
mapkey(continued) ~ Update `orient` `spinPH.XSpinBox`90.000000 ;\
mapkey(continued) ~ Activate `orient` `spinPH.XSpinBox`90.000000 ;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `top`;\
mapkey(continued) ~ Update `orient` `namedviewPH.NameVw_IP` `top`;\
mapkey(continued) ~ Activate `orient` `namedviewPH.NameVw_PB_Save`;\
mapkey(continued) ~ Update `orient` `spinPH.XSpinBox`-90.000000 ;\
mapkey(continued) ~ Activate `orient` `spinPH.XSpinBox`-90.000000 ;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `bottom`;\
mapkey(continued) ~ Update `orient` `namedviewPH.NameVw_IP` `bottom`;\
mapkey(continued) ~ Activate `orient` `namedviewPH.NameVw_PB_Save`;\
mapkey(continued) ~ Update `orient` `spinPH.XSpinBox`0.000000 ;\
mapkey(continued) ~ Activate `orient` `spinPH.XSpinBox`0.000000 ;\
mapkey(continued) ~ Update `orient` `spinPH.YSpinBox`-35.260000 ;\
mapkey(continued) ~ Activate `orient` `spinPH.YSpinBox`-35.260000 ;\
mapkey(continued) ~ Update `orient` `spinPH.XSpinBox`45.000000 ;\
mapkey(continued) ~ Activate `orient` `spinPH.XSpinBox`45.000000 ;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `iso`;\
mapkey(continued) ~ Update `orient` `namedviewPH.NameVw_IP` `iso`;\
mapkey(continued) ~ Activate `orient` `namedviewPH.NameVw_IP`;\
mapkey(continued) ~ Update `orient` `spinPH.XSpinBox`0.000000 ;\
mapkey(continued) ~ Activate `orient` `spinPH.XSpinBox`0.000000 ;\
mapkey(continued) ~ Update `orient` `spinPH.YSpinBox`35.260000 ;\
mapkey(continued) ~ Activate `orient` `spinPH.YSpinBox`35.260000 ;\
mapkey(continued) ~ Update `orient` `spinPH.YSpinBox`180.000000 ;\
mapkey(continued) ~ Activate `orient` `spinPH.YSpinBox`180.000000 ;\
mapkey(continued) ~ Update `orient` `spinPH.XSpinBox`45.000000 ;\
mapkey(continued) ~ Activate `orient` `spinPH.XSpinBox`45.000000 ;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `biso`;\
mapkey(continued) ~ Update `orient` `namedviewPH.NameVw_IP` `biso`;\
mapkey(continued) ~ Activate `orient` `namedviewPH.NameVw_PB_Save`;~ Activate `orient` `OkPB`;\
mapkey(continued) ~ Command `ProCmdViewDefault` ;~ Command `ProCmdRegenPart`;

davehaigh
12-Amethyst
(To:mdebower)

I have a mapkey that will add iso views to models. (Well not exact iso views, but I like this better than exact views)

You could easily modify this to what you want. It starts from the front view and orients from there.

mapkey aiv @MAPKEY_NAMEAdd Iso Views to Model;@MAPKEY_LABELAdd Iso Views;\
~ Activate `main_dlg_cur` `page_View_control_btn` 1;\
~ Command `ProCmdViewVisTool` ;\
~ Select `visual_dlg0` `RadioSelApplMgr` 1 `orientation`;\
~ Activate `visual_dlg0` `Table` 2 `front` `name_column`;\
~ Activate `visual_dlg0` `ZoneNmCreate`;\
~ Update `visual_dlg0` `Table_INPUT` `x_iso_f_r`;\
~ Activate `visual_dlg0` `Table_INPUT`;\
~ Activate `visual_dlg0` `RedefineBtn`;\
~ Select `orient` `SetupOptions` 1 `dynorient`;\
~ Activate `orient` `spinPH.YSpinBox` -40.000000;\
~ Activate `orient` `spinPH.XSpinBox` 30.000000;\
~ Activate `orient` `OkPB`;\
~ Activate `visual_dlg0` `Table` 2 `front` `name_column`;\
~ Activate `visual_dlg0` `ZoneNmCreate`;\
~ Update `visual_dlg0` `Table_INPUT` `x_iso_f_l`;\
~ Activate `visual_dlg0` `Table_INPUT`;\
~ Activate `visual_dlg0` `RedefineBtn`;\
~ Select `orient` `SetupOptions` 1 `dynorient`;\
~ Activate `orient` `spinPH.YSpinBox`40.000000 ;\
~ Activate `orient` `spinPH.XSpinBox`30.000000 ;\
~ Activate `orient` `OkPB`;\
~ Activate `visual_dlg0` `Table` 2 `front` `name_column`;\
~ Activate `visual_dlg0` `ZoneNmCreate`;\
~ Update `visual_dlg0` `Table_INPUT` `y_b_iso_f_r`;\
~ Activate `visual_dlg0` `Table_INPUT`;\
~ Activate `visual_dlg0` `RedefineBtn`;\
~ Select `orient` `SetupOptions` 1 `dynorient`;\
~ Activate `orient` `spinPH.YSpinBox`-40.000000 ;\
~ Activate `orient` `spinPH.XSpinBox`-30.000000 ;\
~ Activate `orient` `OkPB`;\
~ Activate `visual_dlg0` `Table` 2 `front` `name_column`;\
~ Activate `visual_dlg0` `ZoneNmCreate`;\
~ Update `visual_dlg0` `Table_INPUT` `y_b_iso_f_l`;\
~ Activate `visual_dlg0` `Table_INPUT`;\
~ Activate `visual_dlg0` `RedefineBtn`;\
~ Select `orient` `SetupOptions` 1 `dynorient`;\
~ Activate `orient` `spinPH.YSpinBox`40.000000 ;\
~ Activate `orient` `spinPH.XSpinBox`-30.000000 ;\
~ Activate `orient` `OkPB`;\
~ Activate `visual_dlg0` `Table` 2 `back` `name_column`;\
~ Activate `visual_dlg0` `ZoneNmCreate`;\
~ Update `visual_dlg0` `Table_INPUT` `x_iso_b_l`;\
~ Activate `visual_dlg0` `Table_INPUT`;\
~ Activate `visual_dlg0` `RedefineBtn`;\
~ Select `orient` `SetupOptions` 1 `dynorient`;\
~ Activate `orient` `spinPH.YSpinBox`-40.000000 ;\
~ Activate `orient` `spinPH.XSpinBox`30.000000 ;\
~ Activate `orient` `OkPB`;\
~ Activate `visual_dlg0` `Table` 2 `back` `name_column`;\
~ Activate `visual_dlg0` `ZoneNmCreate`;\
~ Update `visual_dlg0` `Table_INPUT` `x_iso_b_r`;\
~ Activate `visual_dlg0` `Table_INPUT`;\
~ Activate `visual_dlg0` `RedefineBtn`;\
~ Select `orient` `SetupOptions` 1 `dynorient`;\
~ Activate `orient` `spinPH.YSpinBox`40.000000 ;\
~ Activate `orient` `spinPH.XSpinBox`30.000000 ;\
~ Activate `orient` `OkPB`;\
~ Activate `visual_dlg0` `Table` 2 `back` `name_column`;\
~ Activate `visual_dlg0` `ZoneNmCreate`;\
~ Update `visual_dlg0` `Table_INPUT` `y_b_iso_b_r`;\
~ Activate `visual_dlg0` `Table_INPUT`;\
~ Activate `visual_dlg0` `RedefineBtn`;\
~ Select `orient` `SetupOptions` 1 `dynorient`;\
~ Activate `orient` `spinPH.YSpinBox`40.000000 ;\
~ Activate `orient` `spinPH.XSpinBox`-30.000000 ;\
~ Activate `orient` `OkPB`;\
~ Activate `visual_dlg0` `Table` 2 `back` `name_column`;\
~ Activate `visual_dlg0` `ZoneNmCreate`;\
~ Update `visual_dlg0` `Table_INPUT` `y_b_iso_b_l`;\
~ Activate `visual_dlg0` `Table_INPUT`;\
~ Activate `visual_dlg0` `RedefineBtn`;\
~ Select `orient` `SetupOptions` 1 `dynorient`;\
~ Activate `orient` `spinPH.YSpinBox`-40.000000 ;\
~ Activate `orient` `spinPH.XSpinBox`-30.000000 ;\
~ Activate `orient` `OkPB`;\
~ Activate `visual_dlg0` `CloseBtn`;

David Haigh

Marc,
Instead of deleting all existing views and create new once, you could simplify the task by starting a new drawing on the same filename, using a template with your standard views and overwrite the existing drawing.

/Bjarne
Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags