Skip to main content
1-Visitor
August 23, 2014
Question

Load multiple drawings into session at once

  • August 23, 2014
  • 6 replies
  • 14359 views

Is there a way to load multiple drw files into session at once?

Thank you.

6 replies

17-Peridot
August 23, 2014

Wouldn't that be nice!

I would think a customized trail file would solve this.

James621-VisitorAuthor
1-Visitor
August 24, 2014

Ah yes, and a script that would grab all the filenames for you and customize the trail file automatically.

One day, when I'll be bored too much...

Good point, Tom.

1-Visitor
August 24, 2014

If all you want is to open them, an AutoIt script would handle that nicely. VBA can cover it also, but AutoIt has a smaller footprint.

AutoIt has a function to pull data from the clipboard, which could be a list copied from anywhere you would create a list.

The following takes entries copied from Excel to the clipboard and separates them into single lines. StringSplit automatically resizes the array to match the number of entries. I'm not even sure it needs a 'dim' command, but it is a good practice.

dim $excellines[1]

$excel = ClipGet()

$excellines=StringSplit($excel,chr(13)&chr(10),1)

Once each line is in the array, then use Send to direct commands to the ProE window to do what you want.

If you create mapkeys, that can make the process easier.

In a FOR loop you could SEND("open_file") to run the mapkey "open_file".and then SEND(excellines[$i] &@CRLF) to send the name of each file in turn. Follow with SEND("Process_drawing") and the "Process_drawing" mapkey will run to do whatever you want to do to the drawing.

14-Alexandrite
August 24, 2014

Hi please vote on my idea about "Multiple file open functionality":

http://communities.ptc.com/ideas/4487

Thanks!

James621-VisitorAuthor
1-Visitor
August 25, 2014

That link throws an error.

If you ask me, I have no idea how to point to an idea. These forums are just troublesome.

Well, my guess is there's no real reason to bother with getting votes for ideas anyway.

Dale_Rosema
23-Emerald III
23-Emerald III
August 25, 2014

If you look at the contents of the URL when you click on the link above, it has a portion in there twice. If you click on the URL address box and remove the duplicates, you can get to the link he posted. Here is a idea from Antonius about fixing this:

http://communities.ptc.com/ideas/2622

(After pasting this, and typing this portion of the note, I click on the link I added and then "un-click" or "un-check the "A" with the little piece of chain next to it. When you finalize your reply, it will re-establish the link without replicating a portion of it)

Thanks,

Dale

1-Visitor
August 27, 2014

We did this using JLink. It brings selected files into session (memory).

BringIntoSession.png

James621-VisitorAuthor
1-Visitor
September 1, 2014

Nice GUI. I'd like to be able to bring in a bunch of *.drw files, but the other filetypes might be usefull as well.

Thanks for the idea.

12-Amethyst
August 31, 2014

I´ve been playing with Autoit from times to times.

I made this small script for automation, it´s not very fancy but it´s working for me.

I called it TrailMaker.

Here´s how it works:

1 - Open Creo

2 - Set Working Directory

3 - Call mapkey "trail".

4 - A text file with all files in working directory will popup, erase the ones you don´t want to open and save the file

5 - You´re asked for a trailfile to execute inside of selected files, you may create your owns

6 - Watch Creo working while drinking a cup of tea.

In your case, since you don´t want to execute nothing inside of the files, choose the blank.txt trailfile.

More instructions on Readme.txt.

Have fun.

Jose

https://www.dropbox.com/s/nprv7wx6u2iog2n/TrailMaker.zip?dl=0

James621-VisitorAuthor
1-Visitor
September 1, 2014

That's really good script, Jose.

Nice to see something that works. I'll propably use it until I can drag myself to write my own. Thanks for the upload.

12-Amethyst
September 2, 2014

Hi,

I found a nice way to filter files just adding a pause to the first mapkey. Now it´s more usable, you can select prt, asm, drw, iges, step, etc..

You can even use it to import files in batch mode.

Download the file again, and just replace the mapkeys on config.pro.

Video Link : 5250

Have fun,

Jose

1-Visitor
December 20, 2016

I've done a similar thing using Python script. I'm using python to write a mapkey with variable like the name in the mapkey, location and file extensions. Normally it means creating a CSV file with of list of parts based on certain parameters. The same mapkey then run the python script which will create another mapkey, and once it's done I run the mapkey that was just created. All in one push of a button.

Works like a dream as long as the parameters are correctly set.

12-Amethyst
September 2, 2014

Another possible application is to export all instances of a family table to a neutral format.

God, I´m really happy with my small script now .

James621-VisitorAuthor
1-Visitor
September 3, 2014

Great little tweak to your script, Jose.

I'm glad you've made some progress with your little batch converter.

If I wanted to convert my parts to STEP files all at once I'd also need the script to suppress all hole features for me, cause all my models usually go to a machine shop, but hey that's also possible