KozMos VLDCL System V4.0.91031

  Reduce and simplify the coding works on DCL

¡¡         VLDCL is a Visual LISP programming tool for coding DCL based application from within Visual LISP IDE environment. VLDCL will classify all typed DCL Objects (DCL tiles) into 8 groups and define some useful properties to them. All properties will be defined in a global variable. VLDCL will scan the variable and make proper initialization (set_tile/mode_tile) and action (action_tile) definition functions so that the program structure will be established and maintained. By doing so, there will be less (or even none) set_tile/mode_tile/action_tile coding works while programming. All these functions will be defined and executed by VLDCL in memory. Modify, update and maintain the programs can be done simply by modifying properties data in global variable. 
        VLDCL has eight pre-defined tiles and each tile will be the reference objects of one or more DCL tiles. The following list will show the relationship between DCL tile and VLDCL tile:
VLDCL edit_box slider toggle image list button
vbutton
text radio
DCL edit_box slider toggle image
image_button
list
popup_list
button
image_button
help
info
text
text_part
error
radio_button
radio_column(row)
boxed_radio_column(row) 

        Each VLDCL tile contains it's own properties, values of properties are saved in a DXF-similiar dot paired list. The valid DXF code are -1, 0, 1, 2, 3, 4 and 5 (Only Image has DXF code 5 to process vector text in image). In normally, different tile should contain different DXF code definition. Still similar with AutoCAD DXF, code -1, 0 and 3 contain same properties to all VLDCL tiles:

  • VLDCL DXF -1:
    The dialog name that the tile belongs to. If there is only one dialog, this code is not needed. This code is defined and used only for programming under multiple dialogs within one DCL file.
  • VLDCL DXF 0:
    The tile type, must be one of the eight VLDCL pre-defined tiles.
  • VLDCL DXF 3:
    The Common "Gray Tiles List". A complex list to control the disable/enable relationship between tiles. 

       All operations and callback functions should be defined by user, VLDCL contains a feature of pre-define different tiles' function name: while initialization procedure, the function will be "c:vldcl-set-*" (in the string, "*" means the tile's key, for example, "MyList" will be defined as "c:vldcl-set-MyList". Please be notice that these functions should contain no arguments. Or Visual LISP may return error); VLDCL use "c:vldcl-action-*" for action_tile callback and "c:vldcl-done-*" for done_dialog callback as default. This is somehow similiar with ObjectDCL.
        Call back function for common DCL tile of accept (always returns done_dialog 1) was pre-defined as "C:VLDCL-DONE-OK". This means if you have defined "C:VLDCL-DONE-OK" function, VLDCL will automatically call it when you press the [OK] button on dialog. And same, function "C:VLDCL-DONE-CANCEL" for DCL button tile cancel (always returns done_dialog 0). 

        There are some global variables used by VLDCL:

Name  Type Descriptions Example
*DIALOG* SYSTEM
This variable is used for multiple dialog application. *DIALOG* is a dialog name list that shows the dialog calling sequence. The 1st element is the current active dialog name. ("Dialog2" "Dialog1" "MainDialog")
*DCL-ID* SYSTEM
The load_dialog ID. 11
*DCLRTN* SYSTEM
The done_dialog ID. 1
*DCL-DATA* USER
The main VLDCL tiles' properties data.
This variable is used for multiple dialog application.
See Template.
*DCL-OKCANCEL* USER
*DCL-OKCANCEL* will define different ok/cancel buttons operations in different sub-dialog. See Template.
*DCL-REG* SYSTEM
USER
This variable is used for using RegisterShell. See Template.

VLDCL tile properties

*init*
*init* is a nest-defined VLDCL tile key, this tile will contain the functions running while the initialization of the dialog. If there is not any sub-dialog, programmers can use "*init*" as the key <All lower letters>; if there are sub-dialogs that will call the initializing function, please add the sub-dialog name string to "*init*", the syntax should be (strcat "*INIT-" (strcase Sub-DialogName)"*") <All upper letters>. For example, if you have a sub-dialog called "MySub" to use the feature, you should define the following data in *DCL-DATA*: '("*INIT-MYSUB*"(1 . "(xsub-init-mysub)")).
VLDCL DXF 1 The function running while initializing the dialog.
Function(s) VLDCL-SETTILE(0)
Data Samples '("*init*" (1 . "(xsub-initializing-dialog 0)"))
'("*INIT-MYSUB*"(1 . "(xsub-init-mysub)"))

