Good day, fellow CAD geeks,
I've had this old simple LISP that we've run for years without issue. It takes the place of the MLEADER button and simply changes the layer for the new multileader to our default 02-ANNO layer prior to creating the multileader and then changes the layer back to whatever the current layer was before using it after the multileader is created.
However, now it will still change the layer, let me create the multileader, but then put the leader on the CURRENT layer instead of the 02-ANNO layer. I know for a fact that it starts putting the multileader on the 02-ANNO layer because it's yellow but then, when it changes the multileader's layer back to the current layer, it's white just like the current layer.Code:(defun c:TMCMLeader () (setvar "cmdecho" 0) (setvar "filedia" 0) (setq oldlyr (getvar "clayer")) (setvar "filedia" 1) (setvar "clayer" "02-ANNO") (command "MLEADER" pause pause) (setvar "clayer" oldlyr) (princ) )
This all started to happen on my new computer with AutoCAD 2025 installed.
I know the LISP is rudimentary so please be kind. There's no error checking etc. but I am very much a novice LISP guy. If you have any tweaks you think I should add, I would be more than happy to upgrade it.
Anyway, has something changed with 2025 that would force the entity back onto the current layer? Does anyone have any idea what might have changed? The file still has a date stamp of 2020 so nothing changed with the LISP.
Any help would be greatly appreciated.