Howdy, Stranger!

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

New user to BricsCAD trying to get my AutoCAD LISP to run

Hi I am a new user to BricsCAD after years of experience with AutoCAD. I have a routine that places the bearing and distance on any line work you select. The routine works great in AutoCAD however for some reason does not run in BricsCAD? When I try to run it I get the following:

; ----- Error around expression -----
; '(0 0 3 1)

Can anyone please provide help in what I need to change to get it to work in BricsCAD.


Bearing and Distance.lsp


  • If you do a debug session in BLADE you quickly find the problems.

    On Line 57 the *ERROR* function is attempting to set the system variable DYNPROMPT. This SETVAR isn't available in BricsCAD, so ironically throws an error. Commenting out fixes.

    The last line after the command function (around line 110) also throws an error as the lisp variable TXT hasn't been initialised.
    (mapcar '(lambda (x) (setq txt (strcat txt "\n" x))) (list "qwerty" "asdfgh"))
    This line looks to be superfluous, so simply comment out.

    Making these changes got the program working for me. See adjusted file attached.

    Jason Bourhill
    BricsCAD V20 Ultimate
    CAD Concepts

    Bearing and Distance.lsp
  • Thank you Jason, that now works. I really appreciate the help.

  • thx Jason, wish I could upvote posts!

  • edited March 27

    Don't do much Bearing/Distance, mostly electrical dwgs, but found this lisp routine VERY cool. And being a Lisp novice, just enough to be dangerous (very rarely understand the "why", but able to figure it out, sometimes), was able to figure out to put the following @ line 51 (before ext'g 51) that creates the 2 needed layers once the BD is started, not @ loading (which I first tried, not good, don't need it in every dwg opened). My colors are crazy just for visual, edit as needed, if needed.

    (Command "-Layer" "New" "A-DIST" "C" "6" "A-DIST"
    "New" "A-BRNG" "C" "30" "A-BRNG" "") ;New Layers A-DIST color 6 & A-BRNG color 30

  • for acad at least, you need to use -layer I believe. I always use it so lisps work on both platforms.

  • Thanks James, edited my previous post to match your comment, my bad.

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