Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Prickle Farmer on May 25, 2022, 02:07:27 AM
Title: New error old code
Post by: Prickle Farmer on May 25, 2022, 02:07:27 AM
Hi All. This is doing my head in. This code is nearly as old as me. It has been working for years, previously in AutoCAD and more recent years BricsCAD (v22). Now it has suddenly failed with the following error. ; ----- Error around expression ----- ; (ENTGET EN) ; ; error : Unknown Error in Lisp or CAD system or 'Stack Overflow'
With this change, you'll be able to apply sub function only to those INSERT entities that in essence have ATTRIB (s) attached - basically it'll automatically filter out XREF and all other INSERT (weather they are "dynamic" or "classic") that don't have ATTRIB (s) attached... I can only guess - you probably applied sub to those that don't have DXF '(66 . 1) - XREF or INSERT [ without ATTRIB (s) ] which is perhaps why CAD rised an error [ assuming that you previously didn't have any issues regarding this sub ]... I don't believe that very much changed in newer BricsCAD V22 in relation to AutoLISP and so on... Good thing is that you can see throwing error(s), though IMHO, VLIDE (AutoCAD) is much better for debugging purposes than BLADE (BricsCAD)...
Title: Re: New error old code
Post by: Prickle Farmer on May 25, 2022, 06:05:16 PM
Thanks Ribarm I have already filtered for (66.1) in the calling program in the ssget command. The important point for me is that this code has worked for years. The error is new.
Title: Re: New error old code
Post by: Prickle Farmer on May 25, 2022, 09:26:50 PM
Further investigation has revealed that any of my LISP routines with entget fail. There must be a conflict with new computer, new Windows 11, new v22 BricsCAD. I have logged a support ticket with BricsCAD.
Title: Re: New error old code
Post by: mhupp on May 26, 2022, 11:17:54 AM
looks like this issue has been around for a while. https://forum.bricsys.com/discussion/10780/serious-problem-with-entnext
tldr use (cons 410 (getvar 'ctab)) with your ssget to limit your selection set.
Thanks Ribarm I have already filtered for (66.1) in the calling program in the ssget command. The important point for me is that this code has worked for years. The error is new.
Is posibile this Lines failed, StartPoint of error ................<err??> (setq ed (subst (cons 1 newval) (assoc 1 ed) ed) </err??>