LISP and DCL

I have a autolisp program made for Bricscad windows version and I want to put it in Bricscad Linux. With the first it run OK but in linux (ubuntu 11.04) there are no conection between lisp file and dcl file.

This is the listp file:

(defun c:acercaetres (/ acercadeiddcl nosalir x y)
      (setq acercadeiddcl (load_dialog "~/etres/inicio/acerca.dcl"))
      (if (< acercade_id_dcl 0)
          (progn
             (alert "Archico ACERCA.DCL no encontrado")
             (exit)
          )
       )
      (setq nosalir t)
      (while nosalir
         (if (not (new_dialog "acercade_etres" acercade_id_dcl))
             (progn
                (alert "No se encontro el dialogo ACERCA DE en el archivo ACERCA.DCL")
                (exit)
             )
         )
         ;(setq x (dimx_tile "vista")
         ;      y (dimy_tile "vista")
         ;)
         ;(start_image "vista")
         ;(fill_image 0 0 x y 160)
         ;(slide_image 0 -97 180 156 "~/etres/inicio/logo_etres.sld")
         ;(end_image)
         (action_tile "accept" "(done_dialog 10)")
         (setq accion (start_dialog))
         (cond ((= accion 10)
               (setq nosalir nil)
           )
         )         
      )
      (unload_dialog acercade_id_dcl)
      (princ)
)

And this is the dcl file:

acercadeetres: dialog
         {label="ACERCA DEL CONVERSOR DWG ---> LIDER V.1 © 2.008";
          :row
            {width=60;
            }
          :row
            {alignment=centered;
             fixed_width=true;
               :column
                 {:paragraph
                  {:text_part
                     {label="Esta aplicación ha sido desarrollada por:";
                     }
                   :text_part
                     {label=" ";
                     }
                   :text_part
                     {label="Manuel Romero";
                     }
                   :text_part
                     {label="Director de Proyectos";
                     }
                   :text_part
                     {label=" ";
                     }
                   :text_part
                     {label="ETRES Consultores";
                     }
                   :text_part
                     {label="Diseño de Edificios Energéticamente Eficientes";
                     }
                   :text_part
                     {label="www.etresconsultores.es   mromero@etresconsultores.es";
                     }
                  }
                 }
              }
       spacer_1;
       ok_only;
       }

Comments

  • I am using a DCL file with a lisp fuction, and both were written for Acad long ago, and they work.

    Have you checked that they are both in the same place? and that the place is  on your path?

    What are the permissions/owner of each file?If one were a different owner, say root, that might be a problem.

    How are you loading the lisp file? are you using appload? or typing it in the command line in parentheses?

     

  • Thanks for your reply.

    everything you've given me is OK.

    In the lisp file I have two filters:

    1º) The DCL file exits:

    (setq acercadeiddcl (load_dialog "~/etres/inicio/acerca.dcl"))

    (setq acercadeiddcl (load_dialog "~/etres/inicio/acerca.dcl"))
          (if (< acercade_id_dcl 0)
              (progn
                 (alert "Archico ACERCA.DCL no encontrado")
                 (exit)
              )
           )

    If "acerca.dcl" don't exits, it's show a windows with "Archivo ACERCA.DCL no encontrado" (file ACERCA.DCL not found)

    2º) The dialog exits inside DCL file:

    (if (not (new_dialog "acercade_etres" acercadeiddcl))
                 (progn
                    (alert "No se encontro el dialogo ACERCA DE en el archivo ACERCA.DCL")
                    (exit)
                 )

    )

    If dialog "acercade_etres" don't exits inside the DCL file, it's show a windows with "No se encontró el diálogo ACERCA DE en el archivo ACERCA.DCL" (Dialog ACERCA De not found inside ACERCA.DCL).

    The nome of the dialog in the DCL file is "acercade_etres"

    My problem is in the second filter. The first works OK, but not the second. In Bricscad 9 on windows it work OK without problems.

  • Hello Manuel,

    I don't get exactly what your problem is, just some hints that might help:

    -  that checking for the dcl file works looks like a miracle, since you set a var named 'acercadeiddcl' and then check for one named 'acercade_id_dcl' ...

    -  if the dialog does not work, remove all special characters from the dcl and try again - I experienced difficulties with text encoding and did this with all my dialogs a while ago (but I did not check whether this problem still persists)

  • Thank your very much Knut Hohenberg. Now it's work. The problem was in the special characters in the dcl

  • Glad it helped - still, it is a serious bug, for which you should post a support request (I'm not doing this myself since I don't have any localized dialogs left, so I can't really follow up)

  • Hello Manuel,I use localized dialogs without any problem after I converted them to UTF-8 codepage.UTF-8 is my system codepage in linux.My lisp code was originally in ANSI CP1250 codepage.I converted them from CP1250 to UTF-8 with command:recode CP1250..UTF-8 *.dcl

  • Good support guys, couldn't do it better!


    Mind that it is not possible to perfectly fix this issue.
    Text files that use a system codepage are not cross-platform.
    It is possible to make text files that are valid both in ANSI CP1250 and in UTF-8.

    So, a dcl file with special characters that was created in ANSI CP1250 will probably be valid UTF-8 as well.  However, likely it will be invalid dcl.  So when dcl loading in linux system code page UTF-8 fails, bricscad could attempt to load the dcl file in ANSI CP1250 instead.  If that works, a warning could be displayed requesting to convert the dcl file.

  • Good Morning to everyone:

    I'd want to know if a Pro version for Linux really exists and if it can be runned on Debian.

    I tried a dwnloaded version and installed it on Debian, but coldn't see my 3D blocks.

    Also some layers that were off appeared on, and other layers didn' appear at all.

    Does anybody really used a Pro version for Linux?

     

    Regards.

    Alejandro L. de la Barra

    Mechanical Engineer

  • @Alejandro

    At work we use the Pro version, without the issues you mention. Bricscad 11.3.16, openSUSE 11.3 KDE 4.6 & 11.4 KDE 4.7, both 64-bit.

    Maybe it's not what you're referring to, but about layers that don't appear, I've seen this when the Z coordinate of the entities is broken, with real high values like +99E99 or such. Flattening the drawing (or changing the Z coordinates of the affected entities in the properties box) solves the issue for Bricscad (in AutoCAD the entities are shown).

  • Thanks. I wanted to know if the problem was referred to the Operative System or the program itself.

     

    Regards.

     

    Alejandro L. de la Barra

     

This discussion has been closed.