Message 1 of 2
Modifying a blocks Custom Drawing Properties
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In preparation for an impending upgrade, we have had to develop a new title block block. This new block makes use of an external PLM software to control 'most' fields through a number of custom drawing properties. The problem is that when inserting the block into a new drawing, there doesn't appear to be a way to modify the few remaining fields through a Lisp Routine.
(defun PutCustomInfo (ID Value Index / Info Num) (and (vl-load-com) (or *acad* (setq *acad* (vlax-get-acad-object))) (or *doc* (setq *doc* (vlax-get *acad* 'ActiveDocument))) (vlax-property-available-p *doc* 'SummaryInfo) (setq Info (vlax-get *doc* 'SummaryInfo)) (setq Num (vla-NumCustomInfo Info)) (setq Index (max Index 0)) (if (> Index Num) (not (vla-AddCustomInfo Info ID Value)) (not (vla-SetCustomByIndex Info Index ID Value)) );if );and );defun
(PutCustomInfo "scale" ps 0 )
I can use the above code to modify the custom property directly in the titleblock .dwg, but not when inserted into another drawings.
Any suggestions?