Переписать файл блока с комментариями
(defun ru-block-rewrite-with-comment (file_name comment base_point selection)
(if (dos_openp file_name)
(progn
(ru-msg-alert
(strcat
"
Файл "
file_name
"
сейчас нельзя переписать, он открыт!"
) ;_ end of strcat
) ;_ end of ru-msg-alert
nil
) ;_ end of progn
(progn
(princ (strcat "
Записываю "
file_name
(if (/= comment "")
(strcat "
["
comment
"]"
) ;_ end of strcat
) ;_ end of if
"
"
) ;_ end of strcat
) ;_ end of princ
;;; Так через ActiveX, но без точки вставки
;;; (if
;;; (setq vla_sset_obj (ru-ss-to-named-vla-sset selection "RU_WBLOCK_SSET"))
;;; (vla-wblock (ru-obj-get-active-document) file_name vla_sset_obj)
;;; ) ;_ end of if
(command "_.WBLOCK" file_name)
(if (findfile file_name)
(command
"_Y"
) ;_ end of command
) ;_ end of if
(command ""
base_point
selection
""
) ;_ end of command
(ru-file-write-dirinfo-file-comment file_name comment)
t
) ;_ end of progn
) ;_ end of if
) ;_ end of defun