<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Script or lisp program for as-built drawing package in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11548215#M38322</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13147215"&gt;@gv6823otG42ZL&lt;/a&gt;&amp;nbsp; hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;check this AUTOMOD (Auto Modify) command but hey, do not rush&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt; read all the instructions first.&lt;/P&gt;&lt;P&gt;for your requests 1+2+3 the command answer them very easily.&amp;nbsp;request 4 was not easy challenge. in order it to work you need to specify the user defined information for revattr block, so this is implement as a lsp file which it content is like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;(setq newRevData &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp;'( ("revno" . "") ; place holder&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ("date" . "6-10")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ("revision1" . "revision1")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;("revision2" . "revision2")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;("revision3" . "revision3")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;("revby" . "revby")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;("appdby" . "appdby")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; ); list&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;); setq&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;first open notepad than copy &amp;amp; paste this content in and save it in your document folder by the name of revdata.lsp you can save it with any name you like as long it's type must be lsp. (remember that name)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;the data format is a list of dotted pairs items. each item holds 2 data strings, the first is &lt;STRONG&gt;TAG&lt;/STRONG&gt; name and the second is the tag&amp;nbsp;&lt;STRONG&gt;VALUE&lt;/STRONG&gt;. the 2 strings are &lt;SPAN&gt;separate by dot "." (that's what dotted pairs means) you need to fill &lt;STRONG&gt;only&lt;/STRONG&gt; the second data strings with the new revattr info.&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#003300"&gt;&lt;SPAN&gt;make sure you do not mess the format every character is important here. each data string must start and end with double&amp;nbsp;apostrophe.&amp;nbsp; the first dot pair ("revno" . "") is just place holder do not fill or delete it.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;in your script program you need to load revdata.lsp along with automod.lsp each drawing you open.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;the command starts with defining some constant variables, i'm talking about your blocks names the title block the P.E block, revattr block and the layer "rev current".&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;; define const for blocks name
 (setq TITLEBLK "tad15")
 (setq PEBLK    "Certification MN-Appd")
 (setq REVBLK   "revattr")
 ; const for revision layer
 (setq REVLAY   "rev current")
 ; get attribute tag from block definition
 (setq TAGS (get_attrib_def))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;if in future you need to change these names, you can easily change them here and the command will still work.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;also there is a TAGS variable which holds a list of tags name. these tag name is read directly from the block (revattr) definition. in future if you decide to add more attribute or change some, automod will read these changes and still work. note that you will have to sync these change with the content (tag names) in revdata.lsp.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;now for the script:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;two weeks ago a member of this forum ask about scripts i suggest you to look at it&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/replace-text-in-multiple-dwg-and-also-change-color-of-text/td-p/11520784" target="_blank" rel="noopener"&gt;&amp;gt;&amp;gt; HERE &amp;lt;&amp;lt;&lt;/A&gt;&amp;nbsp;message #6 of 11&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;also look at&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1137264"&gt;@paullimapa&lt;/a&gt;&amp;nbsp; advice on how to create the script.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;enjoy&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;Moshe&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(vl-load-com) ; load ActiveX support

