Author Topic: can a lisp program be a reason for layers to become corrupted?  (Read 2087 times)

0 Members and 1 Guest are viewing this topic.

Red Nova

  • Newt
  • Posts: 69
Hello,
I am not sure, but have doubts that some of my recent lisps are causing this bug.
Some duplicate layers started to upper in my files. This can happen 1-2 times a day, but I cannot track which operation is causing this.
Duplicate layers start with real layer's name + @8, @48, ... See attached screenshot.
At the same time some objects that are affected show no layer at all in properties (blank). After merging layers and running audit $AUDIT-BAD-LAYER is created with problematic objects on it.
All of the affected objects are dynamic blocks (annotative).
I assumed this is due to a corrupted file, but other files also started to do the same.
I used an object reactor recently + reactor for layers from Lee Mac.
Also some of lisp that we use change layers sometimes.
Anybody seen this kind of behavior before? Might any lisp cause that?

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: can a lisp program be a reason for layers to become corrupted?
« Reply #1 on: May 16, 2017, 12:13:54 PM »
Avoid special characters in layer names, especially the standard "wildcard characters".  Wildcard matches are used to internally sort and filter the list by name, so when those characters are present they throw things for a loop.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

Red Nova

  • Newt
  • Posts: 69
Re: can a lisp program be a reason for layers to become corrupted?
« Reply #2 on: May 16, 2017, 12:23:43 PM »
I do not have any "wildcard character" in layer names. "@" that you see was created when file went corrupted.
Initial layer was "BMP-Annotation".

ronjonp

  • Needs a day job
  • Posts: 7527
Re: can a lisp program be a reason for layers to become corrupted?
« Reply #3 on: May 16, 2017, 12:46:23 PM »
I do not have any "wildcard character" in layer names. "@" that you see was created when file went corrupted.
Initial layer was "BMP-Annotation".
I'd guess it's somewhere in your code .. I've never seen layer names rename themselves.  :?

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: can a lisp program be a reason for layers to become corrupted?
« Reply #4 on: May 16, 2017, 12:47:52 PM »
I used an object reactor recently + reactor for layers from Lee Mac.

Nothing to do with my programs.

Crank

  • Water Moccasin
  • Posts: 1503
Re: can a lisp program be a reason for layers to become corrupted?
« Reply #5 on: May 20, 2017, 08:39:28 AM »
This is because the drawing was saved in a version before the Acad2007-format.
Annotative scales were introduced in Acad2008. The names with @ in it represent the annotative scales because of backward compatibility.
Vault Professional 2023     +     AEC Collection

Red Nova

  • Newt
  • Posts: 69
Re: can a lisp program be a reason for layers to become corrupted?
« Reply #6 on: June 21, 2017, 03:42:21 PM »
Sorry for abandoning the thread. Thanks everybody for their replies.
My vocation postponed me from understanding the reason sooner.
I was one by one removing all recent additions to my AutoCAD and testing it.
Eventually looks like I found what was causing the issue.
When I replaced recent dynamic blocks that I used for tagging mentioned errors stopped happening.
I assume something in a block definition was the reason.
I hope this post might help someone who face a similar issue in future.

tedg

  • Swamp Rat
  • Posts: 811
Re: can a lisp program be a reason for layers to become corrupted?
« Reply #7 on: June 22, 2017, 07:07:48 AM »
Sorry for abandoning the thread. Thanks everybody for their replies.
My vocation postponed me from understanding the reason sooner.
I was one by one removing all recent additions to my AutoCAD and testing it.
Eventually looks like I found what was causing the issue.
When I replaced recent dynamic blocks that I used for tagging mentioned errors stopped happening.
I assume something in a block definition was the reason.
I hope this post might help someone who face a similar issue in future.

Did you see Crank's post?
ThThis is because the drawing was saved in a version before the Acad2007-format.Annotative scales were introduced in Acad2008. The names with @ in it represent the annotative scales because of backward compatibility.

Is it possible that the dynamic blocks you speak of had annotative scales assigned to them, and that was the proble
m?

Windows 10 Pro 64bit, AutoCAD 2023, REVIT 2023

Red Nova

  • Newt
  • Posts: 69
Re: can a lisp program be a reason for layers to become corrupted?
« Reply #8 on: June 22, 2017, 09:17:02 AM »
ThThis is because the drawing was saved in a version before the Acad2007-format.Annotative scales were introduced in Acad2008. The names with @ in it represent the annotative scales because of backward compatibility.

Quote
Is it possible that the dynamic blocks you speak of had annotative scales assigned to them, and that was the proble[/size][/font]m?

Dynamic blocks had annotative scales. And I assume error is somehow connected to that. @8, @48, @64, all these numbers that were added to created layer names correspond to annotative scale factors of imperial scales that we use. Also those duplicate layers are created during saving.
But I only save drawings in 2013 format... Besides this I work in this environment for many months, using similar annotative dynamic blocks, same scales and same saving settings, but the problem occurred only after I was inserting some certain block into the file. Recreated those blocks from scratch and looks like now the error is gone.
Maybe combination of some error in the block and the fact that I am using annotative scales caused this error...
« Last Edit: June 22, 2017, 09:21:47 AM by Red Nova »