@include in DCL

Discussion in 'AutoCAD' started by Gustavo Guidi, Oct 28, 2004.

  1. How can I set @include in a DCL that is compiled in a VLX, in order not to
    set the PATH becouse the VLX can be installed in any directoy.

    Thanks
     
    Gustavo Guidi, Oct 28, 2004
    #1
  2. Gustavo Guidi

    Rudy Tovar Guest

    Repeating what Luis said...

    And for those of you who don't speak Spanish...

    When the file is compiled into a VLX file format with "Expert settings" and
    the component file defined as a DCL, the path is no longer required for the
    utility to find the DCL. Both files become one. Remember if you don't
    specify the file as being a DCL it will not find the file or ignore it even
    if you've added it as a comonent.

    --
    MASi
    Copyright 2004 by Cadentity
    www.Cadentity.com
    Autodesk
    Authorized Developer
     
    Rudy Tovar, Oct 29, 2004
    #2
  3. Thanks to both but the point is :

    If you have different DCL files for example in one you define labels
    in order to change them when you want, and in the others you define the
    different dialogs
    If you do it without includding the DCL it in the VLX you can use the
    INCLUDE,
    and it recognize it, but if you don't paste all the DCLS in just one file
    when you compile and you include the singles DCL, the compiler doesn't
    recognize
    the items define in a different DCL file. (at least in Release 2000)

    I attached a part of the files to be more clear.


    Errors in ACAD.DCE

    ====== DCL semantic audit of C:\WINDOWS\TEMP\$VL~~002.DCL ======

    Error. Widget named "deu_object62" is undefined.

    Error. Widget named "deu_object64" is undefined.




    ---------- LISP FILE --------------

    (DEFUN C:TEST ()(inclu_test))

    (setq PATH "\\") ;;MUST be the same used in PP.DCL


    (defun defdcl (filedcl / deu_dcl errort)
    (if (findfile (strcat filedcl ".dcl"))
    (progn
    (setq deu_dcl (load_dialog (strcat filedcl ".dcl")))
    (if (< deu_dcl 0)
    (setq errort 1)
    )

    )
    (progn
    (setq errort 1)
    (alert (strcat " No se encontro el file "
    (strcase filedcl)
    ".DCL "
    )
    )
    )
    )


    (if errort
    (setq deu_dcl nil)
    )
    deu_dcl
    )



    (defun inclu_test ( / path deu_dcl n_diag )

    (setq deu_dcl (defdcl (strcat PATH "PP")))
    (if deu_dcl
    (progn

    (setq ok (new_dialog "prova" deu_dcl))
    (set_tile "Title" "DCL INCLUDE TEST")
    (start_dialog)
    (unload_dialog deu_dcl)
    )
    )
    (princ)
    )







    ---------- PP.DCL FILE --------------

    dcl_settings:default_dcl_settings {audit_level=3;} file://Line1
    @include "\\Include.DCL" file://Line2

    file://Line 1 and 2 must be REM to compile in a VLX


    prova : dialog { key= "Title";
    spacer_1;
    : boxed_row {
    spacer_1;
    deu_object62;
    spacer_1;
    deu_object64;
    spacer_1;
    }
    ok_only;
    }









    ---------- INCLUDE.DCL FILE --------------



    deu_object62: retirement_button { label="Direccion <"; key =
    "direc"; }
    deu_object64: retirement_button { label="Punto Ins <"; key =
    "sel_p"; }
     
    Gustavo Guidi, Oct 29, 2004
    #3
  4. Gustavo Guidi

    Rudy Tovar Guest

    I'm a bit at a lost... Are you trying to create a dialog on the fly...?

    If so just generate the code for the other dialog on the fly, and have it
    placed in a temp folder...for that you could use one of autocads registry
    key's to find a place to hold the temp.dcl.

    Now if you're having problems with calling another dialog inbedded, that
    just a how you wrote the code issue.

    I use to use protobox for my dialog designs, but now moving toward using
    ObjectDCL...
     
    Rudy Tovar, Oct 29, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.