Matteo Ferrari Posted April 11 Posted April 11 Dear Community, Really nice to meet you all. I'm reaching out to you through this medium because I need assistance with AutoLISP files for AutoCAD and the MacOS Sonoma operating system. Let me explain in detail: - I've found the breakall.lsp file online, which allows cutting lines at each intersection point. This file is supported for AutoCAD on Windows, but I would like you to modify the script so that it can function on Mac. Currently, I work with AutoCAD 2019, but I would like the files to work on other versions as well. - Additionally, I would need to build an AutoLISP from scratch that can be compatible with both MacOS and Windows. The AutoLISP would need to execute the following: 1 - Starting with a .dwg file with multiple layers 2 - Exporting different files to .dxf, one file for each layer. 3 - Naming each new file as: "YYMMDD_FileName_LayerName" I understand that the first consultation is more viable, but I would like to know your opinion. Thanks in advance! breakall.lsp Quote
BIGAL Posted April 12 Posted April 12 I use "break all" no problems the issue is that the MAC version is missing some of the enhanced lisp functions, somewhere there is some details about this. It will be a VL function not working. Would need to know about MAC limitations so could at least identify which function not working. As a first I would add this (princ "\nFunction XYZ") after each (defun line where XYZ is function name you should get a lot of "function" in the text screen hopefully the last one is the one it crashes on. There are 15 defuns. That may give us a clue. Quote
pkenewell Posted April 12 Posted April 12 AutoLISP on the MacOS cannot use any Visual LISP (i.e. vl, vla, vlax, vlr) functions. CAB's breakall relies heavily on Visual LISP so I would say - sorry! While it may be possible to re-write this to remove all the visual LISP calls (and I am not sure of that). It is not a project I am willing to take on. Quote
BIGAL Posted April 13 Posted April 13 (edited) This is well worthwhile reading for any one contemplating Mac, https://forum.bricsys.com/discussion/37045/bricscad-mac-lisp-compatibility-vla-functions I will say though the generic "MAC" platform ie non windows, still looks like it has a way to go. Not sure what MAC 2025 has in way of missing functions. Download a trial version. Edited April 13 by BIGAL Quote
Matteo Ferrari Posted April 16 Author Posted April 16 (edited) On 4/11/2024 at 8:43 PM, BIGAL said: I use "break all" no problems the issue is that the MAC version is missing some of the enhanced lisp functions, somewhere there is some details about this. It will be a VL function not working. Would need to know about MAC limitations so could at least identify which function not working. As a first I would add this (princ "\nFunction XYZ") after each (defun line where XYZ is function name you should get a lot of "function" in the text screen hopefully the last one is the one it crashes on. There are 15 defuns. That may give us a clue. Dear all, thanks for your help! @pkenewell just one doubt. I'm quite sure that I will need only the command Breakall. In this sense this is the script: ;;========================================== ;; Break all objects selected ;;========================================== (defun c:breakall (/ cmd ss) (command "._undo" "_begin") (setq cmd (getvar "CMDECHO")) (setvar "CMDECHO" 0) ;; get objects to break (prompt "\nSelect All objects to break & press enter: ") (if (setq ss (ssget '((0 . "LINE,ARC,SPLINE,LWPOLYLINE,POLYLINE,CIRCLE,ELLIPSE")))) (Break_with ss ss nil) ; ss2break ss2breakwith (flag nil = not to break with self) ) (setvar "CMDECHO" cmd) (command "._undo" "_end") (princ) ) How did you suggest to modify it? Edited April 16 by SLW210 Added Code Tags! Quote
SLW210 Posted April 16 Posted April 16 Please use Code Tags in the future. (<> in the editor toolbar) 1 Quote
pkenewell Posted April 16 Posted April 16 (edited) 1 hour ago, Matteo Ferrari said: Dear all, thanks for your help! @pkenewell just one doubt. I'm quite sure that I will need only the command Breakall. In this sense this is the script: @Matteo Ferrari The code you posted references a function called (break_with), and will not run without that function. This function contains many Visual LISP functions that won't run in the MacOS. Have you tried contacting the Author Charles Alan Butler? @CAB Edited April 16 by pkenewell Quote
SLW210 Posted April 16 Posted April 16 Not to discourage anyone, but all of the various LISPs for Breaking Objects at intersections or similar and LISPs to create new dxfs from layers all seem to use VLISP to the best of my knowledge. I am sure there is a valid reason for that. I would just forgo using a MAC unless it was setup to use AutoCAD for Windows. IMHO Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.