Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 11712

Re: Load multiple drawings into session at once

$
0
0

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.


Viewing all articles
Browse latest Browse all 11712

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>