Re: Filling a block attribute value?

G Long wrote:


Grab LTEXT.VLX from http://www.dotsoft.com/freestuff.htm .
Terry
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Try this, making sure you put your border block name on line 4. I used DWG# as the attribute, you can substitute your own name.
BC
;;Update Border title number to match file no. ;;BRC 17 July 00 ;;--------------------------------------------
(defun c:ud-dwgno (/ FILE# DWG# TTLSS DWGTTL DWG#AT DWG#OLD) (setq FILE# (getvar "dwgname")) (setq DWGNO (substr FILE# 1 (- (strlen FILE#) 4))) (setq TTLSS (ssget "X" '((2 . "Your-block-name")))) (if TTLSS (progn (setq DWGTTL (ssname TTLSS 0)) (setq DWG#AT (entget DWGTTL)) (while (/= "DWG#" (cdr (assoc 2 DWG#AT))) (setq DWGTTL (entnext DWGTTL)) (setq DWG#AT (entget DWGTTL)) (setq DWG#OLD (cdr (assoc 1 DWG#AT))) ) (if (= DWG#OLD DWGNO) (princ "\n No Change. File No. and drawing No. already match.") (progn (setq DWG#AT (subst (cons 1 DWGNO) (assoc 1 DWG#AT) DWG#AT)) (entmod DWG#AT) (entupd DWGTTL) (princ (strcat "\n Drawing No. updated to " DWGNO ".")) ) ) ) (alert "\n Border block not found!") ) (princ) )
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.