AutoCAD for Mac Forum
Welcome to Autodesk’s AutoCAD for Mac Forums. Share your knowledge, ask questions, and explore popular AutoCAD for Mac topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BOMLENGTHS LISP IS NOT WORKING ON AUTOCAD 2020 Mac OS CATALINA

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
2481 Views, 4 Replies

BOMLENGTHS LISP IS NOT WORKING ON AUTOCAD 2020 Mac OS CATALINA

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.

Labels (1)
4 REPLIES 4
Message 2 of 5
maxim_k
in reply to: Anonymous

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
Message 3 of 5
Anonymous
in reply to: maxim_k

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.

Message 4 of 5
maxim_k
in reply to: Anonymous


@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
in reply to: maxim_k

Hello Maxim;

 

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

 

You saved my life.

 

Best.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report