Technical Brief: FCW-02

Starting another Program (Notepad) from inside FastCAD 32

by John Steen
September 18, 1997


The new RUNAPP command allows you to start another Windows application, such as Notepad, while you are in FastCAD 32. This is very useful for modifying FastCAD 32's Menu file, Icon file, or writing an ASCII text file which may be inserted into any drawing with the Draw > File Text command.

In this exercise, you will:

Using Note Pad to Modify a Menu

  1. Start FastCAD 32.

  2. At the command line type "runapp" an hit the ENTER key.

  3. At the "Application to run[]" prompt type "notepad" with no spaces and press ENTER.

  4. When the Notepad window appears select its File menu and select Open.

  5. In the "Files of type" window scroll down an select "All files (*.*)" to show all files in the folder.

  6. Find and click on the fcw32.mnu file to load it into Notepad.

  7. In Notepad, click on the File menu and select Save As. Make sure that "All files (*.*)" is showing in the "Files of type" window. If not select "All files (*.*)".

  8. In the "File name" window change the file name to mymenu.mnu and choose the Save button.

    You have just made a copy of the FastCAD 32 menu file which you will use to modify and test.

    With the mymenu.mnu menu file loaded in Notepad, we will add a new menu title and two new items to it. Be very careful not to leave any Blank Spaces at the end of a menu line or any Blank Lines in the menu file or FastCAD 32 will crash when the menu is loaded. This is why you made a copy of the original FastCAD 32 menu to work with. Once you are happy with the way your menu works you may load it into Notepad and use Save As to "fcw32.mnu" to make it the startup menu.

    In the steps below do not type the quotation marks - only type what is between them. The menu title is terminated by a colon. Each menu item below a menu title is followed by a colon and the "|" Pipe symbol which is a SHIFT+BACKSLASH (the slash the leans to the upper left). The commands to be executed by a menu option follow the Pipe symbol. Each line is terminated with a semicolon and a carriage return (the ENTER key).

  9. With mymenu.mnu loaded in Notepad, hold the down cursor arrow on your keyboard until the cursor scrolls all the way to the bottom of the file and is at the left edge of the window under the "A" in "About our website...:WEBINFO;".

  10. Add a new menu title by typing "Notes:" and hit the ENTER key to go to a new line.

  11. Type "Notepad:|runapp notepad;" and hit the ENTER key to go to the next line.

  12. Type "Edit My Menu:|runapp notepad mymenu.mnu;" and hit the ENTER key to go to the next line. Your menu including the last original line with "About our website...:WEBINFO;" should look like this;
    About our website...:WEBINFO;
    Notepad:|runapp notepad;
    Edit My Menu:|runapp notepad mymenu.mnu;
    After typing the above lines into the menu file, select File menu and select Save.

  13. Next click File and Exit and to return to the FastCAD 32 screen.

  14. To load your new modified menu into FastCAD 32, select File > Menu and choose mymenu.mnu. Your new Notes menu title should appear as the right-most menu title on the FastCAD 32 screen.

  15. Click on Notes and test each of the menu items to make sure that they work.

Creating a Text File and Inserting it into a FastCAD-32 Drawing

We will now use your new menu to create a Text File that you will insert into a FastCAD-32 drawing.
  1. Start FastCAD 32, select File > Menu and click on mymenu.mnu to load your custom menu file as described in step #14 above.

  2. Select the Notes menu title and then select the Notepad menu item. Notepad starts with a blank text window.

  3. Type in several lines of text like the lines below: This is a test of inserting text from a file.

  4. In Notepad, select the File menu, select Save As, and select "Text Documents" in the "Files of type" window.

  5. In the "File name" window type "texttest" and choose the Save button. The file will be saved with a .txt extension. FastCAD 32 will ONLY insert text files with a .txt extension.

  6. Next, click File and Exit to return to the FastCAD 32 screen.

  7. From the menu, Select Draw > Text > File Text. Click on the texttest.txt file.

  8. You should see the bounding box of the block of text with the cursor arrow at its justification point.

  9. If you do not see the bounding box hold the CTRL key down and push the mouse away from you to dynamically increase its size, or pull it toward you to decrease its size until you can see it. Left-click to place the text block in the drawing
Note: Once you have placed the Text from a Text File into a drawing, you can use Notepad to re-open the source texttest.txt file that you saved, make some changes to it, and select Save. When you exit Notepad the changes are automatically updated in the FastCAD 32 drawing.

If you delete the texttest.txt file or any file that from which the text was inserted, that text in the drawing will be replaced by the drive letter, folder, and filename from which it was inserted (e.g., c:\fcad32\texttest.txt). For this reason you must use the Edit > Explode command on any File Text insertions in a drawing before sending it to another FastCAD 32 user. If you want to keep the File Text insertions as they are, you must send the Text File along with the FastCAD drawing and instructions as to which drive, folder and filename to place it in. Before converting the drawing to .DXF or .DWG files, you must always use the Edit > Explode command on any File Text insertions.

©1997 Evolution Computing, Inc.