DFA file overview

Overview

How To


Before we begin describing the language and its lexical elements, we provide a brief description of the DFA file and offer a quick program for you to enter and execute.

Note:

For a description of Knowledge Fusion's dialog boxes see the Dialog boxes and Menus Overview topic. The DFA files that arrive with an installation are system files and should not be relocated or edited.

The DFA file is ASCII source code. The letters DFA mean DefClass File ASCII. The word DefClass is a reserved word that is described later in the DefClass Class Marker topic. The file extension for a DFA file is ".dfa".

Example

Open your favorite text editor and then enter the following code. Save the file and name it myfirst.dfa. Note that the file extension is ".dfa".

#! NX/KF 4.0


DefClass: MyFirst (ug_base_part);
    (number parameter) my_height: 84;
    (number parameter) my_width: 36;
    (number parameter) my_length: my_width:/12;


(child) block1: 
    {
        class, ug_block;
        length, my_length:;
        width, my_width:;
        height, my_height:;
        color, 3;
    };

 To execute this program:

  1. Open NX and open a new blank part. Name the part startbox.

  2. Choose Preferences->Knowledge Fusion.

  3. In the New Directory box, enter the directory path to the myfirst.dfa file you just created.

  4. Click Add to add the directory path to the Search Directories list box. Click OK.

  5. On the Resource Bar, Click the Knowledge Fusion Navigator tab.

  6. Right-click the root node and choose Add Child Rule.

  7. In the Add Child Rule dialog box, enter my_block in the Name box, .

  8. Scroll down in the Class list box and select MyFirst.

  9. Click OK.

  10. Expand the my_block node by clicking the plus sign.

    my_block Instance


    See Attribute overview for a description of attributes.