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

Is there a button to quickly open the drawing for an on-screen model/assembly ?

BernardWielfaer
6-Contributor

Is there a button to quickly open the drawing for an on-screen model/assembly ?


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.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

2 years ago I created AutoIt script, which can be launched by mapkey dd - see attachments.

Installation:

  • unzip Open_Model_Drawing_AutoIt.zip file to D:\PTC directory
  • copy mapkey saved in my config.pro file to yours
  • launch Creo 2 or Creo 3
  • open model
  • type dd
  • Creo opens model's drawing

The script will work properly, if:

  • drawing name = model name
  • drawing is saved in working directory -or- is accesible via SEARCH_PATH config.pro option
  • is used in English version of Creo

MH


Martin Hanák

View solution in original post

16 REPLIES 16

Hi,

2 years ago I created AutoIt script, which can be launched by mapkey dd - see attachments.

Installation:

  • unzip Open_Model_Drawing_AutoIt.zip file to D:\PTC directory
  • copy mapkey saved in my config.pro file to yours
  • launch Creo 2 or Creo 3
  • open model
  • type dd
  • Creo opens model's drawing

The script will work properly, if:

  • drawing name = model name
  • drawing is saved in working directory -or- is accesible via SEARCH_PATH config.pro option
  • is used in English version of Creo

MH


Martin Hanák

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

MartinHanak
23-Emerald V
(To:gbaxter)

Hi,

I used AutoIt ... https://www.autoitscript.com/

MH


Martin Hanák

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 ?
button.png

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


Martin Hanák

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!

MartinHanak
23-Emerald V
(To:lpitts-2)

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


Martin Hanák

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.

MartinHanak
23-Emerald V
(To:lpitts-2)

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 Hanák
llie
14-Alexandrite
(To:MartinHanak)

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.

AAI2018
4-Participant
(To:llie)

Wonderful MAPKEY Martin!

 

Thanks a lot!!!

barneybence
4-Participant
(To:llie)

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


There is always more to learn in Creo.
Announcements