0 Members and 1 Guest are viewing this topic.
(defun _AddSuffixToTableEntries ( table suffix / pattern table_name old_name new_name ) (setq pattern (strcase (strcat "*" suffix)) table_name (substr (vla-get-objectname (vla-item table 0)) 5) table_name (substr table_name 1 (- (strlen table_name) (strlen "TableRecord"))) ) (vlax-for entry table (princ (strcat "\n" table_name " \"" (setq old_name (vla-get-name entry)) "\" " (if (wcmatch (strcase old_name) pattern) "<no need to rename>" (if (vl-catch-all-error-p (vl-catch-all-apply 'vla-put-name (list entry (setq new_name (strcat old_name suffix))) ) ) "<cannot rename>" (strcat "renamed to <\"" new_name "\">") ) ) ) ) ) (princ))
(vl-load-com)(_AddSuffixToTableEntries (vla-get-dimstyles (vla-get-activedocument (vlax-get-acad-object))) "_WTF")