edit_box
VLDCL DXF 1 The value string displayed in the "edit_box" blank. Default value is one of "0", "0.0" and "" according with the variable type saved in VLDCL DXF2.
VLDCL DXF 2 The value type. To improve edit_box, VLDCL can process the input string's type. and "edit_box" in VLDCL can accept input of "real number", "integer number" , "architectural number" and "common string", If the type is real, the DXF 2 must start with ":REAL", ":INT" for integer and ":ARCH" for architectural. Then the string is followed by a bit integer, different integer means different value type (in case that DXF 4 is not defined):
  1. the value is smaller than 0, or the value can be a minus;
    Value < 0
  2. the value is 0, or the value can be 0;
    Value = 0
  3. the value can be smaller than 0 or equal to 0;
    Value ¡Ü  0
  4. the value must bigger than 0, or the value can NOT be a minus;
    Value > 0
  5. the value can not be 0;
    Value /= 0
  6. the value can be bigger than 0 or equal to 0;
    Value  ¡Ý 0
  7. the value can be any valid number
  8. Edit of the value will be ignored, the value can not be changed by user via dialog.

VLDCL support enter list contents in editbox, seperated by spacebar, in order to indicate the program that a list content is needed, set DXF2 to ":LIST".
If the type is normal string, then DXF 2 can be ignored.

VLDCL DXF 3 Common "Gray Tiles List"
VLDCL DXF 4 The value range. The value will be valid only in case of setting DXF 2 to 1, 3, 4, 6, 7 (2, 5 and 8 are not valid). The following table shows how this value (defined as DXF4) will take effects:
  • DXF2=1,3 (Value <0 or Value ¡Ü0)
    DXF4 must be  a minus digit, if not, the routine will convert it to minus.
    Final checking criteria is: DXF4 ¡Ü Value ¡Ü 0
  • DXF2=4,6 (Value >0 or Value ¡Ý0)
    DXF4 must be  a number. A minus number will be converted automatically.
    Final checking criteria is: 0 ¡Ý Value ¡Ý DXF4
  • DXF2=7 (Value can be any)
    DXF4 must be  a number list which contains two numbers. The checked value must between the two numbers. If the data type is not right, it will be ignored.
    Final checking criteria is: DXF4(Min) ¡Ý Value ¡Ý DXF4(Max)
Function(s) VLDCL-EDITBOX-ARCH(3)
VLDCL-EDITBOX-REAL(3)
VLDCL-EDITBOX-INT(3)
VLDCL-EDITBOX-STRING(2)
VLDCL-EDITBOX-LIST(2)
VLDCL-GETARCH(2)
VLDCL-GETINT(2)
VLDCL-GETREAL(2)
VLDCL-GETSTRING(2)
VLDCL-GETPASSWORD(1)
Data Samples '("Key"(-1 . "SubDialog")(0 . "edit_box")(1 . "12.3")(2 . ":REAL4"))
'("Key"(0 . "edit_box")(1 . "124")(2 . ":INT4"))
'("Key"(0 . "edit_box")(1 . "dsfdsfg"))

slider
VLDCL DXF 1 The slider position number string. Default is the minimium number string from VLDCL DXF2.
This value will be checked by VLDCL to make sure the number is between the Maxium and Minimum number.
VLDCL DXF 2 Predefined slider Maxium/Minimum numbers list, VLDCL will automatically sort the list.
VLDCL DXF 3 Common "Gray Tiles List"
Function(s) VLDCL-SLIDER(2)
Data Samples '("Key"(-1 . "SubDialog")(0 . "slider")(1 . "12")(2 . (100 1)))
'("Key"(0 . "slider")(1 . "16")(2 . (10 2000)))
'("Key"(0 . "slider")(2 . (1 100)))

