Jump to content

Update title block attributes in multiple drawings


t357

Recommended Posts

LeeMac,

I don't quite follow what AU-S and your code is doing. AttChg works fine on changing one drawing. So now how is MacATT used to do a folder of drawings? I've ran AttChg on drawing1, then ran MacATT to a folder of drawings. It said "10 drawings processed" But when I open those drawings in the folder, nothing is changed. What am I doing wrong?

 

On the other hand, Pat's code worked perfectly. Thanks so much Pat. Now I just need to translate the dcl file so it prompts in english.

Link to comment
Share on other sites

  • Replies 144
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    58

  • au-s

    23

  • JeepMaster

    9

  • wakibd

    7

My code (MacAtt) uses ObjectDBX to iterate through the drawings and change the attribute value, then save the drawing - but I wrote it when I was not too good at ObjectDBX.. so it may not work :oops:

Link to comment
Share on other sites

This is the translated english version of Pat's code. I've only translated the words that the user sees, not all the code. (I don't read french, but google is my friend) I hope you don't mind Pat. This will help a lot of people here. Correct any mistake that you see as I'm only guessing what it really means... I tried my best.

Merci Beaucoup Pat!:thumbsup:

 

Here's PAT.LSP

;;;=================================================================
;;;
;;; PAT V1.01 eng
;;;
;;; Mettre tous les attributs �* la même valeur
;;;
;;; Copyright (C) Patrick_35
;;;
;;;=================================================================

(defun c:pat(/    bl choix dcl_id doc js ent fic lay liste_bl liste_at liste_att lst n modif
       nom_bloc old old_error posbl posat resultat rep sav sel tot val_at 
       *errmat* MsgBox modif_at rech_at affiche affiche_va rech_bl rech_blat dirbox
       affiche_rep rechercher_blocs ouvrir_dessin_dbx)

 ;;;---------------------------------------------------------------
 ;;;
 ;;; Gestion des erreurs
 ;;;
 ;;;---------------------------------------------------------------

 (defun *errmat* (msg)
   (or (member (strcase msg) '("FUNCTION CANCELLED" ""QUIT / EXIT ABORT"" "FONCTION ANNULEE" "QUITTER / SORTIR ABANDON"))
     (princ (strcat "\nErreur : " msg))
   )
   (setq *error* old_error)
   (unload_dialog dcl_id)
   (vla-endundomark (vla-get-activedocument (vlax-get-acad-object)))
   (princ)
 )

 ;;;---------------------------------------------------------------
 ;;;
 ;;; Afficher un message
 ;;;
 ;;;---------------------------------------------------------------

 (defun MsgBox (Titre Bouttons Message / Reponse WshShell)
   (setq WshShell (vlax-create-object "WScript.Shell"))
   (setq Reponse  (vlax-invoke WshShell 'Popup Message 0 Titre (itoa Bouttons)))
   (vlax-release-object WshShell)
   Reponse
 )

 ;;;---------------------------------------------------------------
 ;;;
 ;;; Choix du répertoire
 ;;;
 ;;;---------------------------------------------------------------

 (defun dirbox(txt / cdl rep)
   (if (setq cdl (vlax-create-object "Shell.Application"))
     (progn
   (and (setq rep (vlax-invoke cdl 'browseforfolder 0 txt 512 ""))
        (setq rep (vlax-get-property (vlax-get-property rep 'self) 'path))
   )
   (vlax-release-object cdl)
     )
   )
   rep
 )

 ;;;---------------------------------------------------------------
 ;;;
 ;;; Ouvrir un dessin via ObjectDbx
 ;;;
 ;;;---------------------------------------------------------------

 (defun ouvrir_dessin_dbx(dwg / dbx)
   (if (< (atoi (substr (getvar "ACADVER") 1 2)) 16)
     (setq dbx (vlax-create-object "ObjectDBX.AxDbDocument"))
     (setq dbx (vlax-create-object (strcat "ObjectDBX.AxDbDocument." (substr (getvar "ACADVER") 1 2))))
   )
   (if (vl-catch-all-error-p (vl-catch-all-apply 'vla-open (list dbx dwg)))
     (progn
   (vlax-release-object dbx)
   nil
     )
     dbx
   )
 )

 ;;;---------------------------------------------------------------
 ;;;
 ;;; Rechercher les attributs d'un bloc
 ;;;
 ;;;---------------------------------------------------------------

 (defun rech_at(nom / at bl tb)
   (setq bl (vla-item (vla-get-blocks doc) nom))
   (vlax-for at bl
     (and (eq (vla-get-objectname at) "AcDbAttributeDefinition")
   (if (eq (vla-get-constant at) :vlax-true)
     (setq tb (cons (list (vla-get-tagstring at)) tb))
     (setq tb (cons
            (cons (vla-get-tagstring at)
              (if (eq (vla-get-promptstring at) "")
                (vla-get-tagstring at)
                (vla-get-promptstring at)
              )
            )
            tb
          )
     )
   )
     )
   )
   (reverse tb)
 )

 ;;;---------------------------------------------------------------
 ;;;
 ;;; Afficher les attributs d'un bloc
 ;;;
 ;;;---------------------------------------------------------------

 (defun affiche(/ val)
   (if (setq liste_at (rech_at (nth (atoi posbl) liste_bl)))
     (progn
   (foreach val (list "txtat" "listeat" "txtva" "valeur" "accept" "sel" "nou" "pre" "suf")
     (mode_tile val 0)
   )
   (start_list "listeat")
   (mapcar '(lambda (x) (if (cdr x)
                  (add_list (cdr x))
                  (add_list (strcat "Constant-->" (car x)))
                )
        ) liste_at)
   (end_list)
   (affiche_va)
     )
     (foreach val (list "listeat" "txtva" "valeur" "accept" "sel" "nou" "pre" "suf")
   (mode_tile val 1)
     )
   )
   (set_tile "sel" sel)
   (set_tile "valeur" val_at)
   (affiche_rep rep)
 )

 ;;;---------------------------------------------------------------
 ;;;
 ;;; Affiche le Répertoire
 ;;;
 ;;;---------------------------------------------------------------

 (defun affiche_rep(txt / sel)
   (if (> (strlen txt) 46)
     (setq txt (strcat (substr txt 1 3) "...." (substr txt (- (strlen txt) 45))))
   )
   (set_tile "txt" (strcat "Path : " txt))
 )

 ;;;---------------------------------------------------------------
 ;;;
 ;;; Griser si attribut constant
 ;;;
 ;;;---------------------------------------------------------------

 (defun affiche_va()
   (mode_tile "valeur" 0)
   (mode_tile "accept" 0)
   (or (cdr (nth (atoi posat) liste_at))
     (progn
   (mode_tile "valeur" 1)
   (mode_tile "accept" 1)
     )
   )
 )

 ;;;---------------------------------------------------------------
 ;;;
 ;;; Modifier le texte de l'attribut
 ;;;
 ;;;---------------------------------------------------------------

 (defun modif_at(ent / lst att)
   (and (eq nom_bloc
        (if (vlax-property-available-p ent 'effectivename)
          (vla-get-effectivename ent)
          (vla-get-name ent)
        )
    )
    (not (eq (cdr (nth (atoi posat) liste_at)) ""))
     (progn
   (setq lst (vlax-invoke ent 'getattributes)
         att (nth (atoi posat) lst)
         modif T
   )
   (cond
     ((eq choix "nou")
       (vla-put-textstring att val_at)
     )
     ((eq choix "pre")
       (vla-put-textstring att (strcat val_at (vla-get-textstring att)))
     )
     (T
       (vla-put-textstring att (strcat (vla-get-textstring att) val_at))
     )
   )
     )
   )
 )

 ;;;---------------------------------------------------------------
 ;;;
 ;;; Sélection d'un bloc pour récuperer son nom
 ;;;
 ;;;---------------------------------------------------------------

 (defun rech_bl(/ lst nom sel)
   (defun nom(val)
     (setq val (vlax-ename->vla-object val))
     (if (vlax-property-available-p val 'effectivename)
   (vla-get-effectivename val)
   (vla-get-name val)
     )
   )

   (and (setq sel (entsel "\nSelect Block : "))
    (eq (cdr (assoc 0 (entget (car sel)))) "INSERT")
    (setq lst (member (nom (car sel)) liste_bl))
    (setq posbl (itoa (- (length liste_bl) (length lst))))
   )
 )

 ;;;---------------------------------------------------------------
 ;;;
 ;;; Sélection d'un attribut pour récuperer son étiquette et le nom du bloc
 ;;;
 ;;;---------------------------------------------------------------

 (defun rech_blat(/ att bl lst sel)
   (and (setq sel (nentsel "\nSelect Attribute : "))
    (eq (vla-get-objectname (setq att (vlax-ename->vla-object (car sel)))) "AcDbAttribute")
    (not (vl-catch-all-error-p (setq bl (vl-catch-all-apply 'vla-objectidtoobject (list (vla-get-database att) (vla-get-ownerid att))))))
    (setq lst (member 
            (if (vlax-property-available-p bl 'effectivename)
              (vla-get-effectivename bl)
              (vla-get-name bl)
            )
            liste_bl
          )
    )
    (setq posbl (itoa (- (length liste_bl) (length lst))) posat "0")
    (setq liste_att (rech_at (vla-get-name bl)))
    (setq lst (mapcar 'vla-get-objectid (vlax-invoke bl 'getattributes)))
    (setq posat (itoa (- (length lst) (length (member (vla-get-objectid att) lst)))))
   )
 )

 ;;;---------------------------------------------------------------
 ;;;
 ;;; Rechercher les blocs dans le document référencé
 ;;;
 ;;;---------------------------------------------------------------

 (defun rechercher_blocs(env / ava bl ent express lay lok tot)
   (if (member "acetutil.arx" (arx))
     (setq express T ava 0 tot 0)
   )
   (vlax-for lay (vla-get-layers env)
     (and (eq (vla-get-lock lay) :vlax-true)
   (setq lok (cons lay lok))
   (vla-put-lock lay :vlax-false)
     )
   )
   (vlax-for lay (vla-get-layouts env)
     (and express
   (setq tot (+ tot (vla-get-count (vla-get-block lay))))
     )
   )
   (and express
     (acet-ui-progress-init "" tot)
   )
   (vlax-for lay (vla-get-layouts env)
     (vlax-for ent (vla-get-block lay)
   (and express
     (setq ava (1+ ava))
     (acet-ui-progress-safe ava)
   )
   (and (eq (vla-get-objectname ent) "AcDbBlockReference")
     (modif_at ent)
   )
     )
   )
   (foreach lay lok
     (vla-put-lock lay :vlax-true)
   )
   (and express
     (acet-ui-progress-done)
   )
 )

 ;;;---------------------------------------------------------------
 ;;;
 ;;; Routine principale.
 ;;;
 ;;;---------------------------------------------------------------

 (vl-load-com)
 (vla-startundomark (vla-get-activedocument (vlax-get-acad-object)))
 (setq Old_Error *error* *error* *errmat* doc (vla-get-activedocument (vlax-get-acad-object)))
 (if (setq dcl_id (findfile "Pat.dcl"))
   (progn
     (vlax-for bl (vla-get-blocks doc)
   (or (wcmatch (vla-get-name bl) "`**,*|*")
     (eq (vla-get-isxref bl) :vlax-true)
     (setq liste_bl (cons (vla-get-name bl) liste_bl))
   )
     )
     (if liste_bl
   (progn
     (setq dcl_id (load_dialog dcl_id)
       liste_bl (acad_strlsort liste_bl)
       val_at ""
       posbl "0"
       posat "0"
       sel "1"
       choix "nou"
       rep (substr (getvar "dwgprefix") 1 (1- (strlen (getvar "dwgprefix"))))
       old rep
     )
     (while (and (/= resultat 0)
             (/= resultat 1)
        )
       (new_dialog "pat" dcl_id)
       (set_tile "titre" "PAT V1.01 eng")
       (set_tile choix "1")
       (affiche)
       (mode_tile "cancel" 2)
       (start_list "listebl")
       (mapcar 'add_list liste_bl)
       (end_list)
       (set_tile "listebl" posbl)
       (and liste_att
         (set_tile "listeat" posat)
       )
       (action_tile "listebl" "(setq posbl $value)(affiche)")
       (action_tile "chbl"       "(done_dialog 2)")
       (action_tile "listeat" "(setq posat $value)(affiche_va)")
       (action_tile "chat"       "(done_dialog 3)")
       (action_tile "valeur"  "(setq val_at $value)")
       (action_tile "sel"       "(setq sel $value)")
       (action_tile "rep"     "(done_dialog 4)")
       (action_tile "nou"       "(setq choix \"nou\")")
       (action_tile "pre"       "(setq choix \"pre\")")
       (action_tile "suf"       "(setq choix \"suf\")")
       (action_tile "cancel"  "(done_dialog 0)")
       (action_tile "accept"  "(done_dialog 1)")
       (setq resultat (start_dialog))
       (cond
         ((eq resultat 1)
       (setq nom_bloc (nth (atoi posbl) liste_bl))
       (if liste_at
         (progn
           (and (eq sel "1")
             (progn
           (princ (strcat "\n Processing " (getvar "dwgname") " (current drawing)"))(princ)
           (rechercher_blocs doc)
           (princ " ...OK")(princ)
             )
           )
           (if (setq lst (vl-directory-files rep "*.dwg" 1))
             (progn
           (and (eq (strcase rep) (strcase (substr (getvar "dwgprefix") 1 (1- (strlen (getvar "dwgprefix"))))))
             (setq lst (vl-remove (getvar "dwgname") lst))
           )
           (foreach fic lst
             (setq sav nil modif nil)
             (if (and (not (vl-catch-all-error-p (setq lay (vl-catch-all-apply 'vla-item (list (vla-get-documents (vlax-get-acad-object)) fic)))))
                  (eq (vla-get-path lay) rep)
                 )
               (setq doc lay)
               (setq doc (ouvrir_dessin_dbx (strcat rep "/" fic))
                 sav T
               )
             )
             (if doc
               (progn
                 (princ (strcat "\n Processing " fic))(princ)
                 (rechercher_blocs doc)
                 (if modif
               (if sav
                 (progn
                   (princ " ...saving...")(princ)
                   (vla-saveas doc (strcat rep "/" fic))
                   (princ " ...OK")
                 )
                 (princ " ...REGEN if changes are not shown.")
               )
               (princ " ...cannot modify.")
                 )
                 (princ)
                 (vlax-release-object doc)
               )
             )
           )
             )
             (msgbox "PAT" 64 (strcat "Not in drawing" rep))
           )
         )
         (msgbox "PAT" 48 "no attribute in block")
       )
         )
         ((eq resultat 2)
       (rech_bl)
         )
         ((eq resultat 3)
       (rech_blat)
         )
         ((eq resultat 4)
       (if (setq rep (dirbox "Choose a folder to repeat attribute change command to ALL the drawings within."))
         (setq old rep)
         (setq rep old)
       )
         )
       )
     )
     (unload_dialog dcl_id)
   )
   (msgbox "PAT" 48 "Pas de bloc dans le dessin")
     )
   )
   (msgbox "PAT" 16 "Can't find PAT.DCL file.")
 )
 (setq *error* Old_Error)
 (vla-endundomark (vla-get-activedocument (vlax-get-acad-object)))
 (princ)
)

;(setq nom_lisp "PAT")
;(if (/= app nil)
;  (if (= (strcase (substr app (1+ (- (strlen app) (strlen nom_lisp))) (strlen nom_lisp))) nom_lisp)
;    (princ (strcat "..." nom_lisp " chargé."))
;    (princ (strcat "\n" nom_lisp ".LSP Chargé.....Tapez " nom_lisp " pour l'éxecuter.")))
;  (princ (strcat "\n" nom_lisp ".LSP Chargé......Tapez " nom_lisp " pour l'éxecuter.")))
;(setq nom_lisp nil)
(princ)

...

Link to comment
Share on other sites

Here's PAT.DCL

// =================================================================
//
//  PAT.DCL V1.00 eng
//
//  Copyright (C) Patrick_35
//
// =================================================================

pat : dialog {
 key = "titre";
 is_cancel = true;
 allow_accept = true;
 : boxed_column {
   label = "Select Block";
   key = "txtbl";
   : row {
     : popup_list {key = "listebl"; width = 40;}
     : button {label = ">>"; key = "chbl";}
   }
   spacer;
 }
 : boxed_column {
   label = "Select Attribute";
   key = "txtat";
   : row {
     : popup_list {key = "listeat"; width = 40;}
     : button {label = ">>"; key = "chat";}
   }
   spacer;
 }
 : boxed_column {
   label = "Enter new value";
   key = txtva;
   : edit_box {key = "valeur";}
   spacer;
 }
 : boxed_column {
   label = "Repeat to folder";
   : button {label = "Browse"; key = "rep";}
   : text   {key = "txt";}
 }
 spacer;
 : row {
   :toggle       {label = "Change current drawing"; key = "sel";}
   :radio_button {label = "New value"; key = "nou";}
   :radio_button {label = "Prefix"; key = "pre";}
   :radio_button {label = "Suffix"; key = "suf";}
 }
 spacer;
 ok_cancel;
}

Link to comment
Share on other sites

For this reason I prefer this method

http://www.cadtutor.net/forum/showpost.php?p=286306&postcount=20

use Acad in blackboard

Mybe I'm wrong, it works slowly

 

~'J'~

Sorry, I don't quite understand what your btim.lsp does. It just gives me an error "bad argument type: safearrayp nil"

 

Anyways, I've found a error in Pat.lsp, but I have no idea how to fix it. When you pick the attribute using the "popup_list" drop down, the attribute will not be the one you're trying to select. Seems like the list is all mixed up some how. But if you select your attribute using the button ">>" and select yourself, it works perfectly. Hopefully, someone here or Pat can shine some light on this.:wink:

Link to comment
Share on other sites

Hey Pat, this multiple attribute text change works great...thanks! Is there a way to change 3, 4 or 5 different attributes in one block at one time on multiple drawings rather than initiating the lsp routine over and over?...thanks! I'm thinking in terms of a titleblock that would have multiple attributes within it.

 

 

 

 

Hello

 

If I understood the request, here is attached a lisp (french) that changes the value of an attribute of all the drawings in a directory.

 

The idea is to open a drawing, select the attribute in question, then the directory to be processed and the lisp works for you.

 

@+

Link to comment
Share on other sites

Sorry, I don't quite understand what your btim.lsp does. It just gives me an error "bad argument type: safearrayp nil"

 

At the first you need to write all titleblock attributes with help of

btext.lsp (see above there)

Then edit values in the Excel file as you need

Then run btim.lsp

 

~'J'~

Link to comment
Share on other sites

  • 2 weeks later...

pat.lsp: Does anyone know how to manipulte this lsp routine to change 3, 4 or 5 different attributes in one block at one time on multiple drawings rather than initiating the lsp routine over and over...also is there a way to attsync each drawing before it saves and completes it, when I change an attribute value it shifts the text over. I am trying to use (command "attsync" "_n" "title block") but don't know where to insert it...thanks!

Link to comment
Share on other sites

  • 5 weeks later...
Can't test on that drawing, as I only have '04, and so can't open it, but try this on your atts:

 

(defun c:aTest (/ ss att)
 (if (setq ss (ssget "X" (list (cons 0 "INSERT")(cons 2 "T-A002A")
      (cons 66 1)(if (getvar "CTAB")(cons 410 (getvar "CTAB"))
             (cons 67 (- 1 (getvar "TILEMODE")))))))
   (progn
     (foreach ent (mapcar 'cadr (ssnamex ss))
   (setq att (entnext ent))
   (while (not (eq "SEQEND" (cdadr (entget att))))
     (cond ((eq "ECA-AREA-NAME" (cdr (assoc 2 (entget att))))
        (entmod (subst (cons 1 "TEST1") (assoc 1 (entget att)) (entget att))))
       ((eq "ECA-TITLE1" (cdr (assoc 2 (entget att))))
        (entmod (subst (cons 1 "TEST2") (assoc 1 (entget att)) (entget att)))))
     (setq att (entnext att))))
     (command "_regenall"))
   (princ "\n<!> No Blocks Found <!>"))
 (princ))

 

Pretty simple code, but untested - can be modified if need be :)

i went to this website for the dxf? codes that you use in your cons statements. how do you know which ones to use in your lisps for different situations. i see that there is brief descriptions but is there any other further explanation that you know of for these or how do you figure it out? http://autodesk.com/techpubs/autocad/acad2000/dxf/

Link to comment
Share on other sites

i went to this website for the dxf? codes that you use in your cons statements. how do you know which ones to use in your lisps for different situations. i see that there is brief descriptions but is there any other further explanation that you know of for these or how do you figure it out? http://autodesk.com/techpubs/autocad/acad2000/dxf/

 

 

It depends what you want to alter, for example as you can see, DXF code 1 is the string, so you need to change that to alter the string.

 

But yes, there may be a better explanation on AfraLISP :)

Link to comment
Share on other sites

  • 3 months later...
Does this work for you?

 

;; Global Attribute Changer
;; Copyright (c) Lee McDonnell 11.06.2009
;; Credit to Tony Tanzillo, Tim Willey.

(defun c:MacAtt  (/ *error* Blk Att Attlst Val Shell fDir Dir acVer dbx dwLst Tag)
 (vl-load-com)

 ;; Error Handler

 (defun *error*  (e)
   (ObjRel (list Shell dbx *acad))
   (if (not (wcmatch (strcase e) "*BREAK,*CANCEL*,*EXIT*"))
     (princ (strcat "\n<< Error: " e " >>")))
   (princ))

 ;; Get Block

 (while
   (progn
     (setq Blk (getstring t "\nSpecify Block Name: "))
     (cond ((eq "" Blk) t)
           ((snvalid Blk) nil)
           (t (princ "\n** Invalid Block Name **")))))

 ;; Get Attribute List

 (if Blk
   (progn
     (setq blk (strcase blk))

 ; get Att

     (while
       (progn
         (setq Att (getstring
                     (strcat "\nSpecify Tag in Block: " Blk
                             " for Att Change [* to List] <Exit>: ")))
         (cond ((eq "" Att) nil)
               ((eq (chr 42) Att)
                (princ (strcat "\n   " (Pad "Tag" 46 30) "Value"))
                (if Attlst
                  (foreach x  Attlst
                    (princ (strcat "\n" (Pad (car x) 46 30) (cdr x))))
                  (princ "\n   -- None --")))
               ((snvalid Att)
                (setq  Val (getstring t
                             (strcat "\nSpecify New Attribute Value for Tag: " Att " : ")))
                (setq Attlst (cons (cons (strcase Att) Val) Attlst)))
               (t (princ "\n** Invalid Attribute Tag **")))))

     (if Attlst
       (progn

         ;; Get Directory

         (setq *acad (vlax-get-acad-object)
               Shell (vla-getInterfaceObject *acad "Shell.Application")
               fDir  (vlax-invoke-method Shell 'BrowseForFolder
                       (vla-get-HWND *acad) "Select Directory: " 0))
         (if fDir
           (progn
             (setq Dir
                    (vlax-get-property
                      (vlax-get-property fDir 'Self) 'Path))
             (if (not (eq "\\" (substr Dir (strlen Dir))))
               (setq Dir (strcat Dir "\\")))
             (princ "\nProcessing...")

             ;; Iterate Drawings

             (foreach dwg  (setq dwLst
                                  (mapcar
                                    (function
                                      (lambda (x)
                                        (strcat Dir x)))
                                    (vl-directory-files Dir "*.dwg" 1)))

               (vlax-for doc (vla-get-Documents *acad)
                 (and (eq (strcase (vla-get-fullname doc)) (strcase dwg))
                      (setq dbx doc)))

               (and (not dbx)
                    (setq dbx
                      (vlax-create-object
                        (if (< (setq acVer (atoi (getvar "ACADVER"))) 16)
                          "ObjectDBX.AxDbDocument"
                          (strcat "ObjectDBX.AxDbDocument." (itoa acVer))))))

               (if (not (vl-catch-all-error-p
                          (vl-catch-all-apply 'vla-open (list dbx dwg))))

                 (progn

                   (vlax-for lay  (vla-get-Layouts dbx)
                     (vlax-for Obj  (vla-get-Block lay)
                       (if (and (eq (vla-get-ObjectName Obj) "AcDbBlockReference")
                                (eq (strcase (vla-get-Name Obj)) blk))
                         (foreach Att  (vlax-safearray->list
                                         (vlax-variant-value
                                           (vla-getAttributes Obj)))
                           (if (setq Tag (assoc (strcase (vla-get-TagString Att)) attlst))
                             (vla-put-TextString Att (cdr Tag)))))))

               (vla-saveas dbx dwg)))
               (princ (chr 46)))
             (princ (strcat "\n<< " (rtos (length dwLst) 2 0) " Drawings Processed >>")))
           (princ "*Cancel*")))
       (princ "\n<< No Attributes Specified >>")))
   (princ "\n<< No Block Specified >>"))

 ;; Garbage Collection

 (ObjRel (list Shell dbx *acad))
 (gc)
 (princ))

;; Release Objects ~ Requires List of Variables

(defun ObjRel  (lst)
 (mapcar
   (function
     (lambda (x)
       (if (and (eq (type x) 'VLA-OBJECT)
                (not (vlax-object-released-p x)))
         (vl-catch-all-apply
           'vlax-release-object
           (list x)))))
   lst))

;; Text Padder

(defun Pad  (Str Chc Len)
 (while (< (strlen Str) Len)
   (setq Str (strcat Str (chr Chc))))
 Str)

 

Dear LEE,

 

I am very proud of you to nake this kind of useful programming.

Do you have updated one for this lisp.

If not, Can you make dialog/form to avoid input at command prompt?

Can you change the browse folder to select files?

It will be very much useful for our concern.

 

Your sincerly.

Muthu.

Link to comment
Share on other sites

Thank you so much.

 

But if you provide the option to select the drawings from separate folders, it will be useful for us.

 

Yours,

Muthu.

 

Thanks for your feedback, but that would be quite a tricky update - I'm sure that you could run the program multiple times - that would still save a lot of time :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...