Adding Text to a Dimension in Lisp

Discussion in 'AutoCAD' started by dcouch, Nov 4, 2004.

  1. dcouch

    dcouch Guest

    I am trying to select a piece of text in the drawing, setting that text to the variable "new", and then using the _dimlinear command, selecting the first and second points for the dimension, inputting a "T" for text and then having the command read the variable "new" to put the text into the dimension as a text override.
    ie. (command "_dimlinear" pt1 pt2 "T" new) and then place the dimension.
    However, the command reads the new as the text string "new" and does not read the contents of the variable. Is there a way to get the command to read the variable instead of the literal text??
     
    dcouch, Nov 4, 2004
    #1
  2. dcouch

    LUCAS Guest

    (setq NEW (cdr (assoc 1 (entget (car (entsel "\Select Text: "))))))
    (setvar "cmdecho" 1)
    (command "_dimlinear" PAUSE PAUSE "T" NEW PAUSE)

    the variable "new", and then using the _dimlinear command, selecting the
    first and second points for the dimension, inputting a "T" for text and then
    having the command read the variable "new" to put the text into the
    dimension as a text override.
    read the contents of the variable. Is there a way to get the command to
    read the variable instead of the literal text??
     
    LUCAS, Nov 4, 2004
    #2
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.