Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi..
I want to change scale of my drawing through mapkey but the command is not getting recorded it needs manual selection.
so is there any command instead of highlighted below. OR
is there any other option to change drawing scale automatically through mapkey.?
Regards,
Prashant Pandarkar
Solved! Go to Solution.
Hello prashant pandarkar
some macros in drawing space need "item preselection". See attached picture and config.pro with macros. l use this macros to change font size of X-section labels.
It needs to "preselect item" where will be macro applied.
Haven´t tested your idea with drawing scale. But maybe there is similar "problem".
Just try to "preselect" drawing scale in left bottom corrner inside drawing space and than apply your macro.
Regards
Milan
Prashant,
Config option default_draw_scale may help you.
Hi..
We are using centralise config file drawing dtl file, so we can not change config option.
As i want to change drawing scale for one particular drawing application.
Prashant Pandarkar
Hello prashant pandarkar
some macros in drawing space need "item preselection". See attached picture and config.pro with macros. l use this macros to change font size of X-section labels.
It needs to "preselect item" where will be macro applied.
Haven´t tested your idea with drawing scale. But maybe there is similar "problem".
Just try to "preselect" drawing scale in left bottom corrner inside drawing space and than apply your macro.
Regards
Milan
Hi..
This might possible with preselect scale text, but it will better if there any method without any manual intervention or manual selection.
As we agree to preselect required notes on screen to change its properties this is required because we don't know which text needs to edit.
but in scale case it is same for all types of drawing. so it is better if we can able to change scale value without selection.
If not getting any other method then i have to go with your suggested method.
Thanks.
Regards,
Prashant pandarkar
Hey Prashant,
Try this if that help to set your scale automatically using relations and parameters.
Please find attached image for how you can set your drawing scale.
Add parameter "Drawing_scale_factor" and add rules as shown. The parameter value should be always 1.
Please let me know if this help.
Good Luck
Hi..
I want it to apply for drawing application, so i don't know what is the biggest dimension of model.
I want to change scale without manual intervention.
Regards,
Prashant pandarkar
As Milan says, preselection of the scale note will make this work.
Select the scale note
go to the mapkey dialog box, record your mapkey
right click on the scale note, EDIT VALUE
change the scale and press enter (or don't press enter to be able to enter your own scale number)
save your mapkey
before you run the mapkey, select the scale note at the bottom and run the mapkey.
hi..
default scale is 1:1 and i want to change scale to some value e.g. 1/10 which will apply to all the drawing views available in drawing sheet.
this is the purpose. Manually it is possible and easy but need to apply in macro base application.
Thanks,
Prashant Pandarkar
I'm not sure if this will work for you or not. I created a mapkey that creates a note at coordinate 0,-5 with the text &scale. Once created, the note is selected (this happens as a part of note creation) and the value edited -- my mapkey changes it to 2. Then the note is deleted. It works for me, any way (Creo 2, M200).
Here's the mapkey, for what it's worth:
mapkey xx @MAPKEY_NAMEtest;@MAPKEY_LABELtest;\
mapkey(continued) ~ Activate `main_dlg_cur` `page_Annotate_control_btn` 0;\
mapkey(continued) ~ Command `ProCmdDwgCreateNote` ;#MAKE NOTE;\
mapkey(continued) ~ Select `dwg_selpnt_dlg` `rad_sel_method` 1 `abs_coord`;\
mapkey(continued) ~ FocusOut `dwg_selpnt_dlg` `opt_abs_x`;\
mapkey(continued) ~ Input `dwg_selpnt_dlg` `opt_abs_y` `-`;\
mapkey(continued) ~ Input `dwg_selpnt_dlg` `opt_abs_y` `-5`;\
mapkey(continued) ~ Update `dwg_selpnt_dlg` `opt_abs_y` `-5`;\
mapkey(continued) ~ Activate `dwg_selpnt_dlg` `opt_abs_y`;\
mapkey(continued) ~ FocusOut `dwg_selpnt_dlg` `opt_abs_y`;~ Activate `dwg_selpnt_dlg` `psh_ok`;\
mapkey(continued) &scale;;#DONE/RETURN;~ Timer `UI Desktop` `UI Desktop` `popupMenuRMBTimerCB`;\
mapkey(continued) ~ Close `rmb_popup` `PopupMenu`;~ Command `ProCmdDwgEditValue` ;2;\
mapkey(continued) ~ Command `ProCmdEditDelete`;
Hope this helps.
Hi..
i was not getting exact solution whatever i except to change default dimension without manual intervention, As it is mandatory to select scale tool from graphics.
So whatever solution given by Milan is fine , So i am marking this answer as Correct answer.
Thanks,
Prashant Pandarkar