divide by 1000

Discussion in 'AutoCAD' started by spencer1971, Sep 29, 2004.

  1. spencer1971

    spencer1971 Guest

    I have the following lisp to insert a block with the "y" valus as an attribute.

    How can I divide elevtext by 1000 prior to writing as text
    (we draw in mm but this level should read in meters..)

    (defun c:levtext (/ blkpt elevtext sc1)
    (setq blkpt (getpoint "\nselect point for level"))
    (setq elevtext (rtos (cadr blkpt) 2 3))
    (setq sc1 (getvar "dimscale"))
    (command "-insert" "2_level" blkpt sc1 sc1 "0" elevtext "")
    )

    Any help would be great

    Spencer
     
    spencer1971, Sep 29, 2004
    #1
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.