Changing dwg-properties with vlisp

Discussion in 'AutoCAD' started by virtualvisioneer, Mar 17, 2005.

  1. Hi,

    I try to write a little lisp-routine to change the properties of a dwg-file
    in AutoCAD2000
    (Like "author" "title" a.s.o)

    I tried it with this:

    (defun setdwgprop (propnum propcon / propnew proplist)

    (setq proplist (entget (cdr(car(cdr (member (cons 3 "DWGPROPS")(entget
    (namedobjdict)))))))

    (setq propnew (subst (cons propnum propcon) (assoc propnum proplist)
    proplist))

    (entmod propnew)

    (princ)
    ) ;_ enddefun

    propnum= DXF-Number of the property, propcon= the new entry as string

    But first: There must be a bug somwhere. Insteat of modifying the entity it
    appends the data to old entity-list, so the entitylist of the dwgprops grows
    each time I use the routine.
    Second: This routine doesn´s work in Acad2002 and newer.....

    Does anyone have a little hint for me?

    Thanks
    Christian
     
    virtualvisioneer, Mar 17, 2005
    #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.