Message 1 of 6
Updating DWG Properties with AutoLisp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I made this program that takes 3 inputs for a custom DWGProps field, combines them, and then updates DWGProps accordingly. For some weird reason it seems to work fine the first few days but then I get this error:
The weird thing is if I type Regen in autocad, the dwgprops did in fact get updated. Any ideas? Code below, thanks!
(defun c:dProps ()
(setq mmIn (getstring "\n Enter Month: ")) ;Input Month
(setq ddIn (getstring "\n Enter Day: ")) ;Input Day
(setq yyIn (getstring "\n Enter Year: ")) ;Input Year
(setq dateVal (strcat mmIn "." ddIn "." yyin))
(vl-load-com)
((vla-SetCustomByKey
(vla-get-summaryinfo
(vla-get-activedocument (Vlax-get-acad-object)))
"Issue Date" dateVal ;First Field = Name // Second Field = Value
)
)
(command "-REGEN") ;Regen command to automatically show the updated props
)