Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have the below LISP, but gives a duplicate key error if the property already exists.
How can I delete this property before updating the value again? (DWG_Units is created by another LISP routine)
(vl-load-com)
(setq acadObject (vlax-get-acad-object))
(setq acadDocument (vla-get-ActiveDocument acadObject))
(setq dProps (vlax-get-Property acadDocument 'SummaryInfo))
(vla-delete dProps "DWG Units")
(vla-addcustominfo dProps "DWG Units" DWG_UNITS)
John Laidler
ITO - Application Management

Please use "Accept as Solution" & give "Kudos" if this response helped you.
ITO - Application Management
Please use "Accept as Solution" & give "Kudos" if this response helped you.
Solved! Go to Solution.