Express tool Laymrg

Discussion in 'AutoCAD' started by Nate Hunter, Jan 17, 2005.

  1. Nate Hunter

    Nate Hunter Guest

    How can I pass to the AutoCAD command line the laymrg. What I am doing
    currently is:

    'set a selection set before sending the next line.
    ObjAcad.ActiveDocument.SendCommand ("laymrg") & vbCr ' Start the Layer Merge
    Express tool
    ObjAcad.ActiveDocument.SendCommand ("l") & vbCr ' Select the selection set
    passed in before
    ObjAcad.ActiveDocument.SendCommand ("oldname") 'Set the old name to merge
    from
    ObjAcad.ActiveDocument.SendCommand ("newname") 'Set the newname to merge to


    This process does not work. When I pass the laymrg to the command line
    AutoCAD does not allow me to pass the next line. It only will pass if I
    physically type it in.

    My goal is to be able to take old layers and convert them to our new company
    standards. I know I could probably use the Layer Translator that AutoCAD
    provides but for all that I am doing this will not work.

    Any Ideas??
     
    Nate Hunter, Jan 17, 2005
    #1
  2. Nate Hunter

    hendie Guest

    It would be easier to create a selection set of all objects on the specified layer, then loop through each object setting the layer property as desired
     
    hendie, Jan 17, 2005
    #2
  3. Nate Hunter

    Nate Hunter Guest

    thanks I will give it a try.
     
    Nate Hunter, Jan 17, 2005
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.