toggle
VLDCL DXF 1 The toggle value, must be "0" or "1". Default is "0".
VLDCL DXF 2 The action_tile function for toggle.
If there is NOT any operations, this code can be empty.
VLDCL DXF 3 The DCL tiles that will be disable to use (turn gray) when the toggle value is "0".
If there is only one tile which is needed to be turned gray, programmers can use the tile's key string.
Function(s) VLDCL-TOGGLE(0)
Data Samples '("Key"(-1 . "SubDialog")(0 . "toggle")(1 . "1")(3 . ("GrayTile1" "GrayTile2"...)))
'("Key"(0 . "toggle")(1 . "0")(3 . ("GrayTile1" "GrayTile2"...)))
'("Key"(0 . "toggle")(3 . ("GrayTile1" "GrayTile2"...)))
'("Key"(0 . "toggle")(2 . "(Xsub-PressToggle-Action $Key)"))

image
VLDCL DXF 1 The background color string for image.
Because DCL can not support AutoCAD truecolor, all truecolor number will be converted into negative numbers so that the program can identify truecolor from normal ACI number.
VLDCL DXF 2 The DONE_DIALOG callback function.
If it is NIL, use default key function definition of "c:vldcl-action-*".
VLDCL DXF 3 Common "Gray Tiles List"
VLDCL DXF 4 Image DXF code 4 will directly save the annotation color in vector image feature (DXF 5 must be defined in this situation) or can be a linked VLDCL tile's key which is used to display the color content in dialog. Then the new color number can be displayed on a text_part tile in dialog automatically.
Because DCL can not support AutoCAD truecolor, all truecolor number will be converted into negative numbers so that the program can identify truecolor from normal ACI number.
VLDCL DXF 5 Image DXF code 5 will contain the string to display in the image. If DXF code 5 is defined:
  • DXF code 1, 4 must be set correctly:
  • DXF code 1 will be used as the cell background color;
  • DXF code 4 must be used as combocolor.
Function(s) VLDCL-IMAGE-FILL-TEXT(2)
VLDCL-IMAGE-FILL-COLOR(2)
VLDCL-IMAGE-FILL-SLIDE(2)
VLDCL-IMAGE-COMBOCOLOR(1)
VLDCL-COLORDLG(1)
VLDCL-COLORDLG-EXCEL(1)
Data Samples '("Key"(-1 . "SubDialog")(0 . "image")(1 . -1)(2 . "(PressImageButton)"))
'("Key"(0 . "image")(4 . "ColorText"))
'("Key"(0 . "image")(4 . "-2342556"))
'("Key"(0 . "image")(4 . "123"))
'("Key"(0 . "image")(1 . "200")(4 . "122")(5 . "KozMos Inc."))

list
VLDCL DXF 1 The selected ID (integer string) of string. Default is "0".
VLDCL will check if this number is smaller than the length of list (from VLDCL FXF2). If the number is beyond the range, VLDCL will re-set this value to "0".
VLDCL DXF 2 The string list that will be displayed in the list box. If only one atom in the list, VLDCL can also recognize this atom string and automatically convert it into the one-atom-list.
If programmers want to use AutoCAD TABLE list, this value can be the flag string, only valid for the following:
  • :APPID
  • :BLOCK used for all blocks
    :BLOCK0 used for blocks do not contains attribute(s)
    :BLOCK1
    used for blocks contains attribute(s)
  • :DIMSTYLE
  • :LAYER
  • :LAYOUT
  • :LTYPE
  • :MLSTYLE
  • :MLEADERSTYLE
  • :SCALELIST
  • :STYLE
  • :UCS
  • :VIEW
  • :VPORT

