Extended data from AutoLISP

Discussion in 'AutoCAD' started by Anthony Ryan, Jul 2, 2004.

  1. Anthony Ryan

    Anthony Ryan Guest

    Hi there,

    The original code draws a pline and hatching.
    I am trying to add some extended data to it.

    The code i am using at the moment does work

    (setq lastent (entget (entlast)))
    (regapp "BOM")
    (setq exdata '((-3 ("BOM"
    (1000 . "XDATA")
    (1000 . "Testing")
    ))))
    (setq newent
    (append lastent exdata))
    (entmod newent)

    But I am trying to add some more data to it that comes from 3 integer
    variables
    (ds, da & dd) eg. This is the code to enter the value from the command
    lilne for dd variable.

    (if (= dd nil) (setq dd 1))
    (setq tmp dd)
    (princ "\Enter number of ducts deep <")
    (princ dd)
    (princ "> : ")
    (setq dd (getint))
    (if (= dd nil) (setq dd tmp))


    I wish to add these as either string (1000) or integer (1070) codes to
    the entity.

    Can someone please help. Thanks in advanced


    Anthony Ryan
     
    Anthony Ryan, Jul 2, 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.