Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
I wonder were there is a button or a way to open the corresponding drawing for a model or assembly ? The other way around is easy as in the drawing you have on the left bottom a component tree to open the component but not reversed. This operation, retype the number of the drawing, is done several times a day by many designers and would be a real time saver.
Solved! Go to Solution.
Hi,
2 years ago I created AutoIt script, which can be launched by mapkey dd - see attachments.
Installation:
The script will work properly, if:
MH
Hi,
2 years ago I created AutoIt script, which can be launched by mapkey dd - see attachments.
Installation:
The script will work properly, if:
MH
Hi Martin,
I tested this and this works well also on Pro/E 5. Thank you very much, this saved me a day or 2 work. This should be an ou-of-the-box functionality in Creo.
Regards, Bernard
Martin, if you don't mind me asking, what API did you use to make this?
Thanks,
Geoff Baxter
www.baxsaa.com
Hello Martin,
We do see some unintended behaviour; an extra zero or a double character or a very weird case here below. I guess due to the fact it is Pro/E ?
Hi Bernard,
I tested the script with Creo Elements/Pro 5.0 M280 64-bit in local disk directory successfully.
I don't have access to Windchill, therefore I cannot simulate your situation - i.e. working in workspace (MITAS on WT).
In attached file you can find script modified for testing purposes. When you run it, it will show you what it finds in window title block. Replace original exe file with new one and give it a try ...
MH
Very Cool! The only issue I am stuck on is when path has a space (i.e C:\\Program Files\\PTC\\Open_Model_Drawing_AutoIt\\open_drawing_cr2.exe;
I have tried single quotes, double quotes, an underscore and even %20. None worked.
Thanks!
Hi,
in Windows directories have long names and short names. You can enter dir /x command to see short names (max. 8 characters) which does not contain spaces.
Then you can use short name in mapkey definition. See example below:
mapkey dd @SYSTEMstart D:\\PROGRA~1\\Open_Model_Drawing_AutoIt\\open_drawing_cr2.exe;
MH
Thanks. That's a great tip!
OK since you are on a roll, on my laptop it doesn't matter if drawing is open or not, the script always works. On another persons laptop he gets prompt to rename file due to file already in session. I looked through config options and don't see anything to turn this off. Not sure why two laptops would work differently.
Hi,
I am sorry I do not know, what is going on another laptop. Maybe you can compare config.pro files on laptops. Maybe you can create testing data - abc.prt + abc.drw and test these data.
MH
Martin,
I love it and would like to roll it out to our Creo users. I have tested it and it works on Creo 3 M120. Do we need some type of agreement with you in order to use this in our Production environment.
Wonderful MAPKEY Martin!
Thanks a lot!!!
Martin,
I would like to ask. Is your program free? so I can use it in my department.
This is a little bit late but I wonder if anyone still wants the following features:
- Opening the corresponding drawing of a part directly from its assembly
- Opening the corresponding drawing of a part/assembly if it is saved in the same folder as the part/assembly.
That folder is not necessarily defined as a search path.
I have wrote an ahk script to do the above. It is not the most elegant way to do the tasks, but it works.
If someone needs the script (or its executable file), I can share it here.
Note: the script has only been tested on Creo 7.0
Hello Hidetaka,
I'm really interested. Could you send me this script ?
Thanks,
Look at this thread. I have not tried it.
Solved: Creo 2.0 - Open a drawing from active part? - PTC Community
This is the ahk script to open the corresponding drawing of a component in an assembly.
If WinActive("asm")
{
Click ; select part
SendInput _op ; Open selected part in assembly with mapkey op
WinWaitActive, prt,, 7
if ErrorLevel
{
MsgBox,
(
It takes too long to open part.
Please check whether you have too many windows open
and try again after closing some windows.
)
return
}
else
{
openDrawingCloseModel()
return
}
}
/*
The first part is to open the selected components. The _op mapkey is very easy to create.
The second part is to open the corresponding drawing of the component (same name, saved in working directory) and then close the component model, so that it look like you choose a component and directly open that component's drawing.
openDrawingCloseModel()
is a function
openDrawingCloseModel() ;open drawing of active model and close the model
{
DrwName := getBareActiveName() ;get model name
WinClose, A
SendInput ^o%DrwName%.drw{Enter} ;Send inputs: Ctr o, enter PartName.drw Enter
return
}
Hope this helps 🙂
*/