Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Programação Lisp "BricsCAD x AutoCAD"

Good morning everyone
I've just migrated from autoCAD to Brics, and I liked the similarity, but I'm having some difficulty with some routines because it works in autoCAD but in Brics there is an error.
as not described below:

; [2].......MOSTRAR-ALL-IT <<--
; ----- Error around expression -----

but this happens in several functions "(defun"

I'm kind of lost ... I do not know how to solunate, apparently everything is correct.
I carry the same routine in AutoCAD and it works perfectly

I'm Brazilian and I speak Portuguese, I'm using Translator, maybe some words out of context but out of context ....

Below is the Lsip routine:

(defun #Mostrar_SetorEGrupo ()
(GETINT "\n..... ") ;;;; only to pause at this point
(IF (/= #Indst_ParcL nil)(PROGN (PRINC "\nSetor: ")(princ #Indst_ParcL )))
(IF (/= #Grupo_Escol nil)(PROGN (PRINC "|Grupo: ")(princ #Grupo_Escol )))

I'm waiting, thank you.


  • edited May 9

    Hi LaudReis
    Does this Help ?

    ;; (#Mostrar_SetorEGrupo)
    (defun #Mostrar_SetorEGrupo ()
      (setq #Indst_ParcL (getint "\nInput Integer : "))  ;;;; only to pause at this point
      (setq #Grupo_Escol (* #Indst_ParcL 2)) 
      (if (/= #Indst_ParcL nil)
          (princ "\nSetor: ") 
          (princ #Indst_ParcL)      
      (if (/= #Grupo_Escol nil)
          (princ "|Grupo: ")       
          (princ #Grupo_Escol)

    DoIt: BLADE
    DoIt: (#Mostrar_SetorEGrupo)
    Input Integer : 21

    Setor: 21|Grupo: 42

    834 x 929 - 92K
  • Thanks Kerry Brown
    But I did some testing on here.
    to check the results, and I came across the following.

    when I tested the routine separately before using my "Key / Head" program it works correctly.

    But when I'm using my commando (IT) that loads the routine
    (Mostrar_SetorEGrupo) it shows the error in this function, ie "there is no error in the function", but something structural or variaves or something of the type.

    So I post a question, I'm new to BricsCAD but I've been programming in AutoLISP for a long time:
    You remember when they migrated to BricsCAD something similar happened, that is, to make errors in routines (defun's) that in AutoCAD worked. (but again I have tested (Mostrar_SetorEGrupo) separately and it works in BricsCAD.

    As I said it may be something in the structure of my program or in the variaves or something of the type.
    If anyone can help me. I already watered in advance

  • edited May 10

    I notice the error message in the OP mentions a 'let' function. Be advised that BricsCAD has a built-in let function whereas AFAIK AutoCAD does not. Try renaming your custom let function.

  • edited May 13

    @Roy Klein Gebbinck said:
    the OP mentions a 'let' function. Be advised that BricsCAD has a built-in let function

    Whoa .. when did that happen .. I'll take it off my wish list.

    Do you have a link to docs or spec' ??


    The usage of the OR is unusual.
    (if (/= #Indst_ParcL nil) ...
    could be
    (if (not (boundp #Indst_ParcL)) ...

  • This let function is part of the underlying Lisp engine. It may be unwise to use it considering it is indeed undocumented.

    (let ((a 3) (b 5)) (* a b))

  • Thanks Roy,
    May be time to talk to Torsten :)

Sign In or Register to comment.
Origami is the Japanese word for paper folding. ORI means to fold and KAMI means paper and involves the creation of paper forms usually entirely by folding.

Powered by VanillaForums, Designed by Steam