@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.