SFG Tips

This program can be used in a variety of ways to process many files for common operations.

Some of the main uses involve CAD script files, directory listings and batch file processing. With the options page allowing a first line and last line the user can run and initialization routine before processing all the files and then run a termination routine at the end.

Remember there is a return at the end of each line based on the command line template and a space is often as good as a return in a script file.

Tip 1 - Leave the application running, minimise it to get back to your working screen. If you have selected a list of files and attempted to run the generated file and have a problem you wil not have to re-select the entire group again. Secondly if there is a problem halfway through you can delete the completed files and re-create the file to process the rest.

Tip 2 - Use the program to create file listings, quick and easy! If the command line puts commas between the variables and you give the output file a .csv extension you can double click on it to open the file in a spreadsheet.

Tip 3 - Use the first line and last line to speedup your CAD script run. Turn off text prompts , minimise the screen if you can, etc.if you put this in the firstline, add the reverse instructions on the last line.

Tip 4 - Add to the last line a command to let you know when it is finished. This could be a sound file to play on completion or a quit command to exit the program.

Below is a list of common application examples:

Directory listing
CAD attribute extraction
CAD Plotting
CAD LISP rountines
Batch file processing
Creating Lists for other programs

There are many ways to use this application and you will most likely think of more.

Directory listing

This is reasonably easy routine to create. Firstly select the files and then click on the Command Line Tab. The Command Line Template line should display the type of listing you want. If you have selected the files all from one directory you may want only the filename and extension "%4.%5" for a command line template. For this type of listing you should write a line into the First Line on the Additional Options Page describing the directory being listed and the date of the list.

CAD attribute extraction

This type of script is very popular. Typically every drawing is opened and an attribute extraction is done with a specified template file. Upon completion all the extracted files can be copied into one common file (i.e. copy *.txt listall.txt) for review. Note some CAD extraction output is to a CDF type file (Comma Deliminated File) and this is the same as a CSV file (Comma Separated Variable).

CAD Plotting

This program will keep batch plotting simple and work on a variety of CAD versions. Best way to ensure a smooth run is to re-use a previous command line that you know works. However for the first time around you should write down all the steps as though you were to do it manually. A key step is to close the document when finished and either save or abandon any changes whn plotting.

CAD LISP routines

Often these command lines specify the filename to open, specify the LISP file to run and then save/close. A typical command line would be "OPEN %3\%4 (load "Special-Lisp-File") (Special-Lisp) QSAVE CLOSE" that loads a lisp file then runs a lisp rountine. A good example that I have used is to create a slide library. A lisp program zoom extents, then .9x, placed text at the bottom left to 10% of the screen height (text = filename) and made a slide. By selecting all the symbol drawings and running this program I was able to create all the slide files for compiling into the slide library.

Batch File Processing

The previous help pages show a little of what is possible. Most often you want to run an application with a second argument of a filename. For example encrypting LISP files can be entered into a program with an input and an output parameter (only one file at a time though). So a commandline such as "ENCRYPT /O:%4.%5 /I:C:\PROTECTED\%4.%5" note that with this example the file divider switch shall be left blank or changed to "\".

Creating Lists for other programs

The easiest way is to create a CSV file (Comma Separated Variable) from the command line. Most often it is a file listing such as "%1,%6,%7" that allows you to import into spreadsheets or databases. To help you could set the first line option to "Filename,date,filesize" so the database knows the field headings. Alternatively the command line might seperate out to give an easier means of sorting once in a spreadsheet or database (i.e "%2,%3,%4,%5,%6,%7")