menu customisation

Discussion in 'AutoCAD' started by Philip Russell, Nov 5, 2003.

  1. Hi All,

    I am customizing a menu to find current layer, insert door on appropriate
    layer, ability to rotate door to user requirements and return user to the
    previous current layer.

    I have achieved all the above except to allow the user to rotate the door
    upon insertion. When I remove a semi colon the user is prompted to rotate
    but the current layer isn't returned to the previous before command was
    invoked.

    [Doorslides(DD-1840-64wall,DD-1840-64wall)]^C^C^P(setq orig-lay(getvar
    "clayer"))(prin1);attdia;1;-layer m D-DOOR;c;2;;;-insert "K:/Ref/AutoCAD
    Customisation/Library/Doors/DD-1840-64wall.dwg";\1;1;0;-layer s
    !orig-lay;;;;

    I would really appreciate some help to achieve my goal.

    Thanks,

    Phil
     
    Philip Russell, Nov 5, 2003
    #1
  2. Philip Russell

    JP Guest

    Use a "\" at the rotation angle.
    You already use it ay the insert point.

    Jan
     
    JP, Nov 5, 2003
    #2
  3. Hi Jan,

    I have tried that and yes it allows the user to rotate the door but doesn't
    return you to the current layer before the command was executed.

    Thanks,
    Phil


     
    Philip Russell, Nov 5, 2003
    #3
  4. Philip Russell

    JP Guest

    Strange, in my command sequence it does return to the desired layer.
    I use this:
    ^c^c-LAYER;M;INSDET;C;7;insdet;;-insert;(strcat pad3
    "dsn_leid");\;;\-LAYER;set;pen1;;
    works perfect.
    I'll try your sequence, see how that works.

    Jan

     
    JP, Nov 6, 2003
    #4
  5. Philip Russell

    JP Guest

    Back again.
    Tried your menu line, it works!
    This is it:
    ^C^C^P(setq
    orig-lay(getvar"clayer"))(prin1);attdia;1;-layer;m;D-DOOR;c;2;;;-insert
    (strcat pad3 "dsn_leid");\1;1;\-layer;s;!orig-lay;;;;

    Replace the '(strcat pad3 "dsn_leid")' with your block name.
    Let me know if it works for you.

    Jan

     
    JP, Nov 6, 2003
    #5
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.