Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.
Only thing I can think of is trial and error test the script:
leave out all but the 1st line of the script part below and then run the script, see what it does.
Then add the second one and so on. I added some descriptions, so you know what to expect
Test this with these lines:
sk "^s"
Opens the SAVE dialog
sk "{TAB 3}"
Presses TAB 3 times to get to where you input the modelname
sk "{BS 3}"
Deletes the last 3 charactes (PRT)
sk "drw"
Writes DRW at the end of the modelname
sk "+^{left}"
Sends CTRL + SHIFT + LEFT to select the entire name, By now I think qou'll most likely have already stumbled upon the problem...
sk "^c"
Opens CTRL + C to copy the name
sk "^a"
Aborts saving a file
sk "^o"
Opens the OPEN dialog
sk "^v"
Pastes the copied modelname
sk "~"
Confirms opening the model
Let me know where the error occurs ....
Good luck!
Thanks for the description, it seems so logical now that I see it.
Anyway, at first it stopped working at TAB 5 (I noticed I needed 5 tabs). The marker wouldn't jump to the input box. All I got was "rererere" in the status bar.
I have a hotkey script which makes NumLock type "re" (for my regenerate mapkey). Well, I tested deacticating that hotkey (don't ask me how numlock is mistaken for the tab-key
) and now the script works all the way down to ctrl + o. Ctrl + v does not work for some reason. The drawing name is copied, but for some reason it won't paste.
Has anyone tried to updatethe ed.vbsfor the Creo interface. The file save shortcut does not have the model name field active, so it does not get saved the buffer. The Rename command brings up the current file name but I have been unable to save this text to the Windows cut and paste buffer,
'Option Explizit
WScript.Sleep 100
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 100 'Zeitangabe in Millisekunden
End Sub
sk "^s"
sk "{TAB 5}"
sk "{BS 3}"
sk "drw"
sk "+^{left}"
sk "^c"
sk "^a"
sk "^o"
sk "^v"
sk "~"
Set Shell = CreateObject("WScript.Shell")
Set WshShell = WScript.CreateObject("WScript.Shell")
Sub sk(Befehl)
'wscript.echo befehl
WshShell.SendKeys(Befehl)
WScript.Sleep 200 'Zeitangabe in Millisekunden
End Sub
sk "^s"
sk "{TAB 5}"
sk "+^{left}"
sk "^c"
sk "^a"
sk "^n"
sk "{TAB 3}"
sk "{DOWN}"
sk "{TAB 3}"
sk "{DOWN}"
sk "{TAB 3}"
sk "{DOWN}"
sk "^v"
sk "{BS 4}"
sk "~"
sk "{TAB 2}"
sk "{BS 10}"
sk "a3_komatsu"
sk "{TAB}"
sk "~"
WScript.Quit()
Creates a new drawing with the same name as the active
prt/asm and locates a list of template drawings to pick from.
Most used template.drw
I created mapkeys in Creo 2 for opening drawing (with same name as part) of active part / assembly and one for creating new drawing with same name as active part/asm.
It is simple code in creo config.pro file and some in DOS file.
If somebody needs them, I can send this (I don't want to share it on internet yet; it is not tested enough and via e-mail I hope that I will get fedback about bugs - now after some tests works perfect ), my e-mail address:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.