Howdy, Stranger!

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

Getting an error using the LISP file TXTBOXWIDTH.lsp

I have a LISP that I used in my old CAD program for years to Shrinkwrap the bounding box of selected MText, but when i run it in BricsCAD i get the following error

txtboxwidth
Select entities:
Entities in set: 1
Select entities:
; --- LISP : Call Stack ---
; [0]...C:TXTBOXWIDTH
; [1].....MIP-MTEXT-WRAP-BB
; [2].......SETHANDLES <<-- ; ; --- Error around expression --- ; (ASSOC 75 0) ; ; error : bad argument type <0> ; expected at [assoc]

I'll attach the LISP file, Thanks

lsp
lsp
Txtboxwidth.lsp
5K

Best Answer

  • Answer ✓

    Assoc expects an element in an associated list along with a list to search. the "0" in (assoc 75 0) is a number, not a list.

    On line 116 try changing
    (subst (cons 75 0) (assoc 75 0) lst)

    to
    (subst (cons 75 0) (assoc 75 lst) lst)

    Regards,
    Jason Bourhill
    BricsCAD V20 Ultimate
    CAD Concepts

Answers

Sign In or Register to comment.
Origami
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