When the VLDCL DXF2 is set to one of these string, the VLDCL DXF1 can be set to nil or any valid item gathered by certain AutoCAD TABLE name. To indicate that this string is an atom of the TABLE list, you need to add a "::" prefix to the value. For example, if we use "DimStyle" in VLDCL DXF2 and want to set existing Dimstyle "OLDDIMSTYLE" as default displayed value, we should set '("Key" (0 . "list")(1 . "::OldDimStyle")(2 . ":DimStyle")). If the "OldDimStyle" is not a valid dimstyle in AutoCAD, VLDCL will treat "::OldDimStyle" as NIL.

If predefined table can not return a valid list, VLDCL will use '("** Invalid **") to replace.

VLDCL DXF 3 Common "Gray Tiles List"
Function(s) VLDCL-LIST(2)
VLDCL-LIST-VALUE(1)
Data Samples '("Key"(-1 . "SubDialog")(0 . "list")(1 . "2")(2 . ("1" "2" "3" ... "n")))
'("Key"(0 . "list")(1 . "9")(2 . ("1" "2" "3" ... "n")))
'("Key"(0 . "list")(2 . ("1" "2" "3" ... "n")))
'("Key"(0 . "list")(1 . "::KKK")(2 . "KKK"))
'("Key"(0 . "list")(1 . "::NewLayerName")(2 . ":Layer"))

text
VLDCL DXF 1 The text content string. Default is "".
VLDCL DXF 3 Common "Gray Tiles List"
Function(s) VLDCL-TEXT(2)
Data Samples '("Key"(-1 . "SubDialog")(0 . "text")(1 . "2"))
'("Key"(0 . "text")(1 . "AnyDisplayedString"))
'("Key"(0 . "text"))

radio
VLDCL DXF 1 The current radio_button selected. Default is the 1st radio_button key from VLDCL DXF2.
VLDCL DXF 2 All radio_button keys' list
Function(s) VLDCL-RADIO(2)
C:VLDCL-READIOACTION-*(1)
Data Samples '("Key"(-1 . "SubDialog")(0 . "radio")(1 . "Radio2")(2 . ("Radio1" "Radio2" "Radio3")))
'("Key"(0 . "radio")(1 . "Radio3")(2 . ("Radio1" "Radio2" "Radio3")))
'("Key"(0 . "radio")(2 . ("Radio1" "Radio2" "Radio3")))

button / vbutton (Virtual Button)
VLDCL DXF 1 The DONE_DIALOG ID number (Default is -1).
If the DONE_DIALOG ID is minus, press this tile will not close current dialog. Or current dialog will disappear temporarily for user's interactive operations.
DCL tiles of "accept" "cancel" and "help" needn't define in VLDCL.
VLDCL DXF 2 The DONE_DIALOG callback function.
If it is NIL, use default key function definition of "c:vldcl-action-*".
VLDCL DXF 3 Common "Gray Tiles List"
VLDCL DXF 4 Only Virtual Button has DXF code 4 to display vector text and Virtual Button can only be valid for DCL image_button. VButton DXF code 4 will directly save the annotation color in vector image feature (DXF 5 must be defined as content to display in such condition).
Because DCL can not support AutoCAD truecolor, all truecolor number will be converted into negative numbers so that the program can identify truecolor from normal ACI number.
VLDCL DXF 5 Only Virtual Button has DXF code 5 to process vector text.
Virtual Button DXF code 5 will contain the string to display in the image. If DXF code 5 is defined, DXF code 4 must be set correctly as text color.
Function(s) VLDCL-IMAGE-FILL-TEXT(2)
VLDCL-IMAGE-FILL-COLOR(2)
VLDCL-IMAGE-FILL-SLIDE(2)
VLDCL-IMAGE-COMBOCOLOR(1)
VLDCL-COLORDLG(1)
VLDCL-COLORDLG-EXCEL(1)

VLDCL-VBUTTON(3)
Data Samples '("Key"(-1 . "SubDialog")(0 . "image")(1 . -1)(2 . "(PressImageButton)"))
'("Key"(0 . "button")(1 . 2)(2 . "(PickObjectFromScreen)"))
'("Key"(0 . "vbutton")(2 . "(Sub-Function)")(4 . 123)(5 . "VButton"))

