Creo 2.0 Mapkey for Iso view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Creo 2.0 Mapkey for Iso view
Hello,
I am trying to set up a mapkey that would the following .
- If named view "Iso_01" exists in the list, then activate this view
- If this view does not exists yet, create it with standard angles and then activate it.
I know how to activate a named view, I found some hints concerning "If then else" commands in mapkeys, but I can't find a way to test if the named view exists.
Anyone can help me ?
Thank you !
Solved! Go to Solution.
- Labels:
-
Parametric
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
With some imagination, you can do that:
- Create the view first.
- Start recording the mapkey
- Try to create the view again, with your standard angles
- Save the view
- A dialog message asking if you want to override the actual view appears, say no.
- Activate the desired view
- Press ok
- Stop recording mapkey
I have not tested, but I think it should work.
If the view doesn´t exist, it will be saved and activated,
If exists, it will be just activated.
Jose
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I'd say it's more trouble than it's worth to do in one mapkey. Create one to show view Iso_01 and another to create it. When invoking the first, if the part doesn't rotate, then invoke the second. Most times you'd only need the first one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Actually, if all you are doing is starting with a known ortho view, why would it matter if one already existed? You can always pick that one right off the list from the graphics toolbar. Why not create it on the fly with the mapkey?
One thing about the angles accepted by the view dialog... it truncates to 3 places. In my book, this isn't good enough. However, my method would benefit from a mapkey or UDF of some sort.
I create a cubical (equal on all 3 sides) surface; place planes; orient to those planes; delete the features; and save the view. This is accurate to the n-th degree (whatever PTC determines that to be). A follow on from there is to have the view dialog create the other 7 equivalent ISO views. Now you're ready for anything you need in a drawing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Well, it would save me a few more mapkeys to remember as I'd like to set this for 4 different ISO views.
Also I would then have all my "views" mapkeys on the numpad.
Last, I like to learn new things about Creo.
So if you have any idea I am still interested !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
With some imagination, you can do that:
- Create the view first.
- Start recording the mapkey
- Try to create the view again, with your standard angles
- Save the view
- A dialog message asking if you want to override the actual view appears, say no.
- Activate the desired view
- Press ok
- Stop recording mapkey
I have not tested, but I think it should work.
If the view doesn´t exist, it will be saved and activated,
If exists, it will be just activated.
Jose
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Works great on Creo 2.0
thanks !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It works in Creo2 but doesn't work in the Creo3.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
mapkey tx3 @MAPKEY_LABEL ISO Text Note; ~ Open `main_dlg_cur` `Sst_bar.filter_list`;\
mapkey(continued) ~ Close `main_dlg_cur` `Sst_bar.filter_list`;\
mapkey(continued) ~ Select `main_dlg_cur` `Sst_bar.filter_list`1 `17_Note_SEL FILTER`;\
mapkey(continued) @MANUAL_PAUSE Select Note;\
mapkey(continued) ~ Timer `UI Desktop` `UI Desktop` `popupMenuRMBTimerCB`;\
mapkey(continued) ~ Command `ProCmdEditProperties`
mapkey(continued) ~ FocusOut `note_text_asynch` `txt_note_text`;\
mapkey(continued) ~ Update `note_text_asynch` `txt_note_text` `ISO\nSCALE &view_scale`;\
mapkey(continued) ~ Select `note_text_asynch` `tab_main` 1 `lay_style`;\
mapkey(continued) ~ Activate `note_text_asynch` `chk_usedefheight` 0;\
mapkey(continued) ~ Update `note_text_asynch` `inp_height` `3`;\
mapkey(continued) ~ Update `note_text_asynch` `inp_height` `3`;\
mapkey(continued) ~ Select `note_text_asynch` `tab_main` 1 `lay_style`;\
mapkey(continued) ~ Activate `note_text_asynch` `chk_usedefthickness` 0;\
mapkey(continued) ~ Update `note_text_asynch` `inp_thickness` `.3`;\
mapkey(continued) ~ Activate `note_text_asynch` `psh_color`;~ Activate `tscoldial` `sys0` 1;\
mapkey(continued) ~ Activate `tscoldial` `Ok`;~ FocusOut `note_text_asynch` `txt_note_text`;\
mapkey(continued) ~ Select `note_text_asynch` `opt_horjust` 1 `Center for text style dialog`;\
mapkey(continued) ~ Activate `note_text_asynch` `psh_ok`;;
The Emoticon is (;\) without brackets.
You can erase \nScale &view_scale, I always use the Scale in the iso view, 1/1; 2/1 or 1/2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for the reply.
I don't exactly get what this mapkey does step by step. Can you explain a little bit ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
So sorry.
This is the mapkey
mapkey iv @MAPKEY_LABEL ISO View;~ Command `ProCmdNamedViewsGalSelect` `FRONT`;\
mapkey(continued) ~ Command `ProCmdViewOrient` ;~ Open `orient` `SetupOptions`;\
mapkey(continued) ~ Select `orient` `SetupOptions` 1 `dynorient`;\
mapkey(continued) ~ Update `orient` `spinPH.XSpinBox` -30.000000;\
mapkey(continued) ~ Update `orient` `spinPH.YSpinBox` 30.000000;\
mapkey(continued) ~ Update `orient` `spinPH.ZSpinBox` 15.000000;\
mapkey(continued) ~ Activate `orient` `NmViewCheckBtn`1;\
mapkey(continued) ~ Input `orient` `namedviewPH.NameVw_IP` `iso`;\
mapkey(continued) ~ Update `orient` `namedviewPH.NameVw_IP` `iso`;\
mapkey(continued) ~ Activate `orient` `namedviewPH.NameVw_PB_Save`;~ Activate `orient` `OkPB`;;
This Iso View is always related with the Front View.
