Author Topic: Auto-run routine on any file that hits a specific directory  (Read 1541 times)

0 Members and 1 Guest are viewing this topic.

CADaver

  • Guest
Auto-run routine on any file that hits a specific directory
« on: April 02, 2007, 07:28:40 PM »
Not sure where to put this, but VBA seemed promising... maybe?

We're using a steel program called TEKLA, but for the rest of our office we need to export the file to an AutoCAD DWG.  The elements have an assigned color and linetype and the layers are 1 2 3 4 5... etc.  I've written a lispy function to "fix" all the files in a specific directory as a scheduled task, but what I'd really like is something that "knows" a DWG has been placed in a certain directory, then executes the "fix" and saves the file to a different specific directory.  That way our structural guys could just export the file to the first directory and have the "fixed" file show up in the final directory in a few seconds. 

Any ideas where to start??

Glenn R

  • Water Moccasin
  • Posts: 1932
  • What idiot child of married cousins wrote this?!
Re: Auto-run routine on any file that hits a specific directory
« Reply #1 on: April 02, 2007, 07:37:28 PM »
The FileSystemWatcher in .NET sounds the goods for this - more info please.
Me


Bryco

  • Water Moccasin
  • Posts: 1864
Re: Auto-run routine on any file that hits a specific directory
« Reply #3 on: April 02, 2007, 11:46:12 PM »
It looks a bit like tekla uses vba , if thats the case a sub in vba would be a good way.

CADaver

  • Guest
Re: Auto-run routine on any file that hits a specific directory
« Reply #4 on: April 03, 2007, 08:07:57 AM »
FileSysytemWatcher sounds like the ticket using fwatcher.Created += new FileSystemEventHandler(FileCreated);


Oh cr4p, something else to learn...


Thanks guys, I have a mission.