Insert Macro not working as expected

Discussion in 'AutoCAD' started by tstright, Sep 13, 2004.

  1. tstright

    tstright Guest

    Using this as a button macro...

    ^C^C-layer;make;text;;_riser;cr

    This inserts a riser designation block with attributes, The information entered on the command line (Riser # and Letter) are not staying with the block, I have to edit the block.

    Any Ideas?

    Win 2000 Pro, 2005 here
     
    tstright, Sep 13, 2004
    #1
  2. tstright

    dblaha Guest

    Could you post the code that this macro calls? (ie: '_riser')

    Dave
     
    dblaha, Sep 13, 2004
    #2
  3. tstright

    tstright Guest

    I guess that would help...lol

    (defun c:riser (/ l1 scl Shape file_name ins_pt top bottom)
    (setq l1 (getvar "CVPORT"))
    (setq scl (if (= l1 1)
    1
    (getvar "ltscale")
    )
    )
    (setq Shape (getstring "\nWhat shape did you want?: "))
    (setq file_name (strcat "riser-" Shape))
    (setq ins_pt (getpoint "\nWhere do you want it?: "))
    (setq top (getstring "\nWhat is the letter designation?: "))
    (setq bottom (getstring "\nWhat number is it?: "))
    (command "insert" file_name ins_pt scl "" "" top bottom)
    )
     
    tstright, Sep 13, 2004
    #3
  4. tstright

    dblaha Guest

    The code looks fine.
    Make sure that your block is not coming in nested. When you double click on it after it is inserted, do you get an edit attribute dialog or a refedit dialog?

    Dave
     
    dblaha, Sep 13, 2004
    #4
  5. tstright

    tstright Guest

    When I first place the block, The block comes in with the default attributes. Double click on the block and I get a Enter Attributes dialog, Double click on the block a second time I get the Enhanced Attributes Editor dialog.
     
    tstright, Sep 13, 2004
    #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.