See the top rated post in this thread. Click here

Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Layer Merge

  1. #1
    Member
    Join Date
    2006-10
    Posts
    3
    Login to Give a bone
    0

    Question Layer Merge

    I am running ACAD 2010. When I start a new drawing everything works fine that I know of.
    But when I open an older drawing or one created in ACAD 2009 my LAYMRG command no longer works.

    Is there a variable that controls the function of that command.

    How can I ensure that my LAYMRG always works?
    Thanks.

  2. #2
    AUGI Addict
    Join Date
    2006-04
    Location
    (getpoint "Anywhere on the Enter Key =>")
    Posts
    1,160
    Login to Give a bone
    0

    Default Re: Layer Merge

    Quote Originally Posted by aubreyfrederick View Post
    I am running ACAD 2010. When I start a new drawing everything works fine that I know of.
    But when I open an older drawing or one created in ACAD 2009 my LAYMRG command no longer works.

    Is there a variable that controls the function of that command.

    How can I ensure that my LAYMRG always works?
    Thanks.
    I have no problem with "laymrg". It works fine.
    Can you attach the messages on your text screen?

  3. #3
    Member
    Join Date
    2006-10
    Posts
    3
    Login to Give a bone
    0

    Default Re: Layer Merge

    Quote Originally Posted by BoKirra View Post
    I have no problem with "laymrg". It works fine.
    Can you attach the messages on your text screen?
    it doesn't show any warning...it just does nothing. It doesn't run the command at all.
    But if I start a new drawing it works fine.

  4. #4
    100 Club
    Join Date
    2008-08
    Location
    Vancouver, BC
    Posts
    105
    Login to Give a bone
    0

    Default Re: Layer Merge

    I am bumping this unsolved thread as I am having the same problem.

    I am using LAYMRG in a lisp and it works on some old drawings but not on others, opened in the same session of Autocad 2010. So it appears to be a drawing problem.

    Here is my routine: (the layers DO EXIST on all the drawings)

    Code:
    (setq OLDLAY "LAY_1")
    (setq NEWLAY "LAY_2")
    (command "-laymrg" "N" OLDLAY "" "N" NEWLAY "y")
    It does the merge fine on some but on others, it runs but brings up:

    Selected layers: LAY_1.Unknown command "Y". Press F1 for help.
    nil


    Is there some sort of variable causing this? I checked EXPERT, QAFLAGS and CMDDIA and they are the same on all drawings.

  5. #5
    100 Club
    Join Date
    2008-08
    Location
    Vancouver, BC
    Posts
    105
    Login to Give a bone
    0

    Default Re: Layer Merge

    I forgot to mention that the LAYMRG command does NOT work also when used at the command line or Menu on those specific drawings.

  6. #6
    100 Club
    Join Date
    2008-08
    Location
    Vancouver, BC
    Posts
    105
    Login to Give a bone
    0

    Default Re: Layer Merge

    I seem to have isolated the problem with a particular block - if the block is present in the drawing, LAYMRG will not work, even if the block is not part of the merge.

    when run from the command line, LAYMRG asks for the block, and that is it, it stops without a message here is the result:

    Command: laymrg
    Select object on layer to merge or [Name]:
    Selected layers: AAA_OBJECT.
    Command:

    When I erase AND purge the block, LAYMRG works fine!

    Attached is a drawing where the problem occurs: the offensive block is the frame, called "tbi-frame-d1". Anyone have any ideas why this happens?

    Thanks.
    Attached Files Attached Files

  7. #7
    100 Club
    Join Date
    2003-06
    Location
    North Dallas
    Posts
    168
    Login to Give a bone
    0

    Default Re: Layer Merge

    I was able to replicate your error. I believe there is something wrong with the titleblock. I exploded and redefined the block with the same name and reinserted on the same layer. I did not purge or delete any objects. It may be prudent to look through the block definition and see if there are any empty text objects or maybe xdata that is causing the problem.
    Attached Files Attached Files

  8. #8
    100 Club
    Join Date
    2003-06
    Location
    North Dallas
    Posts
    168
    Login to Give a bone
    0

    Default Re: Layer Merge

    upon a little more testing, if you run AUDIT on that drawing you get 112 errors. Oddly enough that block has 112 objects...After running the audit, the objects in the frame are put on a AUDIT_BAD_LAYER layer. Yet further evidence of a bad block. If you redefine the block the problem is fixed.

  9. #9
    100 Club
    Join Date
    2008-08
    Location
    Vancouver, BC
    Posts
    105
    Login to Give a bone
    0

    Default Re: Layer Merge

    Thanks greatly for your help MVSawyer. I followed your suggestions, exploded the border and checked for empty text objects - none found using the 2010 Purge option. I checked for extended data on each of the 112 objects with the Express Tools, none found.

    I knew that redefining the block solved the problem, but my problem is I have hundreds of drawings a client needs to change layer names, and this block problem is on who knows how many other blocks of different names (I found several), so redefining is not an option.

    Oddly enough the CAD standards Layer Mapping DOES work and transfers to layers I choose. I will have to use this, but my idea was to use LAYMRG because I can us it in a lisp and do a bunch of other stuff at the same time with the drawings.

    Another thing I just discovered, REFEDIT does not work on this block. I just wonder what is wrong with it? The AUDIT_BAD_LAYER does not make sense to me, all objects were on layer zero.

  10. #10
    100 Club
    Join Date
    2003-06
    Location
    North Dallas
    Posts
    168
    Login to Give a bone
    0

    Default Re: Layer Merge

    Yes, I also came across Refedit not working. I've noticed this with blocks created in older versions of AC. Maybe you can Audit your drawing, then merge the bad layer to 0 and visually everything goes back to normally. You could make a script or quick lisp that does that. I'm just as befuddled as you as to why this is happening.

    Now, I did some more checking and after the audit I get 212 "Invalid layer eNullObjectId." That's once for each object in the definition. Before the audit the layer name for each entity is "0" which just does not make sense as to why it would be bad, null, or whatever AC10 doesn't like.

    It just don't make no sense!

    Code:
    (command "audit" "y")
    (command "laymrg" "n" "$AUDIT-BAD-LAYER" "" "N" "0" "Y")

Page 1 of 2 12 LastLast

Similar Threads

  1. Layer Merge in Layer Property Manager
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 6
    Last Post: 2013-05-16, 03:32 AM
  2. Layer merge within layer manager dialog
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 2
    Last Post: 2012-07-19, 10:36 AM
  3. layer merge - batch
    By dhsnyder in forum AutoLISP
    Replies: 0
    Last Post: 2007-07-17, 08:15 PM
  4. Problem after using layer merge?
    By Wanderer in forum Dynamic Blocks - Technical
    Replies: 11
    Last Post: 2006-03-07, 10:42 PM
  5. Merge Layer help
    By BCrouse in forum AutoLISP
    Replies: 12
    Last Post: 2005-04-26, 11:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •