AutoLisp access to drawing database

Discussion in 'AutoCAD' started by Joe, May 15, 2004.

  1. Joe

    Joe Guest

    I need to get into the data stored in the drawing database of any
    drawing (autocadMap 2000i). More specifically I need to get into the
    Named Objects Dictionary and then into the ACAD_IMAGE_DICT dictionary
    within that. I have LISP experience, but not in this area. Can anyone
    assist me here? Can anyone , at least, tell me about access to the
    dictionaries in the database? Thanks, Joe
     
    Joe, May 15, 2004
    #1
  2. Joe

    Jeff Guest

    This should get you started....this is taken from a routine I wrote to
    remove any unreferenced images.

    (setq id (dictsearch (namedobjdict) "acad_image_dict"))
    (setq symlst (massoc 3 id))
    (setq enamelst (massoc 350 id))

    and here is the (massoc) function that has been posted in many places:


    (defun massoc (key alist / x nlist)
    (foreach x alist
    (if (eq key (car x))
    (setq nlist (cons (cdr x) nlist))
    )
    )
    (reverse nlist)
    )

    HTH,
    Jeff
     
    Jeff, May 15, 2004
    #2
  3. Joe

    Joe Guest

    Thanks, Jeff. That looks like exactly what I need. I could get to
    the database area, but was unable to really get into the data other
    than build a list.

    ** JOE **
     
    Joe, May 18, 2004
    #3
  4. Joe

    BRC Guest

    Are you looking to export data from a drawing to Access, such as title block
    information? I wrote a program that does that with a combonation lisp and
    VBA.

    BRC
     
    BRC, May 25, 2004
    #4
  5. Joe

    Joe Guest

    Actually I am in the need of a way to send info back and forth to an
    Access database.I have looked at something called ADOLISP and it may
    solve the issue, but I would be pleased to see what you have. Thanks,
    Joe
     
    Joe, Jun 2, 2004
    #5
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.