Gray Tiles List
        All VLDCL tiles have same "Gray Tiles List" definition except "toggle" tile. The "Gray Tiles List" is defined as a complex list. Each item in this list is still a list called as SubList here. The SubList is a key strings' list. The first element of the SubList is the tile value that will enable this "gray operation" and all items left (get via AutoLISP "CDR" function) will be set enabled/disabled.
        As an example of the VLDCL "radio" tile, the data may be appeared something like '(("radiokey"(0 . "radio")(1 . "Radio1")(2 . ("Radio1" "Radio2" "Radio3"))(3 . (("Radio1" "GrayRadio1-1" "GrayRadio1-2")("Radio2" "GrayRadio2-1" "GrayRadio2-2")))). While in VLDCL, when user select "Radio1", "GrayRadio1-1" & "GrayRadio1-2" will be gray. And "GrayRadio2-1" & "GrayRadio2-2" will be normal. When user select "Radio2", the situation will be changed, "GrayRadio2-1" & "GrayRadio2-2" will be set to gray and "GrayRadio1-1" & "GrayRadio1-2" will be enabled.

Virtual Button
        Normal DCL button can only display the label string in black, Virtual Button is an enhanced VLDCL feature to be able to fill colored text as button label. By doing so, the label string can also be changed in dialog procedure. Virtual Button will not take effects on normal DCL button, only image or image_button are legal to use the Virtual Button feature.
       To enable the Virtual Button feature, just add certain data in VLDCL former button (DXF4 and DXF5. maybe can change the VLDCL tile name from "button" to "vbutton" to make a record, but this is not a MUST-DO procedure).
        Now the Virtual Button can only support one-line text string and the string may not be able to display correctly if the string is too long to fit the image/image_button width.


VLDCL complex Modules
        There are six useful complex modules defined within VLDCL: CheckList, ComboList, PropList ViewList and ViewSlide. These modules can be called by certain VLDCL function and the dialogs will appear correctly.

Dialog interface

Function codes

VLDCL-CHECKLIST

