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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Mapkey question. Calling parameters.

BrentDrysdale
7-Bedrock

Mapkey question. Calling parameters.

Hi Folks,
Questions at the bottom.

SITUATION;
I have been working on our formats and template parts and have things pretty much as I want. This works nicely for auto-populating the drawing title block but this really works well for new parts (using the new template) and the new drawing formats. I have a robust method for reworking existing parts to use the same functionality in the new drawing template.

(Acknowledgement: Please note that in setting all this up thus far I had plenty of help from earlier posts saved from this exploder and from our local VAR.)

MORE DETAIL;
We use the ISO tolerance class for our models and drawings. There is a system parameter (tolerance_class according to the Help) that you set in the model (via Edit; Setup; Tol Setup; Standard; ISO/DIN; Model Class) to the class you want (FINE, MEDIUM COARSE or VERY COARSE). Unfortunately I have not been able to access this system parameter and I can even make my own parameter of exactly this same name.
To ensure I keep the 3D model and the auto population of my drawing, from the parameters and notes from the 3D model, in step I have a set of relations that run from mapkeys. These mapkeys first set my parameter then it sets the system parameter, which forces a regen, and this makes the drawing accurate every time. The drawback I have not been able to overcome is that the mapkey calls up my own parameter by looking in the parameter list in the model and using it BUT this is dependent on the position in the list (so many lines down the list). I have developed a work around that ensures any older part can be updated to have the new parameters in the correct order but you can still sort the parameters and upset the running of the mapkey.

QUESTION;
So after all this I want to know if anybody out there:
Has found a way of referencing a personal parameter in mapkeys rather than the line pick I am using now. This would make the mapkey more robust.Knows how to reference the tolerance_class system parameter? (Yes I have tried using ordinary syntax in Relations but it just gives an error) This would be the best solution.
--
Regards, Brent Drysdale
Regards, Brent Drysdale
Mechanical Designer
Tait Electronics Ltd (www.taitworld.com)
New Zealand
Ph. +64 3 358 1093
This email, including any attachments, is only for the intended addressee. It is subject to copyright, confidential and may be the subject of legal or other privilege, none of which is waived or lost by reason of this transmission. If the receiver is not the intended addressee, please accept our apologies, notify us by return, delete all copies and perform no other act on the email. Unfortunately, we cannot warrant that the email has not been altered or corrupted during transmission.

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.
2 REPLIES 2
GavinBRumble
5-Regular Member
(To:BrentDrysdale)

Brent,



This "position in the list" issue is a function of the new UI for
parameters. You know I'm a geezer when I call the parameter UI "new".the
old UI was part of the cascading menus that were replaced over 10 years ago.
That said, we overcome this issue by having our mapkey reset the parameter
UI to "old", then change the parameter, then reset the UI to "new". Is this
a bit kludgy or in-elegant? Yes, but it works.



!mapkey for turning OFF the new parameter UI (called in other mapkeys)

mapkey puioff @MAPKEY_NAMETurn off the new Parameter UI;\

mapkey(continued) @MAPKEY_LABELPARAMUI_OFF;~ Select `main_dlg_cur`
`MenuBar1`1 `Utilities`;\

mapkey(continued) ~ Close `main_dlg_cur` `MenuBar1`;\

mapkey(continued) ~ Activate `main_dlg_cur` `Utilities.psh_util_pref`;\

mapkey(continued) ~ FocusOut `preferences` `InputOpt`;~ Open `preferences`
`DisplayOpt`;\

mapkey(continued) ~ Close `preferences` `DisplayOpt`;~ Select `preferences`
`DisplayOpt`1 `5`;\

mapkey(continued) ~ Input `preferences` `InputOpt` `new_parameter_ui`;\

mapkey(continued) ~ Update `preferences` `InputOpt` `new_parameter_ui`;\

mapkey(continued) ~ FocusOut `preferences` `InputOpt`;~ Open `preferences`
`EditPanel`;\

mapkey(continued) ~ Close `preferences` `EditPanel`;~ Select `preferences`
`EditPanel`1 `no`;\

mapkey(continued) ~ Activate `preferences` `AddOpt`;~ FocusOut `preferences`
`InputOpt`;\

mapkey(continued) ~ Activate `preferences` `ok`;



!mapkey for turning ON the new parameter UI (called in other mapkeys)

mapkey puion @MAPKEY_NAMETurn on the new parameter UI;\

mapkey(continued) @MAPKEY_LABELPARAMUI_ON;~ Select `main_dlg_cur`
`MenuBar1`1 `Utilities`;\

mapkey(continued) ~ Close `main_dlg_cur` `MenuBar1`;\

mapkey(continued) ~ Activate `main_dlg_cur` `Utilities.psh_util_pref`;\

mapkey(continued) ~ FocusOut `preferences` `InputOpt`;~ Open `preferences`
`DisplayOpt`;\

mapkey(continued) ~ Close `preferences` `DisplayOpt`;~ Select `preferences`
`DisplayOpt`1 `5`;\

mapkey(continued) ~ Input `preferences` `InputOpt` `new_parameter_ui`;\

mapkey(continued) ~ Update `preferences` `InputOpt` `new_parameter_ui`;\

mapkey(continued) ~ FocusOut `preferences` `InputOpt`;~ Open `preferences`
`EditPanel`;\

mapkey(continued) ~ Close `preferences` `EditPanel`;\

mapkey(continued) ~ Select `preferences` `EditPanel`1 `yes *`;\

mapkey(continued) ~ Activate `preferences` `AddOpt`;~ FocusOut `preferences`
`InputOpt`;\

mapkey(continued) ~ Activate `preferences` `ok`;





Hope this helps,



Gavin B. Rumble, PE

Solid Engineering

336-224-2312


GavinBRumble
5-Regular Member
(To:BrentDrysdale)

Hi Brent.working on Sunday too?



If you see a "white" dialog box popup while puioff (for example) is running
then it probably is working fine.but the mapkeys I sent don't do anything by
themselves other than turn on/off "new" parameter UI (you must call puioff
and puion from your parameter modification mapkey).



When it (the new UI) is off, if you select from the menu, Tools > Parameters
> Modify, you will not see the std WF2 parameter dialog box.you will see
this:





If you now create your mapkey to modify a certain parameter (DRAWING_BY for
example), the parameter name will show up in your new mapkey instead of a
line number (location). [1]



Here is one line from one of our mapkeys.it actually pauses for the user to
type in new data into MFG and MFGPN

mapkey(continued) #MODIFY;#CONFIRM;#MFG;#MODIFY;#CONFIRM;#MFGPN;\

If we were adding the new value with the mapkey it would look something like
this:

mapkey(continued) #MODIFY;#CONFIRM;#MFG;new value;#MODIFY;#CONFIRM;#MFGPN;
new value;\

Don't forget to add the #CONFIRM even if Pro/E didn't prompt for it because
in certain cases the mapkey will just stop if Pro/E does need a confirm.



[1] This is because the parameters are actually menu items when displayed in
this "old" UI.not just a list item in a text box. It is a API programming
thing that PTC just doesn't seem to have any stomach for correcting (ie,
they are taking the easy way out). It shows up in a bunch of places in
Wildfire. "Nuff of the soapbox stuff.you should be able to finish your task
now.



Thanks in advance,



Gavin B. Rumble, PE

Solid Engineering

336-224-2312


Top Tags