Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Guys,
I have this little lisp to set author to dwgprops. How can I automate it such that when I start new drawing this lisp runs. I've tried to add it to ACADDOC, but there is no effect. Does there need to be some kind of timer to send data to DWGPROPS after drawing started and everything is loaded? Thx
(defun c:setauthorprop ()
(vl-load-com)
(setq acadObject (vlax-get-acad-object))
(setq acadDocument (vla-get-ActiveDocument acadObject))
;;Get the SummaryInfo
(setq dProps (vlax-get-Property acadDocument 'SummaryInfo))
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq propvalue (vla-get-summaryinfo doc "Author"))
(setq name (strcat propvalue ", " (getenv "USERNAME")))
(vla-put-summaryinfo doc "Author" name)
(princ)
)
Solved! Go to Solution.