Screenshot called by
(vldcl-checklist "MyTitle" "My CheckList Message" '(("Check1" . 0)("Check2" . 1)("Check3" . 0)))
VLDCL-COLORDLG-EXCEL

Screenshot called by
(vldcl-colordlg-excel 17)
VLDCL-COMBOLIST

Screenshot called by
(vldcl-combolist "MyTitle" "My ComboList Message" '("Combo1" "Combo2" "Combo3") "Combo3")

    By Press the [new...] button, VLDCL ComboList enable users to create new items in list. 

VLDCL-PROPLIST

Screenshot called by
(vldcl-proplist "My PropList Message" '(("Prop1" . "Something")("Prop2" . "Something")("Prop3" . "Something")))

        VLDCL PropList support adding new items for the Property List.

        All existing Property ID can not be changed, if you want to change it, use Delete / New methods. 

VLDCL-VIEWLIST

Screenshot called by
(vldcl-set-tabs "1 15")
(vldcl-viewlist "My Title" "My ViewList Message" '("ListLine\t1" "ListLine\t2" "ListLine\t3"))
VLDCL-VIEWSLIDE

Screenshot called by
(vldcl-viewslide "c:\\test.sld" "The TPT (Three Partner Tower) in Beijing")

We can
  • use the horizontal and vertical sliders to pan the slide;
  • use the scale list to make zoom to the slide;
  • Pick two points on the image button to perform a Zoom-Window operations (because we can only use integer in AutoCAD DCL image_button tile, Zoom-Windows can not perform very accurate position in display).

Program record

  • 2009-10-20: V4.0.91031 Build TRINNOLOV3
    Tiny code optimization.
  • 2009-04-10: V4.0.90331 Build TRINNOLOV3
    All functions using VBA were replaced when VBA is not available since AutoCAD 2010.
  • 2009-03-31: V4.0.90331 Build TRINNOLOV3
    A "Pan by 2 points" option is added to VLDCL.
    VLDCL now support HSL color system internally.
  • 2008-08-31: V4.0.80831 Build TRINNOLOV2
    Add LIST type for VLDCL edit_box tile
    Add APPID, BLOCK0, MLEADERSTYLE, MLSTYLE, SCALELIST, VIEW, VISUALSTYLE and VPORT for VLDCL list tile
  • 2008-01-31: V3.6.80131 Build TRINNOLOV2
    Code optimized and some tiny bugs fixed
  • 2007-04-30: V3.5.70531 Build TRINNOLOV1
    Upgrading
  • 2007-04-01: V3.5.70331 Build TRINNOLOV1
    Recoding vldcl-proplist
  • 2007-02-14: V3.5.61231 Build TRINNOLOV1
    vldcl-checklist support multiple selection
  • 2006-12-31: V3.5.61231 Build TRINNOLOV1
    Auto-gathering LAYOUT in VLDCL list tile as well as Block, Layer, Style etc.
    Content string can be set by users in VLDCL-VIEWSLIDE
  • 2006-11-20: V2.5.61031 Build MemliX
    Update to final release
  • 2006-04-20: V2.5.60430 Build Pre-MemliX
    Support true color in AutoCAD2007
    Add
    Virtual Button ("vbutton")
    Add value range support (DXF 4) for REAL and INTEGER in VLDCL edit_box
  • 2006-03-31: V2.5.60331 Build NoIStoRja
    Upgrade and some tiny bug fix
    Full .CHM help document
  • 2005-08-31
    Improvement for combocolor and vector text
  • 2005-05-12
    Improvement for filling text string in image and image_button
  • 2005-04-15
    Dialog to select Excel Color Index via vldcl-colordlg-excel
  • 2005-03-31: V1.5.50331
    VLDCL and VLAE ToolKit will have a same version code
    Recognize architectural digital number in vldcl-string-type function
    New feature of writing text string in image/image_button (vldcl-image-fill-text function)
  • 2005-02-28
    Reset PC system time to former will lock all commands
  • 2005-02-22
    Recognize string control symbols of "\t" "\n" "\r" in vldcl-editbox-string function
  • 2005-01-20
    Add vldcl-string2list
  • 2004-11-10
    Fix a bug on entering real number in VLDCL edit_box tile. Entering -.123 or .123 will be valid and VLDCL will automatically convert it into -0.123 or 0.123.
  • 2004-09-10
    Add vldcl-viewslide, vldcl-yesno and vldcl-proplist
    vldcl-set-tabs take effects on vldcl-proplist
  • 2004-08-25
    Add vldcl-set-tabs and vldcl-viewlist
    vldcl-set-tabs take effects on vldcl-combolist, and vldcl-viewlist
  • 2004-08-10
    Add vldcl-string-type.
  • 2004-07-30
    RegisterShell support 30, 60 and 90 days trial.
  • 2004-06-30
    Fix bugs on process default TABLE value of VLDCL list
  • 2004-06-05
    Improvement for VLDCL list tile's auto-gathering for AutoCAD TABLE list of Block, DimStyle, Layer, Linetype,Style, UCS
    VLDCL DXF2 for VLDCL toggle tile
    Add vldcl-colordlg
  • 2004-05-30
    Improvement of vldcl-put-value
  • 2004-05-20
    Add vldcl-getpassword
  • 2004-05-10
    Add vldcl-image-combocolor function
    Add VLDCL DXF4 for image tile.
  • 2004-04-28
    Prepare for complex "vldcl-proplist" function
  • 2004-04-16
    Add vldcl-regmessage
  • 2004-04-08
    Change on vldcl-module, directly pass DCL file and Dialog name as arguments to vldcl-module.
  • 2004-04-02
    Support multiple select list
  • 2004-03-25
    Add new feature: pre-defined *init* key
    Add complex tiles: getint, getreal; getstring
  • 2004-03-19
    Add complex tiles: combolist and checklist
  • 2004-03-15
    Add RegisterShell
  • 2004-02-28
    All tiles OK
    Simple sample codes
    Full documents
  • 2004-01-04
    Start base coding VLDCL
¡¡

//Koz Jono Yeoh//

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