I can see the command appearing on the on the command line and when I open the text window I can see that it executed but the saved copies of the block drawings are not zoomed to extents. Now the question I have is that I inserted a line to ZOOM "E" after it changed the variables. And it is.changing all the blocks one by one to be the same as far as these variables are concerned. No problem, I have some other machines I can tinker with while this does its work.and yes, I set it up on a test folder first and ran it to be sure it's doing what we expect. The CPU is tied up apparently doing all the opening and closing of files. I can click the mouse and get some actions but as far as typing in an address in IE to look at some other information, it will not allow that. It takes all the keystrokes and focuses them into the AutoCAD window. Although I notice that when it runs I can forget about doing anything else with my computer. So far so good and in the meantime it's cranking on that big list of blocks and changing all of them to be uniform now. I'm studying it line by line to understand how the author made it work. This program is an excellent example of some of the more in depth properties of VLISP. I was wondering if you could help me a little more with this. (prompt "\nUnable to interface with ObjectDBX.Thanks Lee-Mac. (or (null dbx) (vl-catch-all-error-p dbx)) "objectdbx.axdbdocument" (strcat "objectdbx.axdbdocument." (itoa vrs)) (if (< (setq vrs (atoi (getvar 'acadver))) 16) (vl-catch-all-apply 'vla-getinterfaceobject (setq dwl (cons (cons (strcase (vla-get-fullname doc)) doc) dwl)) (vlax-for doc (vla-get-documents (setq app (vlax-get-acad-object))) (defun LM:GetDocumentObject ( dwg / app dbx dwl err vrs ) It is the callers responsibility to release such object. The Document Object may be present in the Documents collection, or obtained through ObjectDBX. Retrieves the VLA Document Object for the supplied filename. (prompt (strcat "\nThe drawing \"" dwg "\" was not found or could not be accessed.")) (if (and (setq val (cdr (assoc (strcase (vla-get-tagstring att)) lst))) (foreach att (vlax-invoke obj 'getattributes) (= :vlax-true (vla-get-hasattributes obj)) (if (and (= "AcDbBlockReference" (vla-get-objectname obj)) (if (setq doc (LM:GetDocumentObject dwg)) (defun LM:DBXAttChange ( dwg lst / doc flg val ) R&D\\Delet Group LispDBXapi\\7-EU-FE-48-AC-CIOC-SA - Copy.dwg"
I would personally write your code in the following way: (defun c:test ( ) To offer you an alternative for this task, you could make use of my ObjectDBX Wrapper function, which provides a way to evaluate a given function on another drawing or set of drawings, without opening such drawings in the AutoCAD Editor.
You are using strcase to convert a literal uppercase string P_TAG1 to uppercase, and then comparing this uppercase string to a string which may or may not be uppercase - I believe this line should be: (= (strcase (vla-get-tagstring upc_att)) "P_TAG1")