Programming with KozMos VLDCL System

  Guidance on coding applications based on KozMos VLDCL system

กก Import all VLDCL functions into separate-namespace
        Before running applications based on VLDCL, please make sure that VLDCL.VLX or VLDCL.FAS and VLDCL-ICON.FAS has been loaded into AutoCAD. Or there will not be any VLDCL functions available. This is only occurred for invoking Visual LISP source codes, if we need to package the source codes into VLX file for the distribution purpose, KozMos recommends programmers to compile the codes in separate-namespace mode. In this situation, we MUST firstly import all VLDCL functions into the application separate-namespace.
        There are two ways in importing VLDCL functions:
  • First method (using VLDCL.FAS & VLDCL-ICON.FAS)
    KozMos distributes VLDCL.FAS and VLDCL-ICON.FAS to programmers so that all VLDCL functions can be imported by packaging the two FAS files together with the final VLX file. Using this method need NOT distribute VLDCL.FAS and VLDCL-ICON.FAS again.
  • Second method (using VLDCL.VLX)
    Using VLDCL.VLX will be little complex than using FAS. First of all, we MUST distribute VLDCL.VLX together with the compiled VLX file. The applications must make sure to load VLDCL.VLX before calling any VLDCL functions and have to import all functions defined in VLDCL.VLX into it's own namespace by calling Visual LISP function (vl-doc-import (findfile "VLDCL.VLX")).

       Because using FAS files will be much simple, KozMos do recommends programmers using this method.


Coding and locate the DCL file
       The DCL codes can be created by other AutoLISP software or directly by manual. What the programmers need to do is get the key record of all used DCL tiles. The DCL file must be located in source codes using the real full path file name such as "X:\\My Project\\DCL\\Test.DCL". Even you have located the DCL file into AutoCAD searching path, KozMos DO recommend you locating the DCL file in this way.
        During the compilation procedure in Visual LISP console, just package the DCL file(s) into the application as resource files. There are not any further settings or coding is needed.

Build *DCL-DATA*
    The next step is build the global variable *DCL-DATA* according with the created DCL file. In most situations, we can build the *DCL-DATA* for DCL tile one by one. We can simply set the default value directly within *DCL-DATA*. If the variable is defined correctly, VLDCL will pass it into module to initialize the DCL in right way and value.

    Since each DCL tile can contain certain functions running by user interactivity. If we need this functions defined, just define it as a sub-function in main Visual LISP application or just use the default "C:VLDCL-ACTION-*" or "C:VLDCL-DONE-*" functions.

VLDCL coding notice
    The VLDCL coding method is like ObjectDCL. The difference is that VLDCL can only process normal DCL tiles and have the limitation of various arguments in pre-defined functions. In most situations, the VLDCL extended functions (such as "C:VLDCL-ACTION-*" or "C:VLDCL-DONE-*") contain no arguments at all.

กก

//Koz Jono Yeoh//

Copyright(C) 1994-2009 KozMos Inc
All rights reserved.