Attaching en editting Object data from Autocad Map with a LISP-routine

Discussion in 'AutoCAD' started by Ed, Nov 27, 2004.

  1. Ed

    Ed Guest

    Hoi Everyone,

    I'm looking for a possibility to attach and edit object data in my drawing
    with behalve of a lisp routine. Now there are four tables which I have to
    attach to one single object and then I also have to edit the four tables to
    that same object. So, a total of 8 times a command, selecting and give
    input. Whay to much work since there are hundreds or even more objects to
    do.
    What I have in mind is to create an extra command and where I ask for four
    values and then to select one object. The LISP routine should attach the
    four tables to the object and then also include (edit) the given values to
    that object.
    I've tried several possibilities, amongst:

    (defun C:AD ()
    (setvar "cmddia" 0)
    (setvar "cmdecho" 0)
    (setq PL (ssget))
    (COMMAND "ADEATTACHDATA" AVRnmr A Y PL X)
    (princ)
    )

    (defun C:ED ()
    (setq AVRnummer (getstring "\nWat is het AVRnummer van de aanvraag?
    "))
    (setq Bouwkosten (getreal "\nWat zijn de Bouwkosten van de aanvraag?
    "))
    (setq Oppervlakte_NA (getreal "\nWat is de oppervlakte NA de verbouwing?
    "))
    (setq Inhoud_NA (getreal "\nWat is inhoud NA de verbouwing? "))
    (princ)
    )

    But Autocad keepes coming back with errors. Does anyone knows what I'm doing
    wrong? Is it not possible for me to include the commands ADEATTACHDATA and
    ADEEDITDATA in my LISP-routine?

    Please, let me know.

    Kind regards,

    Ed Prop.
     
    Ed, Nov 27, 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.