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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Copying Parameter Values from Part to Drawing (Creo 3.0)

gquiroga
12-Amethyst

Copying Parameter Values from Part to Drawing (Creo 3.0)

How can I automatically copy parameter values from a part to a drawing on Creo 3.0?

12 REPLIES 12
psobejko
13-Aquamarine
(To:gquiroga)

Edit the drawing program and add lines such as:

MY_PARAMETER:D = MY_PARAMETER

or

MY_PARAMETER:D = MY_PARAMETER:MDL

(in the case of the template)

Hi,

please specify, what do you mean with copy parameter values from a part to a drawing ...

For example: You can put model parameter in drawing table using notation ... &model_param

MH


Martin Hanák

Both the part and the drawing have the same parameters, and I want to inherit the parameter selected values from the part to the drawing.

Hi,

unfortunately I still do not understand why you want to have drawing parameters. How do you use drawing parameters ?

MH


Martin Hanák

We use mapkeys to do this.  this =up is the main one it goes and calls individual mapkeys =dpar =dprd ect.  I did not write them so I do not know fully what they do but you can maybe use this as a concept to get you on the right track.

=up @MAPKEY_NAMEMdl Params to Drw;@MAPKEY_LABELMdl Params to Drw;%=dpar;%=dprd;%=dprc;%=dpad;%=dpac

These are what the individual mapkeys look like.

=dpar @MAPKEY_NAMERemove Drawing Parameters;@MAPKEY_LABELRem Drw Params;~ Activate `main_dlg_cur` `page_Tools_control_btn` 1;~ Command `ProCmdDwgParameters` ;~ Arm `relation_dlg` `ParamsPHLay.ParTable` 2 `rowCOMMENTS` `name`;~ Disarm `relation_dlg` `ParamsPH

=dprd @MAPKEY_NAMEDelete Drawing Program;@MAPKEY_LABELDel Drw Prog;~ Activate `main_dlg_cur` `page_Tools_control_btn` 1;~ Command `ProCmdDwgProgram` ;#EDIT PROGRAM;#SCREEN EDIT;~ FocusIn `texttool` `textPH.TextArea`;~ Select `texttool` `MenuBar` 1 `EditMenu`

=dprc @MAPKEY_NAMECreate Drawing Program;@MAPKEY_LABELCreate Drw Prog;~ Activate `main_dlg_cur` `page_Tools_control_btn` 1;~ Command `ProCmdDwgProgram` ;#EDIT PROGRAM;#SCREEN EDIT;~ FocusIn `texttool` `textPH.TextArea`;~ LButtonArm `texttool` `textPH.TextAre

=dpad @MAPKEY_NAMEDesignate Drawing Parameters;@MAPKEY_LABELDesig Drw Params;~ Activate `main_dlg_cur` `page_Tools_control_btn` 1;~ Command `ProCmdDwgParameters` ;~ Arm `relation_dlg` `ParamsPHLay.ParTable` 2 `rowCOMMENTS` `attribute`;~ Disarm `relation_dlg`

