BOMLENGTHS LISP IS NOT WORKING ON AUTOCAD 2020 Mac OS CATALINA

BOMLENGTHS LISP IS NOT WORKING ON AUTOCAD 2020 Mac OS CATALINA

Anonymous
Not applicable
4,459 Views
4 Replies
Message 1 of 5

BOMLENGTHS LISP IS NOT WORKING ON AUTOCAD 2020 Mac OS CATALINA

Anonymous
Not applicable

Hello guys;

 

it has been 15 years I have been using Autocad. First time I am dealing with this issue. I have never experienced it. On my MAC I am running Autocad 2020. I tried to load bom lengths lisp. For me, it is a life-saving lisp. I could not find a way to run it properly.

 

I manage to load it successfully. Yet when I try to use it, it is not working. I can find the new app on the command line. After I hit for running the app it doesn't do anything.

 

Thanks a lot in advance.

0 Likes
Accepted solutions (1)
4,460 Views
4 Replies
  • Lisp
Replies (4)
Message 2 of 5

maxim_k
Consultant
Consultant
Welcome to Autodesk Forums!

Hi Tahsin,
If AutoLISP routine you are trying to use was written for AutoCAD for Windows, the most likely it uses Visual LISP functions.
Do you have BOMLENGTHS LISP from here:
https://jtbworld.com/autocad-bomlengths-lsp
If yes, then it contains Visual LISP functions. But Visual LISP is not supported on Mac.

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
0 Likes
Message 3 of 5

Anonymous
Not applicable

Hello Maxim;

 

first of all thanks for your time and answer. Yes, I got lisp file from that directory. Yet I used the same lisp before on my Macbook Air. And it worked very well on this computer. I am afraid it is not just about Mac. It may something about the new version of OS or Autocad. But there is must be a way to run this lisp on my computer. I do not believe that is not possible. It is just a simple lisp. 

 

Thank you.

 

Best.

0 Likes
Message 4 of 5

maxim_k
Consultant
Consultant
Accepted solution

@Anonymous wrote:

..... Yet I used the same lisp before on my Macbook Air. And it worked very well on this computer.,,,


It is impossible to use it in AutoCAD for Mac, because in the form in which it currently exists, it contains functions which are not supported on Mac.

 Look at the code snippet with the main function - (bom-code) from BOMLengths.lsp file:

(setq %i 0
        %t 0
  )
  (vl-load-com)
  (setq sset (ssget ssfilter))
  (if sset
    (progn
      (princ "\nLengths:")
      (repeat (sslength sset)
        (setq en (ssname sset %i))
        (setq ed (entget en))
        (setq ot (dxf 0 ed))
        (setq curve (vlax-ename->vla-object en))
        (if (vl-catch-all-error-p
              (setq len (vl-catch-all-apply
                          'vlax-curve-getDistAtParam
                          (list curve
                                (vl-catch-all-apply
                                  'vlax-curve-getEndParam
                                  (list curve)
                                )
                          )
                        )
              )
            )
          nil
          len
        )

Do you see functions functions that start with "vl"?

They are:

(vl-load-com)

(vl-catch-all-error-p)
(vl-catch-all-apply)
(vlax-ename->vla-object)
 
Now try to type (vl-load-com) at the command window and hit Return. You will see:
Command: (vl-load-com)
; error: vl-load-com not supported on  "Mac OS X Version 10.15 (x86_64)"
 This is for macOS Catalina.
On Mojave you will see:
Command: (vl-load-com)
; error: vl-load-com not supported on  "Mac OS X Version 10.14 (x86_64)"
So as soon as AutoLISP interpreter on Mac step into (vl-load-com) function, it generates error, which is passed to (errexit) function defined in that LSP file. (errexit) quietly exits AutoLISP command and you don't see anything at the command prompt.
But....
Fortunately, the author of Lisp left an old version of the main function inside the code. It is (bom-code-old) function.
I replaced (bom-code) with  (bom-code-old) in the attached BOMLengths-1.lsp file.
Try to use it, it should work on Mac now.
 
 

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
Message 5 of 5

Anonymous
Not applicable

Hello Maxim;

 

you are the champion mate. Thanks a lot for your support.

 

You saved my life.

 

Best.

0 Likes