; auto modifications
(defun c:automod (/ _dat get_attrib_def getAttribValue setAttribValue process_data 	; local functions
		    upadte_revision_data shift_attribute_data update_revision_blocks 	; local functions
		    TITLEBLK PEBLK REVBLK REVLAY TAGS ss ent rev data^)
  
 ; anonymous function
 (setq _dat (lambda () (mapcar (function (lambda (d) (cdr d))) newRevData))) 

 (defun get_attrib_def (/ blocks lst)
  (setq blocks (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))))

  (vlax-for AcDbEntity (vla-item blocks REVBLK)
   (if (eq (vla-get-objectName AcDbEntity) "AcDbAttributeDefinition")
    (setq lst (cons (vla-get-tagString AcDbEntity) lst)) 
   )

   (vlax-release-object AcDbEntity)
  ); vlax-for

  (vlax-release-object blocks)

  (reverse lst)
 ); get_attrib_def

  
 (defun getAttribValue (ent tag / val)
  (if (not
        (vl-catch-all-error-p
              (setq val (vl-catch-all-apply 'getPropertyValue (list ent tag)))
        )
      ); not
   val
  ); if
 ); getAttribValue

  
 (defun setAttribValue (ent tag val)
  (not
    (vl-catch-all-error-p
        (vl-catch-all-apply 'setPropertyValue (list ent tag val))
    )
  ); not
 ); setAttribValue


 (defun process_data ()
  (vl-sort 
    (mapcar
      (function
        (lambda (ename / lst)
          (reverse
            (cons
	     ename
	     (foreach tag TAGS
	       (setq lst (cons (getAttribValue ename tag) lst))
	     )
            ); cons
	  ); reverse
        ); lambda
     ); function
     (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
   ); mapcar
   (function (lambda (e0 e1) (&amp;lt; (car e0) (car e1))))
  ); vl-sort
 ); process_data 


 (defun upadte_revision_data (/ _nrd _fnd ; local function
			         orec nrec)

  ; anonymous functions 
  (setq _nrd (lambda () (mapcar (function (lambda (tag dat) (cons tag (cdr dat)))) TAGS newRevData)))
  (setq _fnd (lambda () (vl-some (function (lambda (rev) (if (eq (cadr rev) "") rev))) data^))) 
   
  (if (setq orec (_fnd))
   (progn
    (setq nrec (cons (car orec) (append (cdr (_dat)) (list (last orec)))))
    (foreach dotpair (subst (cons "revno" (car orec)) (assoc "revno" (_nrd)) (_nrd))
     (setAttribValue (last orec) (car dotpair) (cdr dotpair))
    )
    (setq data^ (subst nrec orec data^))
   ); progn
  ); if
 ); upadte_revision_data 


 (defun shift_attribute_data ()
  (reverse
    (append
     (list (cons (itoa (1+ (atoi (car (last data^))))) (append (cdr (_dat)) (list (last (last data^))))))
     (mapcar
       (function
         (lambda (e0 e1)
          (append (reverse (cdr (reverse e0))) (list (last e1)))
         ); lambda
       ); function
       (reverse (cdr data^)) (cdr (reverse data^)) 
     ); mapcar
    ); append
  ); reverse
 ); shift_attribute_data 

  
 (defun update_revision_blocks ()
  (vl-every
   (function
     (lambda (rev)
       (vl-every
         (function
     	   (lambda (tag val)
             (setAttribValue (last rev) tag val)
	   )
	 ); function
         TAGS rev
       ); vl-every
     ); lambda
   ); function
   data^
  ); vl-every
 ); update_revision_blocks


 ; here start (c:automod)
  
 ; define const for blocks name
 (setq TITLEBLK "tad15")
 (setq PEBLK    "Certification MN-Appd")
 (setq REVBLK   "revattr")
 ; const for revision layer
 (setq REVLAY   "rev current")
 ; get attribute tag from block definition
 (setq TAGS (get_attrib_def))
  
  
 ; 1 + 2 - delete rev clouds + P.E stamp
 (if (setq ss (ssget "_X" (list '(-4 . "&amp;lt;OR")
			          '(-4 . "&amp;lt;AND") '(0 . "lwpolyline") (cons '8 REVLAY) '(-4 . "AND&amp;gt;")
			          '(-4 . "&amp;lt;AND") '(0 . "insert")     (cons '8 REVLAY)  (cons 2 PEBLK) '(66 . 1) '(-4 . "AND&amp;gt;")
			        '(-4 . "OR&amp;gt;")
			  ); list
	       ); ssget
     ); setq
  (foreach ent (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
   (entdel ent) ; delete revision clouds
  )
 ); if

 ; 3 - increment revision cloud 
 (if (setq ss (ssget "_X" (list '(0 . "insert") (cons '2 TITLEBLK) '(66 . 1))))
  (progn
   (setq ent (ssname ss 0)) 
   (if (setq rev (getAttribValue ent "rev"))
    (setattribValue ent "rev" (itoa (1+ (atoi rev))))
   )

   ; 4 - insert revision data
   (if (setq ss (ssget "_X" (list '(0 . "insert") (cons '2 REVBLK)))) ; select revision slots
    (progn
     (setq data^ (process_data))

     (if (not (upadte_revision_data)) ; revision slots is full
      (setq data^ (shift_attribute_data))	
     ); if
       
     (update_revision_blocks)
    ); progn
   ); if 
	     
  ); progn
 ); if

 (princ)  
); c:automod&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 12 Nov 2022 17:51:21 GMT</pubDate>
    <dc:creator>Moshe-A</dc:creator>
    <dc:date>2022-11-12T17:51:21Z</dc:date>
    <item>
      <title>Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11546267#M38320</link>
      <description>&lt;P&gt;I have attached a general DWG that contains the information that will be involved in what I am attempting to accomplish. I have tried to write lisp programs for each function and then combine them, but it seems to be too difficult.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The goal is to have a program that completes the following tasks for all DWG files within a specified folder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The first part of the program will remove all the rev clouds on each drawing. All the rev clouds exist on the same layer.&lt;/LI&gt;
&lt;LI&gt;The second part will remove the P.E stamp that is on each drawing.&lt;/LI&gt;
&lt;LI&gt;The third part of the program will go into the title block and increment the revision number by 1 for each drawing.&lt;/LI&gt;
&lt;LI&gt;The fourth part will take user defined information 1 time for the revision block and insert that information into the next available revision block for all drawings. If all 6 slots are filled within a drawing, the program will delete the first revision block, move all the revision blocks over one, and then copy a revision block over into the new slot, and update it with the new revision number as well as the user defined information.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a script or lisp program to complete this for all specified drawings in a folder, or is it better to break each component up into smaller lisp programmed commands?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1137264"&gt;@paullimapa&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;***THE POST HAS BEEN EDITED FOR CLARITY***&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 14:51:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11546267#M38320</guid>
      <dc:creator>gv6823otG42ZL</dc:creator>
      <dc:date>2022-11-11T14:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11546752#M38321</link>
      <description>&lt;P&gt;This lisp routine ClnABd should take care of #1 &amp;amp; #2. You already have TBlock for #3&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; ClnABd function erase stamp block and revision clouds from as-built dwgs
(defun c:ClnABd (/ blkname cmdecho flg IsLayerLocked lyrname menuecho ss)
;;;  Returns T if Locked
;;;        nil if Unlocked or not found
;;;        nil if lname is not a string
;;; https://www.theswamp.org/index.php?topic=888.0
 (defun IsLayerLocked (lname / ent )
  (if (and (=(type lname) 'STR)(setq ent (tblobjname "LAYER" lname)))
      (= 4 (logand 4 (cdr (assoc 70 (entget ent)))))
  )
 ) ; end defun
   (setq 
     blkname "Certification MN-Appd" 
     cmdecho (getvar"cmdecho")
     lyrname "REV CURRENT"
     menuecho (getvar"menuecho")
   )
   (setvar"cmdecho"0) ; setup environment
   (setvar"menuecho"0)
   (if(IsLayerLocked lyrname) ; check if layer is locked
     (progn
       (setq flg 1) ; note that layer is originally locked
       (command "_.Layer" "_Unlock" lyrname "") ; unlock layer
     )
     (progn
       (setq flg 0) ; note that layer is originally unlocked
     )
   )
   (if(setq ss (ssget "_X" (list '(0 . "INSERT") (cons 2 blkname) (cons 8 lyrname) '(66 . 1))))(command"_.Erase"ss"")) ; erase stamp
   (if(setq ss (ssget "_X" (list (cons 0 "*POLYLINE") (cons 8 lyrname))))(command"_.Erase"ss"")) ; erase revision clouds
   (if(not(zerop flg))(command "_.Layer" "_Lock" lyrname "")) ; restore layer to original locked status
   (princ"\nClnABd function successfully completed.")
   (setvar"cmdecho"cmdecho) ; restore environment
   (setvar"menuecho"menuecho)
   (princ)
) ; defun
(princ"\nClnABd successfully loaded.")(princ)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908" target="_blank"&gt;@Sea-Haven&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;can provide his bump function for #4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Then the one line script file for #1, #2 &amp;amp; #3 to go with Lee's Script Writer routine &lt;A href="http://www.lee-mac.com/scriptwriter.html" target="_blank"&gt;http://www.lee-mac.com/scriptwriter.html&lt;/A&gt;&amp;nbsp;would look something like:&amp;nbsp;&lt;/P&gt;&lt;P&gt;(load"ClnABd") ClnABd (load"TBlock") TBlock _.Qsave _.Close&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 18:29:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11546752#M38321</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2022-11-11T18:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11548215#M38322</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13147215"&gt;@gv6823otG42ZL&lt;/a&gt;&amp;nbsp; hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;check this AUTOMOD (Auto Modify) command but hey, do not rush&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt; read all the instructions first.&lt;/P&gt;&lt;P&gt;for your requests 1+2+3 the command answer them very easily.&amp;nbsp;request 4 was not easy challenge. in order it to work you need to specify the user defined information for revattr block, so this is implement as a lsp file which it content is like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;(setq newRevData &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp;'( ("revno" . "") ; place holder&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ("date" . "6-10")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ("revision1" . "revision1")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;("revision2" . "revision2")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;("revision3" . "revision3")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;("revby" . "revby")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;("appdby" . "appdby")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&amp;nbsp; ); list&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;); setq&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;first open notepad than copy &amp;amp; paste this content in and save it in your document folder by the name of revdata.lsp you can save it with any name you like as long it's type must be lsp. (remember that name)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;the data format is a list of dotted pairs items. each item holds 2 data strings, the first is &lt;STRONG&gt;TAG&lt;/STRONG&gt; name and the second is the tag&amp;nbsp;&lt;STRONG&gt;VALUE&lt;/STRONG&gt;. the 2 strings are &lt;SPAN&gt;separate by dot "." (that's what dotted pairs means) you need to fill &lt;STRONG&gt;only&lt;/STRONG&gt; the second data strings with the new revattr info.&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#003300"&gt;&lt;SPAN&gt;make sure you do not mess the format every character is important here. each data string must start and end with double&amp;nbsp;apostrophe.&amp;nbsp; the first dot pair ("revno" . "") is just place holder do not fill or delete it.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;in your script program you need to load revdata.lsp along with automod.lsp each drawing you open.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;the command starts with defining some constant variables, i'm talking about your blocks names the title block the P.E block, revattr block and the layer "rev current".&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;; define const for blocks name
 (setq TITLEBLK "tad15")
 (setq PEBLK    "Certification MN-Appd")
 (setq REVBLK   "revattr")
 ; const for revision layer
 (setq REVLAY   "rev current")
 ; get attribute tag from block definition
 (setq TAGS (get_attrib_def))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;if in future you need to change these names, you can easily change them here and the command will still work.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;also there is a TAGS variable which holds a list of tags name. these tag name is read directly from the block (revattr) definition. in future if you decide to add more attribute or change some, automod will read these changes and still work. note that you will have to sync these change with the content (tag names) in revdata.lsp.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;now for the script:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;two weeks ago a member of this forum ask about scripts i suggest you to look at it&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/replace-text-in-multiple-dwg-and-also-change-color-of-text/td-p/11520784" target="_blank" rel="noopener"&gt;&amp;gt;&amp;gt; HERE &amp;lt;&amp;lt;&lt;/A&gt;&amp;nbsp;message #6 of 11&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;also look at&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1137264"&gt;@paullimapa&lt;/a&gt;&amp;nbsp; advice on how to create the script.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;enjoy&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;Moshe&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(vl-load-com) ; load ActiveX support

; auto modifications
(defun c:automod (/ _dat get_attrib_def getAttribValue setAttribValue process_data 	; local functions
		    upadte_revision_data shift_attribute_data update_revision_blocks 	; local functions
		    TITLEBLK PEBLK REVBLK REVLAY TAGS ss ent rev data^)
  
 ; anonymous function
 (setq _dat (lambda () (mapcar (function (lambda (d) (cdr d))) newRevData))) 

 (defun get_attrib_def (/ blocks lst)
  (setq blocks (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))))

  (vlax-for AcDbEntity (vla-item blocks REVBLK)
   (if (eq (vla-get-objectName AcDbEntity) "AcDbAttributeDefinition")
    (setq lst (cons (vla-get-tagString AcDbEntity) lst)) 
   )

   (vlax-release-object AcDbEntity)
  ); vlax-for

  (vlax-release-object blocks)

  (reverse lst)
 ); get_attrib_def

  
 (defun getAttribValue (ent tag / val)
  (if (not
        (vl-catch-all-error-p
              (setq val (vl-catch-all-apply 'getPropertyValue (list ent tag)))
        )
      ); not
   val
  ); if
 ); getAttribValue

  
 (defun setAttribValue (ent tag val)
  (not
    (vl-catch-all-error-p
        (vl-catch-all-apply 'setPropertyValue (list ent tag val))
    )
  ); not
 ); setAttribValue


 (defun process_data ()
  (vl-sort 
    (mapcar
      (function
        (lambda (ename / lst)
          (reverse
            (cons
	     ename
	     (foreach tag TAGS
	       (setq lst (cons (getAttribValue ename tag) lst))
	     )
            ); cons
	  ); reverse
        ); lambda
     ); function
     (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
   ); mapcar
   (function (lambda (e0 e1) (&amp;lt; (car e0) (car e1))))
  ); vl-sort
 ); process_data 


 (defun upadte_revision_data (/ _nrd _fnd ; local function
			         orec nrec)

  ; anonymous functions 
  (setq _nrd (lambda () (mapcar (function (lambda (tag dat) (cons tag (cdr dat)))) TAGS newRevData)))
  (setq _fnd (lambda () (vl-some (function (lambda (rev) (if (eq (cadr rev) "") rev))) data^))) 
   
  (if (setq orec (_fnd))
   (progn
    (setq nrec (cons (car orec) (append (cdr (_dat)) (list (last orec)))))
    (foreach dotpair (subst (cons "revno" (car orec)) (assoc "revno" (_nrd)) (_nrd))
     (setAttribValue (last orec) (car dotpair) (cdr dotpair))
    )
    (setq data^ (subst nrec orec data^))
   ); progn
  ); if
 ); upadte_revision_data 


 (defun shift_attribute_data ()
  (reverse
    (append
     (list (cons (itoa (1+ (atoi (car (last data^))))) (append (cdr (_dat)) (list (last (last data^))))))
     (mapcar
       (function
         (lambda (e0 e1)
          (append (reverse (cdr (reverse e0))) (list (last e1)))
         ); lambda
       ); function
       (reverse (cdr data^)) (cdr (reverse data^)) 
     ); mapcar
    ); append
  ); reverse
 ); shift_attribute_data 

  
 (defun update_revision_blocks ()
  (vl-every
   (function
     (lambda (rev)
       (vl-every
         (function
     	   (lambda (tag val)
             (setAttribValue (last rev) tag val)
	   )
	 ); function
         TAGS rev
       ); vl-every
     ); lambda
   ); function
   data^
  ); vl-every
 ); update_revision_blocks


 ; here start (c:automod)
  
 ; define const for blocks name
 (setq TITLEBLK "tad15")
 (setq PEBLK    "Certification MN-Appd")
 (setq REVBLK   "revattr")
 ; const for revision layer
 (setq REVLAY   "rev current")
 ; get attribute tag from block definition
 (setq TAGS (get_attrib_def))
  
  
 ; 1 + 2 - delete rev clouds + P.E stamp
 (if (setq ss (ssget "_X" (list '(-4 . "&amp;lt;OR")
			          '(-4 . "&amp;lt;AND") '(0 . "lwpolyline") (cons '8 REVLAY) '(-4 . "AND&amp;gt;")
			          '(-4 . "&amp;lt;AND") '(0 . "insert")     (cons '8 REVLAY)  (cons 2 PEBLK) '(66 . 1) '(-4 . "AND&amp;gt;")
			        '(-4 . "OR&amp;gt;")
			  ); list
	       ); ssget
     ); setq
  (foreach ent (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
   (entdel ent) ; delete revision clouds
  )
 ); if

 ; 3 - increment revision cloud 
 (if (setq ss (ssget "_X" (list '(0 . "insert") (cons '2 TITLEBLK) '(66 . 1))))
  (progn
   (setq ent (ssname ss 0)) 
   (if (setq rev (getAttribValue ent "rev"))
    (setattribValue ent "rev" (itoa (1+ (atoi rev))))
   )

   ; 4 - insert revision data
   (if (setq ss (ssget "_X" (list '(0 . "insert") (cons '2 REVBLK)))) ; select revision slots
    (progn
     (setq data^ (process_data))

     (if (not (upadte_revision_data)) ; revision slots is full
      (setq data^ (shift_attribute_data))	
     ); if
       
     (update_revision_blocks)
    ); progn
   ); if 
	     
  ); progn
 ); if

 (princ)  
); c:automod&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 17:51:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11548215#M38322</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2022-11-12T17:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11548850#M38323</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13147215"&gt;@gv6823otG42ZL&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good Morning,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;wrapped all in files.&amp;nbsp;save revdata.lsp in your documents folder or any other folder that is in the support files path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Nov 2022 06:24:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11548850#M38323</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2022-11-13T06:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11548854#M38324</link>
      <description>&lt;P&gt;You can write a script that runs each program one after another that way can check all working, can then join into 1 big program and if each step is a seperate defun just call them again in correct order.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will look into does rev 6 have details and now need rev 7 for the rev bump, it will remove rev 1 and redo them all adding 7 etc. It has to be custom done to suit your dwg. making all revs part of the primary title block is easier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Nov 2022 06:31:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11548854#M38324</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-11-13T06:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11549710#M38325</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13147215"&gt;@gv6823otG42ZL&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since you did not reply, i assumed you still have &lt;SPAN&gt;difficulty to put all things together so here you have it all. attached zip file contain automod.lsp (did some fine tuning) + revdata.lsp + automod.scr. save these files in your document folder.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;open automod.scr file in notepad, spot the lines starting with open?&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;replace the file name with your files to be modify (see above how to copy and paste the a list of full path name from a folder).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;what the script does is open the dwg, load automod.lsp, run the automod command, qsave and exit...handle next dwg&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;open "c:\projects\jonny walker\plans\p0.dwg"
(load "automod")
automod
qsave
quit y
open "c:\projects\jonny walker\plans\p1.dwg"
(load "automod")
automod
qsave
quit y
open "c:\projects\jonny walker\plans\p2.dwg"
(load "automod")
automod
qsave
quit y
open "c:\projects\jonny walker\plans\p3.dwg"
(load "automod")
automod
qsave
quit y
open "c:\projects\jonny walker\plans\p4.dwg"
(load "automod")
automod
qsave
quit y
open "c:\projects\jonny walker\plans\p5.dwg"
(load "automod")
automod
qsave
quit y
open "c:\projects\jonny walker\plans\p6.dwg"
(load "automod")
automod
qsave
quit y
open "c:\projects\jonny walker\plans\p7.dwg"
(load "automod")
automod
qsave
quit y
open "c:\projects\jonny walker\plans\p8.dwg"
(load "automod")
automod
qsave
quit y
open "c:\projects\jonny walker\plans\p9.dwg"
(load "automod")
automod
qsave
quit y&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now for the last part, running the script&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;on your desktop copy &amp;amp; paste an AutoCAD XXXX shortcut, right click it and select properties. enter Start in and at end of the field (text) add /b automod&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this tell AutoCAD to run the script file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that's it job complete&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MosheA_1-1668377498735.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1139252i4DBAB3384E7AA9D8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MosheA_1-1668377498735.png" alt="MosheA_1-1668377498735.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Nov 2022 22:17:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11549710#M38325</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2022-11-13T22:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11549716#M38326</link>
      <description>&lt;P&gt;Thank you !! I will report back in a couple days once I can try this out and see what happens !&lt;/P&gt;</description>
      <pubDate>Sun, 13 Nov 2022 22:21:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11549716#M38326</guid>
      <dc:creator>gv6823otG42ZL</dc:creator>
      <dc:date>2022-11-13T22:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11554261#M38327</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13147215"&gt;@gv6823otG42ZL&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The first part of the program will remove all the rev clouds on each drawing. All the rev clouds exist on the same layer.&lt;/LI&gt;
&lt;LI&gt;The second ....&lt;/LI&gt;
&lt;/OL&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(defun c:NotInvited ( / _string _AttFunc aDoc _PutRev carCadr itIsAblock newRevData _date revNum
		     _RevBy _ApvBy revVal revBlock bname objType titleBlockData itIsAblock )
    
(defun _string (msg m / r)
  (if (and
	(setq r (getstring t (Strcat "\n" msg m ": ")))
  	(/= r "")) r
	  )
  )
    
(defun _AttFunc  (en lst / vals v)
  (mapcar (function (lambda (at)
	(setq vals (list (vla-get-tagstring at)(vla-get-textstring at) at))      
          	(if (and lst (setq v (assoc (car vals) lst))) (vla-put-textstring at (cadr v))
                              ) vals))        	
                      (vlax-invoke (if (eq (type en) 'VLA-OBJECT)
                                  en (vlax-ename-&amp;gt;vla-object en)) 'Getattributes)
  	)
  )
(defun _PutRev (lst ls / f)
  (foreach itm lst
    (and (setq f (assoc (car itm) ls))
	 (vla-put-textstring (caddr f) (Cadr itm))
    )
  )
)
(setq n 0 _num (lambda (x)(atoi (cadr (assoc "REVNO" x))))
      carCadr (lambda (n)(list (car n)(cadr n))))
  
(if (and
      (setq _date (_string "Enter Date &amp;lt;M-YY&amp;gt;" ""))
      (setq _RevBy (_string "Reviewed by" ""))
      (setq _ApvBy (_string "Approved by" ""))
      (progn
	(while (and (&amp;lt; n 3)
		    (setq rev (_string "Description Line "
					(itoa (setq n (1+ n))))))
	  (setq revVal (Cons (list (strcat "REVISION" (itoa n)) rev) revVal))
	  )
	revVal
      	)
      )
  
(progn
  (setq newRevData (append revVal (mapcar 'list  '("DATE" "REVBY" "APPDBY") (list _date _RevBy _ApvBy))))
	(vlax-for itms (Vla-get-modelspace (vla-get-ActiveDocument (vlax-get-acad-object )))
		(setq  objType (vlax-get itms 'ObjectName))
			(cond
			  ((not (vlax-write-enabled-p itms))	)
			  ((or
			     (and
			       (setq itIsAblock (eq "AcDbBlockReference" objType))
			       (eq (setq bname (strcase (vla-get-EffectiveName itms)))  "CERTIFICATION MN-APPD")
				)			  
			     (and (eq (vla-get-layer itms) "REV CURRENT") (eq "AcDbPolyline" objType))
			     )
			    (vla-delete itms)
			   	)
			  ((and itIsAblock (eq "TAD15" bname))
                            (setq titleBlockData (_AttFunc itms nil))
			  	)
			  ((and itIsAblock (eq "REVATTR" bname))
			   	(setq revBlock (cons (_AttFunc itms nil) revBlock))
			   )
		)
	  )
	  (and
	    (setq inc -1 revBlock (vl-sort revBlock '(lambda (a b) (&amp;gt; (_num a) (_num b)))))
	    (or (vl-some (function (lambda ( cd )
				 (setq inc (1+ inc))(/= (cadr (assoc "DATE" cd)) ""))) revBlock) inc)
	    (setq revNum (cadr (assoc "REVNO" (car revBlock))))			 			 
	    (cond
	      ((zerop inc)
	       (foreach itm '("REVISION1" "REVISION2" "REVISION3")
		 (vla-put-textstring (caddr (assoc itm (car revBlock))) ""))	        	       
	       (mapcar '(lambda ( j k) (_PutRev j k))
		        (cons
		      		(cons (list "REVNO" (setq revNum  (itoa (1+ (atoi  revNum))))) newRevData)
		      		(mapcar '(lambda (d) (mapcar 'carCadr d)) revBlock)
			 ) revBlock
		       )
	       )
	      ((setq newRev (nth (1- inc) revBlock)) (_PutRev newRevData newRev)       
	       )
	      )
	    )
  	(and titleBlockData (_PutRev  (mapcar 'list '("DATE" "REV")(list _date revNum)) titleBlockData))
  	)
  )
  (princ)
  )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 04:55:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11554261#M38327</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2022-11-16T04:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11560386#M38328</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gv6823otG42ZL_0-1668716953220.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1141196iD4625EB36D374A7F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gv6823otG42ZL_0-1668716953220.png" alt="gv6823otG42ZL_0-1668716953220.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is the error that i have been getting. The script is listed in that directory. Any ideas what's going on?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 20:30:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11560386#M38328</guid>
      <dc:creator>gv6823otG42ZL</dc:creator>
      <dc:date>2022-11-17T20:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11565414#M38329</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13147215"&gt;@gv6823otG42ZL&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add at least one space where you add =&amp;gt;&amp;nbsp; /b automod&lt;/P&gt;&lt;P&gt;the system is complaining about an invalid folder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Nov 2022 15:14:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11565414#M38329</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2022-11-20T15:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11565994#M38330</link>
      <description>&lt;P&gt;To do the update revs past 6 I have redone the revision block to be one block, I need to know if happy with that concept as its the easiest way to update the revs. Finding the revs as single blocks at any scale could be difficult, the current blocks are at a scale of 40.666 should be 40.0 ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please have a look at this block paste into a dwg, you may need to rescale.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Nov 2022 23:32:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11565994#M38330</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-11-20T23:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11572191#M38331</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13147215"&gt;@gv6823otG42ZL&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13147215"&gt;@gv6823otG42ZL&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Thank you !! I will report back in a couple days once I can try this out and see what happens !&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;??&lt;/P&gt;&lt;P&gt;couple days are over?&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 07:24:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11572191#M38331</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2022-11-23T07:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11585160#M38332</link>
      <description>&lt;P&gt;I have added the space at /b automod and it is still giving me the same error as above. The files are located within that folder as well. Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gv6823otG42ZL_0-1669727810072.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1145740i40D9F0C23FAF58C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gv6823otG42ZL_0-1669727810072.png" alt="gv6823otG42ZL_0-1669727810072.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 13:18:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11585160#M38332</guid>
      <dc:creator>gv6823otG42ZL</dc:creator>
      <dc:date>2022-11-29T13:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11585198#M38333</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13147215"&gt;@gv6823otG42ZL&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;opps realy sorry&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;add the /b automod to the end of target field&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 13:31:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11585198#M38333</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2022-11-29T13:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11585229#M38334</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13147215"&gt;@gv6823otG42ZL&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;....&lt;BR /&gt;
&lt;OL&gt;
&lt;LI&gt;The first part of the program will remove all the rev clouds on each drawing. All the rev clouds exist on the same layer.&lt;/LI&gt;
&lt;LI&gt;The second part will remove the P.E stamp that is on each drawing. ....&lt;/LI&gt;
&lt;/OL&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For those, would a simple LAYDEL, or perhaps just Freezing the Layers, suffice?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 13:40:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11585229#M38334</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2022-11-29T13:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11585243#M38335</link>
      <description>&lt;P&gt;The LAYDEL would work for the p.e stamp. The LAYDEL wouldn’t work for the revision clouds because sometimes there are multiple rev clouds from multiple work orders on one drawing. What would work better is to remove any objects that have a color number 243 assigned to them. This deletes the current rev clouds that are on the drawing but won’t delete any rev clouds that exist on that layer for other work orders.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 13:46:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11585243#M38335</guid>
      <dc:creator>gv6823otG42ZL</dc:creator>
      <dc:date>2022-11-29T13:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11588523#M38336</link>
      <description>&lt;P&gt;That works, as long as the rev number can be modified on its own still if need be&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 16:48:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11588523#M38336</guid>
      <dc:creator>gv6823otG42ZL</dc:creator>
      <dc:date>2022-11-30T16:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11588572#M38337</link>
      <description>&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1137264"&gt;@paullimapa&lt;/a&gt; What is TBlock? How do I get it?&lt;BR /&gt;&lt;BR /&gt;~nic</description>
      <pubDate>Wed, 30 Nov 2022 17:12:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11588572#M38337</guid>
      <dc:creator>nick.baileyVASY9</dc:creator>
      <dc:date>2022-11-30T17:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11588594#M38338</link>
      <description>&lt;P&gt;I coded that for the OP in another &lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/use-a-lisp-program-to-identify-the-revision-number-within-a/m-p/11545093#M439302" target="_blank" rel="noopener"&gt;thread&lt;/A&gt; but here it is for you:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/use-a-lisp-program-to-identify-the-revision-number-within-a/m-p/11544838#M439286
(defun c:TBLOCK (/ blkname chg en i sed sen ss tagname txt)
 (setq blkname "Tid22" chg 0 tagname "REV")
 (if(setq ss (ssget "_X" (list '(0 . "INSERT") (cons 2 blkname) '(66 . 1))))
  (progn
   (repeat (setq i (sslength ss))
    (setq en (ssname ss (setq i (1- i))))  
    (setq sen (entnext en))                           ; get attributes
    (while sen
     (setq sed (entget sen))          
     (if (/= (cdr(assoc 0 sed)) "SEQEND") 
       (if(eq tagname (cdr(assoc 2 (entget sen))))
          (progn
           (setq txt(getpropertyvalue sen "TextString")) ; get current value
           (setq txt(itoa(1+ (atoi txt)))) ; increase # by 1
           (setpropertyvalue sen "TextString" txt) ; set updated value
           (setq sen nil chg (1+ chg))
          ) ; progn
          (setq sen (entnext sen))
       ) ; if found tag
       (setq sen nil)             
     ) ; if more attributes
    ) ; while attributes
   ) ; repeat
   (princ(strcat"\nTotal of [" (itoa chg) "] [" blkname "] Blocks with Tag [" tagname "] Updated."))
  ) ; progn
  (princ"\nNo Matching Block Objects Found.")
 ) ; if
  (princ)
) ; defun&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 21:01:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11588594#M38338</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2022-11-30T21:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Script or lisp program for as-built drawing package</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11589090#M38339</link>
      <description>&lt;P&gt;Hi all! I have decided to write these different lisp commands and then attempt to combine them all in a script that can be applied to all the drawings. The last lisp command is attempting to update the rev blocks for each drawing. Just wanted to check and see if there are any ideas. I would like the command to take user defined information once and apply that information to all the other drawings besides the rev number. The rev number will increment to the next available rev number. But if all 6 slots are filled, the rightmost rev block will be deleted, then all the rev blocks will be shifted one slot over. Then a new rev block will be put into the next available slot and updated with the user defined information as well as the new revision number. If this doesn't make sense, I can attempt to provide an example. I know this is complicated so any ideas on how to go forward with this would be great&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1137264"&gt;@paullimapa&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11998736"&gt;@nick.baileyVASY9&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 20:58:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/script-or-lisp-program-for-as-built-drawing-package/m-p/11589090#M38339</guid>
      <dc:creator>gv6823otG42ZL</dc:creator>
      <dc:date>2022-11-30T20:58:54Z</dc:date>
    </item>
  </channel>
</rss>