=dpac @MAPKEY_NAMECreate Drawing ONLY Parameters;@MAPKEY_LABELCreate Drw Params;~ Activate `main_dlg_cur` `page_Tools_control_btn` 1;~ Command `ProCmdDwgParameters` ;~ Move `relation_dlg` `relation_dlg` 2 20.013344 6.211843;~ Activate `relation_dlg` `ParamsP

I agree 100% Martin Hanak‌.

The only drawing parameters we use are:

  • Drawing Format (format)
  • Overall Scale (scale)
  • Sheet Number (current_sheet)

All the drawing does is simply displaying the parameters from the model (part or assembly). No need to copy them from the part/assembly to the drawing.

TomU
23-Emerald IV
(To:HamsterNL)

The problem is Windchill.  If you don't copy the parameters to the drawing, then when you search for drawings in Windchill none of this information is visible.  We prefer to keep it synchronized between the drawings and the models for this reason.

Ok, that's good to know. We are still on PRO/Intralink (with PRO/Engineer Wildfire4), but we are testing Windchill.

For us, we are moving away from drawings, putting everything into the 3D model, so for us it won't be that much of a problem. We will search for the parts, then find the drawing (if there's one).

TomU
23-Emerald IV
(To:gquiroga)

This is done with a drawing program.  Add one line to the drawing program for each parameter value you want to synchronize.  I would suggest using the :MDL syntax on the model side as this will automatically resolve to the active model's session ID.  For example:

DESIGNER:D = DESIGNER:MDL

MFG_NO:D = MFG:MDL

Like Ron, I too have a mapkey that automatically deletes the existing drawing program, creates any parameters that may be missing (in both the model and the drawing), and then automatically recreates the drawing program.  The mapkey uses the trick of switching back to the old parameter interface which works better when trying to create parameters from a mapkey.

mapkey cdp @MAPKEY_NAMECreate Drawing Program;@MAPKEY_LABELCreate Drawing Program;\

mapkey(continued) ~ Command `ProCmdRibbonOptionsDlg` ;\

mapkey(continued) ~ Select `ribbon_options_dialog` `PageSwitcherPageList` 1 `ConfigLayout`;\

mapkey(continued) ~ Activate `ribbon_options_dialog` `ConfigLayout.AddOpt`;\

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

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

mapkey(continued) ~ Select `add_opt` `EditPanel` 1 `no`;~ Activate `add_opt` `AddOpt`;\

mapkey(continued) ~ Activate `ribbon_options_dialog` `OkPshBtn`;\

mapkey(continued) ~ Activate `UITools Msg Dialog Future` `no`;\

mapkey(continued) ~ Command `ProCmdMmParams`;~ Command `ProCmdDwgParameters` ;#PART;\

mapkey(continued) #CREATE;#STRING;CATEGORY;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;COATING;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;CUSTOMER_NAME;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;CUSTOMER_NUMBER;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;CUSTOMER_REVISION;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;DATE_CREATED;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;DESCRIPTION;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;DESIGNER_NAME;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;MACHINE_LETTER;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;MATERIAL_NAME;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;MATERIAL_SIZE;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;MFG_NAME;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;MFG_NUMBER;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;SUB_CATEGORY;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;TOOL_NAME;<EMPTY_STR>;\

mapkey(continued) #DESIGNATE;#PARAMETERS;#CATEGORY;#COATING;#CUSTOMER_NAME;#CUSTOMER_NUMBER;\

mapkey(continued) #CUSTOMER_REVISION;#DATE_CREATED;#DESCRIPTION;#DESIGNER_NAME;\

mapkey(continued) #DOC_CNTL_STATUS;#EXPORT_DATA;#MACHINE_LETTER;#MATERIAL_NAME;\

mapkey(continued) #MATERIAL_SIZE;#MFG_NAME;#MFG_NUMBER;#SUB_CATEGORY;#TOOL_NAME;#DONE SEL;\

mapkey(continued) ~ Command `ProCmdMmParams`;~ Command `ProCmdDwgParameters` ;#ASSEMBLY;\

mapkey(continued) #CREATE;#STRING;CATEGORY;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;COATING;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;CUSTOMER_NAME;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;CUSTOMER_NUMBER;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;CUSTOMER_REVISION;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;DATE_CREATED;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;DESCRIPTION;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;DESIGNER_NAME;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;MACHINE_LETTER;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;MATERIAL_NAME;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;MATERIAL_SIZE;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;MFG_NAME;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;MFG_NUMBER;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;SUB_CATEGORY;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;TOOL_NAME;<EMPTY_STR>;\

mapkey(continued) #DESIGNATE;#PARAMETERS;#CATEGORY;#COATING;#CUSTOMER_NAME;#CUSTOMER_NUMBER;\

mapkey(continued) #CUSTOMER_REVISION;#DATE_CREATED;#DESCRIPTION;#DESIGNER_NAME;\

mapkey(continued) #DOC_CNTL_STATUS;#EXPORT_DATA;#MACHINE_LETTER;#MATERIAL_NAME;\

mapkey(continued) #MATERIAL_SIZE;#MFG_NAME;#MFG_NUMBER;#SUB_CATEGORY;#TOOL_NAME;#DONE SEL;\

mapkey(continued) ~ Command `ProCmdMmParams`;~ Command `ProCmdDwgParameters` ;#DRAWING;\

mapkey(continued) #CREATE;#STRING;CATEGORY;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;COATING;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;CUSTOMER_NAME;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;CUSTOMER_NUMBER;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;CUSTOMER_REVISION;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;DATE_CREATED;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;DESCRIPTION;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;DESIGNER_NAME;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;MACHINE_LETTER;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;MATERIAL_NAME;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;MATERIAL_SIZE;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;MFG_NAME;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;MFG_NUMBER;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;SUB_CATEGORY;<EMPTY_STR>;\

mapkey(continued) #CREATE;#STRING;TOOL_NAME;<EMPTY_STR>;\

mapkey(continued) #DESIGNATE;#PARAMETERS;#CATEGORY;#COATING;#CUSTOMER_NAME;#CUSTOMER_NUMBER;\

mapkey(continued) #CUSTOMER_REVISION;#DATE_CREATED;#DESCRIPTION;#DESIGNER_NAME;\

mapkey(continued) #DOC_CNTL_STATUS;#EXPORT_DATA;#MACHINE_LETTER;#MATERIAL_NAME;\

mapkey(continued) #MATERIAL_SIZE;#MFG_NAME;#MFG_NUMBER;#SUB_CATEGORY;#TOOL_NAME;#DONE SEL;\

mapkey(continued) #DONE/RETURN;#DONE/RETURN; ~ Command `ProCmdRibbonOptionsDlg` ;\

mapkey(continued) ~ Select `ribbon_options_dialog` `PageSwitcherPageList` 1 `ConfigLayout`;\

mapkey(continued) ~ Activate `ribbon_options_dialog` `ConfigLayout.AddOpt`;\

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

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

mapkey(continued) ~ Select `add_opt` `EditPanel` 1 `yes`;~ Activate `add_opt` `AddOpt`;\

mapkey(continued) ~ Activate `ribbon_options_dialog` `OkPshBtn`;\

mapkey(continued) ~ Activate `UITools Msg Dialog Future` `no`;\

mapkey(continued) ~ Select `main_dlg_cur` `adbUtilities_cb`;\

mapkey(continued) ~ Command `ProCmdDwgProgram` ;#EDIT PROGRAM;#JUMP;1;;#DELETE LINE;1;\

mapkey(continued) #DELETE LINE;1;#DELETE LINE;1;#DELETE LINE;1;#DELETE LINE;1;#DELETE LINE;1;\

mapkey(continued) #DELETE LINE;1;#DELETE LINE;1;#DELETE LINE;1;#DELETE LINE;1;#DELETE LINE;1;\

mapkey(continued) #DELETE LINE;1;#DELETE LINE;1;#DELETE LINE;1;#DELETE LINE;1;#DELETE LINE;1;\

mapkey(continued) #DELETE LINE;1;#DELETE LINE;1;#DELETE LINE;1;#DELETE LINE;1;#DELETE LINE;1;\

mapkey(continued) #DELETE LINE;1;#DELETE LINE;1;#DELETE LINE;1;#DELETE LINE;1;#DELETE LINE;1;\

mapkey(continued) #EDIT LINE;CATEGORY:D = CATEGORY:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;COATING:D = COATING:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;CUSTOMER_NAME:D = CUSTOMER_NAME:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;CUSTOMER_NUMBER:D = CUSTOMER_NUMBER:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;CUSTOMER_REVISION:D = CUSTOMER_REVISION:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;DATE_CREATED:D = DATE_CREATED:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;DESCRIPTION:D = DESCRIPTION:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;DESIGNER_NAME:D = DESIGNER_NAME:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;MACHINE_LETTER:D = MACHINE_LETTER:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;MATERIAL_NAME:D = MATERIAL_NAME:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;MATERIAL_SIZE:D = MATERIAL_SIZE:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;MFG_NAME:D = MFG_NAME:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;MFG_NUMBER:D = MFG_NUMBER:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;SUB_CATEGORY:D = SUB_CATEGORY:MDL;\

mapkey(continued) #EDIT LINE;TOOL_NAME:D = TOOL_NAME:MDL;#DONE;#DONE/RETURN;

psobejko
13-Aquamarine
(To:TomU)

Thanks Tom for sharing this mapkey.  Definitely will be adapting it for our needs.

But what is going on in lines 85-99? - for those will not produce the correct drawing program shown in the screenshot.

(Line 1 will end up as: CATEGORYCATEGORY:D = CATEGORY:0)

TomU
23-Emerald IV
(To:psobejko)

Looks like Jive messed up something during the copy/paste.  It should look like this:

mapkey(continued) #EDIT LINE;CATEGORY:D = CATEGORY:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;COATING:D = COATING:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;CUSTOMER_NAME:D = CUSTOMER_NAME:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;CUSTOMER_NUMBER:D = CUSTOMER_NUMBER:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;CUSTOMER_REVISION:D = CUSTOMER_REVISION:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;DATE_CREATED:D = DATE_CREATED:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;DESCRIPTION:D = DESCRIPTION:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;DESIGNER_NAME:D = DESIGNER_NAME:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;MACHINE_LETTER:D = MACHINE_LETTER:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;MATERIAL_NAME:D = MATERIAL_NAME:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;MATERIAL_SIZE:D = MATERIAL_SIZE:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;MFG_NAME:D = MFG_NAME:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;MFG_NUMBER:D = MFG_NUMBER:MDL;#NEXT;\

mapkey(continued) #EDIT LINE;SUB_CATEGORY:D = SUB_CATEGORY:MDL;\

mapkey(continued) #EDIT LINE;TOOL_NAME:D = TOOL_NAME:MDL;#DONE;#DONE/RETURN;

I've also attached the mapkey as a zip file in case Jive messes it up again.

rrich-2
12-Amethyst
(To:gquiroga)

Here is another example this mapkey =asmnum takes one single part parameter and transfers it to the drawing.   The parameter name that it copy's is PCB_ASM_NUM

=asmnum @MAPKEY_NAMECopy PCB Assembly parameter to drawing;@MAPKEY_LABELPCB ASM NUM to Drw;%=asmnum_del;%=up;%=asmnum_drw;

Again this mapkey calls upon two other mapkeys shown below.

=asmnum_del @MAPKEY_NAMEDelete PCB_ASM_NUM;@MAPKEY_LABELDelete PCB_ASM_NUM;~ Activate `main_dlg_cur` `page_Tools_control_btn` 1;~ Command `ProCmdDwgParameters` ;~ Arm `relation_dlg` `ParamsPHLay.ParTable` 2 `rowPCB_ASM_NUM` `name`;~ Disarm `relation_dlg` `Pa

=asmnum_drw @MAPKEY_NAMEInsert PCB_ASM_NUM;@MAPKEY_LABELInsert PCB_ASM_NUM;~ Activate `main_dlg_cur` `page_Tools_control_btn` 1;~ Command `ProCmdDwgProgram` ;#EDIT PROGRAM;#INSERT LINE;PCB_ASM_NUM:D=PCB_ASM_NUM;;#DONE/RETURN;

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags