autocad newsletter lisp help

Discussion in 'AutoCAD' started by pmsrefugee, Feb 24, 2004.

  1. pmsrefugee

    pmsrefugee Guest

    In the recent issue of there is a lisp routine to add
    a second line of text to a dimension. It adds \X to the dimension.
    Unfortunately, it also resets any dimension text overrides to the default
    <>. Is there a way to edit the lisp so when it executes the dimedit command
    .... new... that the cursor can move to the end (or right of the text in the
    dialog box) to place "line2" after any text overrides done to the default
    dimension? (I know it is not a good idea to override the default values, but
    sometimes it is necessary for rough drawn details)

    (defun c:stl (/ line1 line2)
    (setq line1 (getstring T "\nType Second Line for Dimension: "))
    (if (= line1 nil)(command))
    (setq line2 (strcat "<>" "\\X" line1))
    (command"dimedit" "n" line2)
    )
     
    pmsrefugee, Feb 24, 2004
    #1
  2. pmsrefugee

    m Guest

    Thanks, it worked great. I only wish it would replace any previous \X text
    with update text (right now the routine adds new text onto the previous \X
    text. Thanks, again!!
    Mike
     
    m, Feb 25, 2004
    #2
  3. pmsrefugee

    m Guest

    Yo da man!
    Mike
     
    m, Feb 25, 2004
    #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.