Copy and Rename Layer LISP Causes "*Warning* Multiply owned object"

Copy and Rename Layer LISP Causes "*Warning* Multiply owned object"

Anonymous
Not applicable
700 Views
6 Replies
Message 1 of 7

Copy and Rename Layer LISP Causes "*Warning* Multiply owned object"

Anonymous
Not applicable

I wrote this LISP for Land Desktop 2005 and since moved on to a new company using C3D 2021.  The program still works, but it generates multiple object handle warnings - lots of them! Any suggestions to fix the LISP would be appreciated.

0 Likes
Accepted solutions (1)
701 Views
6 Replies
Replies (6)
Message 2 of 7

dbroad
Mentor
Mentor

Did you check if layers with the new names already existed?

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 3 of 7

Anonymous
Not applicable

That's always a good thing to check! I didn't do that in this one, but the errors still happen regardless.  I tested the LISP in a brand new dwg, so none of the new layers created already existed. Yet I got the same errors, just fewer (35 vs 86).

0 Likes
Message 4 of 7

CADaSchtroumpf
Advisor
Advisor

Try to remove the pointed pair (5 . "XXX...") from the list before use (entmake).

0 Likes
Message 5 of 7

Kent1Cooper
Consultant
Consultant

@CADaSchtroumpf wrote:

Try to remove the pointed pair (5 . "XXX...") from the list before use (entmake).


I don't think that can be the problem.  From Help for (entmake):

 

If the elist contains an entity handle, entmake ignores that....

Kent Cooper, AIA
0 Likes
Message 6 of 7

CADaSchtroumpf
Advisor
Advisor

@Kent1Cooper : You are right!

Then I suggest to identify the problem with the log prompt and try (entget (handent "D13"))

With this we can see the entitie or object non graphical (dictionnary or other) who can interfer

 

0 Likes
Message 7 of 7

Anonymous
Not applicable
Accepted solution

I found another way to do this, thanks to dlanorh over at CADTutor. I used his code for mapping existing layer properties to new layer names, then customized it to allow the user to search and replace part of an existing layer name with a new prefix. See attached. No more errors!

0 Likes