We are troubleshooting an issue impacting community login, and it may be intermittently unavailable. Sorry for any inconvenience.
OK fellows, here is a solution I found on www.cad.de: Put this mapkey into your config.pro:
mapkey nd @MAPKEY_LABELnew drw with name from prt/asm
mapkey(continued) ~ Activate `main_dlg_cur` `File.psh_save`;\
mapkey(continued) @SYSTEM\start WScript.exe C:\\ptc_wf3\\nd.vbs
c:\ptcwf3 is my working directory
Then crate a notepad nd.txt file with this tekst:
'script nd.vbs together with pro-e mapkey nd creates new drawing with the same name as active prt/asm
'Sleep times might be adjusted up or down on various PCs
'Option Explizit
WScript.Sleep 300
Dim Fi, Fso
Set Shell = CreateObject("WScript.Shell")
Set WshShell = WScript.CreateObject("WScript.Shell")
Sub sk(Befehl)
'wscript.echo befehl
WshShell.SendKeys(Befehl)
WScript.Sleep 1000 'Time in msec
End Sub
sk "^s"
sk "{TAB 3}"
sk "{BS 4}"
sk "+^{left}"
sk "^c"
'sk "^a"
sk "^n"
sk "^v"
'choose "Drawing":
sk "{TAB 3}"
sk "{DOWN}"
sk "{TAB 3}"
sk "{DOWN}"
sk "{TAB 3}"
sk "{DOWN}"
sk "~"
WScript.Quit()
'After an idea from Marco Taylor: http://ww3.cad.de/foren/ubb/Forum12/HTML/010934-6.shtml
Rename nd.txt to nd.vbs and place the file according to the mapkey you just made. I have it on my working dir. It works with all prts and asms! Enjoy!
PS: You can try to make the Sleep time smaller down to zero.
PPS: If you make it bigger (2000) you can follow the program.
PPPS: It might be needed to adjust the numbers TAB in the nd.vbs file.
See CAD.DE:http://ww3.cad.de/foren/ubb/Forum12/HTML/010934.shtml#000009
Message was edited by: Gunnar Hansen
Hey guys so I have a somewhat work around which allows you to create a new 2D drawing using the same part number.
Because Creo doesn't like pasting what's in your clipboard on the new filename section, the only thing you will have to do is press Ctrl+V and enter. The macro creates a parameter called CAD_NUMBER which is essentially your model_name but allows a place to copy the name, then create new drawing, it then pauses at the filename stage, you press Ctrl+V then enter, and finish your drawing format preferences.
mapkey 2ddwg @MAPKEY_LABELCreate New 2D dwg;~ Command `ProCmdMmRels` ;\
mapkey(continued) ~ Update `relation_dlg` `RelText` 1 27 54 1 `\nCAD_NUMBER=rel_model_name()`;\
mapkey(continued) ~ Activate `relation_dlg` `PB_OK`;~ Command `ProCmdMmParams` ;\
mapkey(continued) ~ Select `relation_dlg` `ParamsPHLay.ParTable` 2 `rowCAD_NUMBER` `value`;\
mapkey(continued) ~ RButtonArm `relation_dlg` `ParamsPHLay.ParTable` 2 `rowCAD_NUMBER` `value`;\
mapkey(continued) ~ PopupOver `relation_dlg` `ParamsPHLay.ParamUtils` 1 `ParamsPHLay.ParTable`;\
mapkey(continued) ~ Open `relation_dlg` `ParamsPHLay.ParamUtils`;\
mapkey(continued) ~ Close `relation_dlg` `ParamsPHLay.ParamUtils`;\
mapkey(continued) ~ Activate `relation_dlg` `ParamsPHLay.PBCopy`;\
mapkey(continued) ~ Activate `relation_dlg` `PB_OK`;~ Command `ProCmdModelNew` ;\
mapkey(continued) ~ Select `new` `Type` 1 `Drawing`;\
mapkey(continued) ~ Activate `new` `chk_use_default_template`0 ;\
mapkey(continued) %partnamenew;\
mapkey(continued) @MANUAL_PAUSEName drawing and Resume.;\
mapkey(continued) ~ Activate `new` `OK`;\
mapkey(continued) ~ Select `dwg_create` `rad_format` 1 `2`;\
mapkey(continued) ~ Activate `dwg_create` `psh_format_browse`;\
mapkey(continued) ~ Trail `UI Desktop` `UI Desktop` `DLG_PREVIEW_POST` `file_open`;\
mapkey(continued) ~ Select `file_open` `Ph_list.Filelist` 1 `shanen_format_a3.frm`;\
mapkey(continued) ~ Trail `UI Desktop` `UI Desktop` `PREVIEW_POPUP_TIMER` \
mapkey(continued) `file_open:Ph_list.Filelist:<NULL>`;\
mapkey(continued) ~ Command `ProFileSelPushOpen_Standard@context_dlg_open_cmd`;
Hope this helps.