DMM Varkon® Tutorial
A Beginner's Guide to the Varkon Parametric Modeling and CAD Application Development System
By David M. MacMillan

4.4. Making a New Project

4.4.1. Specifying the New Job

Note that if you start Varkon from scratch on my system and just type in, say, "test1" as a project name, an unfortunate screen conflict happens.

If I type in "test1 as above and press ENTER (there is no "Accept" button), then what I see is:

This seems ok, so I click on "y" to create the new project. An warning message is displayed back at the window from which I started Varkon, but that's ok as all it is saying is that there is no compiled MBS code (MBO) to load for this project. Since this is a new project, this is true enough.

Then I'm prompted for a job name:

I enter "t1" and press "Ok". Everything seems to be ok, and a new drawing window is displayed:

However, I can't so much as click in this drawing window and Varkon crashes (and all Varkon windows disappear).

The problem is that Varkon isn't ready to do anything with this project yet because I haven't finished specifying it. However, the next window of the project setup was obscured by my fvwm screen map. It's actually just barely visible (but hardly noticable) under the screen map:

If I lower the screen map, it becomes fully visible:

For this project, we'll keep things simple and 2-D, so click on the "drawing 2D" button of the "MODULE TYPE" window. (In Varkon the term "drawing" is associated with 2D, and the term "geometry" with 3D.)

Then another window pops up, the "ATTRIBUTE" window, asking for the type of drawing coordinate system desired:

Click on a coordinate system ("local" for this example) and then the actual job appears, with both a drawing window and a "MAIN MENU 2D" window.

4.4.2. The New Job in Detail

This newly created job is about as minimal as it's possible to get. It has a PID file in the pid directory which has the following contents:


The contents of this PID file have been created automatically by Varkon. Note that it contains an mbs directory for MBS source code.

In the app directory, a new subdirectory, "test1" now exists (full path: /home/you/varkon/app/test1/"). This test1 project directory containst six subdirectories: doc, job, lib, mbs, mdf, and sym

So far, only two of these project subdirectories have files in them: mdf and job. The mdf directory contains a single file, test1.MDF. As with the projekt_1 project, this MDF file contains only one line, which includes the standard Varkon MDF file:

#include "$VARKON_MDF/v318.MDF"

The other subdirectory with a file in it is the job subdirectory. It contains a single file, t1.RES, which is empty.

Now, let's draw something in our job and see what happens.

Click on "create" in the "MAIN MENU 2D" and the "CREATE" menu appears:

Click on "line" and the "LINE" menu appears.

Let's draw a simple line with two specified endpoints (vs. a line drawn in some complex way relative to other objects). Click on "2 two pos" and the "2D-POSITION" menu appears, prompting us for the type of the first endpoint of the line.

We're drawing a simple line with absolute coordinates, so click on "absolute." We are then prompted to enter (X,Y) absolute coordinates:

Let's leave the coordinates of this point at (0,0); click "Ok."

The "2D-POSITION" menu reappears, asking us about the end position.

Again, click on "absolute." When prompted to enter absolute (X,Y) coordinates for the end position, enter (100,100) and click on "Ok." A diagonal line from (0,0) to (100,100) is drawn in the drawing area. Note that the "2d-POSITION" menu reappears and we are again prompted for the start position of a line. To get back, simply click in the drawing area. A single click of the left mouse button returns us to the "LINE" menu and removes the "start position" message from the drawing screen. A second click returns us to the "CREATE" menu. A third click returns us to the top-level "MAIN MENU 2D."

At this point, if we take a look at the MBS source code for what we've drawn (by pressing the MBS button in the left column of buttons on the drawing screen, bringing up another window with vi), we see the following:



lin_free(#1,vec(0, 0), vec(100, 100));

"~/varkon/tmp/t1.MBS" 8 lines, 94 characters

As yet, nothing has been written to any file. The MBS source code is stored in the Varkon tmp directory (it is only visible there while the MBS edit session is invoked). After we close this MBS edit session, the MBS source code is compiled, but this compiled code is still stored in memory, not in the filesystem.

Now, exit Varkon by pressing "file" on the "MAIN MENU 2D" menu, an then "exit" on the "FILE" menu, and then "save first" on the EXIT menu. (Note - Varkon 1.15C may deposit you on a random screen of an XFree86 fvwm multiscreen setup when you exit.)

If we look at the project's job subdirectory, we see that three new files have been created on saving/exit: t1.JOB t1.MBO t1.RES All three are binary files. t1.JOB contains [I'm not sure what it contains] t1.MBO contains the compiled MBS object code. t1.RES contains [I'm not sure what it contains]

There is no MBS source code saved; Varkon reconstitutes the MBS source as necessary from the MBO compiled object code.

When re-starting Varkon and loading this project and job, Varkon may complain that the result file ("RES-file") is missing. Just press "y" to have Varkon recompute it.

4.4.3. Making the Messages Go Away

Many times during the execution of Varkon messages will be displayed in the graphics window (for example, the "New result file created" message above). To make these messages disappear, either press the Tab key or click on the right mouse button.

Legal Matters

With the exception of any material noted as being in the public domain, the text, images, and encoding of this document are copyright © 1998 by David M. MacMillan.

The author has no relationship with Microform AB, and this Tutorial is neither a product of nor endorsed by Microform AB.

"Varkon" is a registered trademark of Microform AB, Sweden.

This document is licensed for private, noncommercial, nonprofit viewing by individuals on the World Wide Web. Any other use or copying, including but not limited to republication in printed or electronic media, modification or the creation of derivative works, and any use for profit, is prohibited.

This writing is distributed in the hope that it will be useful, but "as-is," without any warranty of any kind, expressed or implied; without even the implied warranty of merchantability or fitness for a particular purpose.

In no event will the author(s) or editor(s) of this document be liable to you or to any other party for damages, including any general, special, incidental or consequential damages arising out of your use of or inability to use this document or the information contained in it, even if you have been advised of the possibility of such damages.

In no event will the author(s) or editor(s) of this document be liable to you or to any other party for any injury, death, disfigurement, or other personal damage arising out of your use of or inability to use this document or the information contained in it, even if you have been advised of the possibility of such injury, death, disfigurement, or other personal damage.

All trademarks or registered trademarks used in this document are the properties of their respective owners and (with the possible exception of any marks owned by the author(s) or editor(s) of this document) are used here for purposes of identification only. A trademark catalog page lists the marks known to be used on these web pages. Please e-mail if you believe that the recognition of a trademark has been overlooked.

Version 1.8, 1998/06/17. Feedback to

Go to the: