Цитата из "САПР на базе AutoCAD. Как это делается"
(defun ru-dwgprops-get-by-summary-info
(/ summary_info result i)
(ru-error-catch
'(lambda ()
(setq summary_info
(vlax-get-property
(vla-get-activedocument (vlax-get-acad-object))
"SummaryInfo"
) ;_ end of vlax-get-property
result
(cons
(cons 7 (vla-get-keywords summary_info))
(cons
(cons 6 (vla-get-comments summary_info))
(cons
(cons 4 (vla-get-author summary_info))
(cons (cons 3 (vla-get-subject summary_info))
(cons (cons 2 (vla-get-title summary_info)) result)
) ;_ end of cons
) ;_ end of cons
) ;_ end of cons
) ;_ end of cons
i 0
) ;_ end of setq
(repeat (vlax-invoke-method summary_info 'NumCustomInfo)
(vla-getcustombyindex summary_info i 'CustomName 'CustomValue)
(setq result
(cons (cons (+ 300 i) (strcat CustomName "=" CustomValue)) result)
i (1+ i)
) ;_ end of setq
) ;_ end of repeat
(reverse result)
) ;_ end of lambda
'(lambda (err_msg)
(ru-msg-print
(strcat "\nRU-DWGPROPS-GET-BY-SUMMARY-INFO: Ошибка чтения свойств\n")
err_msg
1
) ;_ end of ru-msg-print
nil
) ;_ end of lambda
) ;_ end of ru-error-catch
) ;_ end of defun
Пользоваться надо с умом, желательно дублируя в словаре. В 2004 имеется грубая ошибка в команде DWGPROPS - после ручного редактирования изменения свойств не видны объекту SymmaryInfo, пока рисунок не будет сохранен, закрыт и открыт заново.
"Ну, тупые!" (C) М.Задорнов