Give me dimension

Discussion in 'AutoCAD' started by Adesu, Aug 2, 2004.

  1. Adesu

    Adesu Guest

    Please give me program lisp for to put dimension (dimlinear) in my program,I
    want learn it.don't add user input to select extention line,I mean autolisp
    automatic do it,thanks for your help
    Best regards
    Ade Suharna

    ; md is stand for making dimension
    ; Design by Ade Suharna
    ; 2 August 2004
    ; edit by
    (defun dtr (a)
    (* pi (/ a 180.0)))
    (defun c:md (/ )
    (setq oldosmode (getvar "osmode")) ; get osmode setting
    (setvar "osmode" 0) ; osmode set to 0
    (setq oldcmdecho (getvar "cmdecho")) ; get cmdecho setting
    (setvar "cmdecho" 0) ; cmdecho set to 0
    (vl-load-com)
    (setq p1 (list 0 0)
    p2 (list 10 0)
    p3 (list 10 15)
    p4 (list 0 15))
    (command "_line" p1 p2 p3 p4 "c" "")




    (setvar "osmode" oldosmode) ; return setting
    (setvar "cmdecho" oldcmdecho) ; return setting
    (princ)
    (command "_redraw")
    )
     
    Adesu, Aug 2, 2004
    #1
  2. Adesu

    Adesu Guest

    Hi I've got it

    (setq p1 (list 0 0)
    p2 (list 10 0)
    p3 (list 10 15)
    p4 (list 0 15))
    (command "_line" p1 p2 p3 p4 "c" "")
    (setq ent3 (list 15 15))
    (command "_dimlinear" p2 p3 "v" ent3 "")
    ;----------------------------------------------------------
     
    Adesu, Aug 3, 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.