Community
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Batch Custom Progress plot block in multiple drawings

Batch Custom Progress plot block in multiple drawings

The publish tool is great for publishing multiple drawings at once but the stamp option is very limited and it doesn't allow you to add for example a custom block like a progress plot block. right now if I need to sent progress plots to somebody I have to open every grading to turn on the layer with the block save them all and then use the publish tool.

2 Comments
ChrisRS
Mentor

I agree.

 

WORK AROUD

We publish to PDFs. I also use PDF Revu (Bluebeam). I open the published multi page PDF in Revu, create a markup (Progress Block), right click on the markup, select apply to all pages, and save the PDF.

 

I suspect that Acrobat and other programs have a similar capability.

BlackBox_
Advisor

1+

 

I use Acrobat to append Watermarks before sending out certain digital submittals.  It's a bit cumbersome to get each sheet to look good, unless you have the empty space needed for same already accounted for in your title blocks, etc. but possible, and still takes less time than reopening, plotting, and closing each plan sheet.

 

That said, it sounds like @csanchez already has the desired stamp in each sheet, and just needs a quicker way to freeze / thaw that layer before Publishing plans... In which case, this may be of use:

 

(vl-load-com)

(defun c:BLAYFRZ () (_BatchLayer "\rBATCHLAYERFREEZE " :vlax-true))
(defun c:BLAYTHW () (_BatchLayer "\rBATCHLAYERTHAW " :vlax-false))
;;;--------------------------------------------------------------------;
(defun _BatchLayer (msg frz / *error* acApp dwgName oShell oFolder path
                    dwgs layerName dbxDoc nomutt dwgName i
                   )

  (princ msg)

  (defun *error* (msg)
    (if nomutt
      (setvar 'nomutt nomutt)
    )
    (if oShell
      (vlax-release-object oShell)
    )
    (if dbxDoc
      (vlax-release-object dbxDoc)
    )
    (cond ((not msg))                                                   ; Normal exit
          ((member msg '("Function cancelled" "quit / exit abort")))    ; <esc> or (quit)
          ((princ (strcat "\n** Error: " msg " ** ")))                  ; Fatal error, display it
    )
    (princ)
  )

  (if
    (and
      (setq acApp (vlax-get-acad-object))
      (setq dwgName (getvar 'dwgname))
      (setq oShell (vla-getinterfaceobject
                     acApp
                     "Shell.Application"
                   )
      )
      (setq oFolder (vlax-invoke
                      oShell
                      'BrowseForFolder
                      (vla-get-hwnd acApp)
                      "Select folder to process:"
                      0
                      (+ 1 64 256)
                    )
      )
      (setq path (vlax-get-property
                   (vlax-get-property oFolder 'Self)
                   'Path
                 )
      )
      (setq dwgs (vl-directory-files path "*.dwg" 1))
      (setq layerName
             (getstring T
                        "\nEnter WCMATCH layer name(s) to thaw: "
             )
      )
      (princ "\nWorking, please wait...")
      (princ)
      (setq dbxDoc (vla-getinterfaceobject
                     acApp
                     (strcat "ObjectDBX.AxDbDocument."
                             (substr (getvar 'acadver) 1 2)
                     )
                   )
      )
      (setq nomutt (getvar 'nomutt))
      (setvar 'nomutt 1)
    )
     (progn
       (foreach dwg dwgs
         (if (/= dwg dwgName)
           (progn
             (vl-catch-all-apply
               'vla-open
               (list dbxDoc (setq dwgName (strcat path "\\" dwg)))
             )
             (setq i 0)
             (vlax-for x (vla-get-layers dbxDoc)
               (if
                 (and
                   (wcmatch (vla-get-name x) layerName)
                   (/= (vla-get-freeze x) frz)
                 )
                  (if
                    (not
                      (vl-catch-all-error-p
                        (vl-catch-all-apply
                          'vla-put-freeze
                          (list x frz)
                        )
                      )
                    )
                     (setq i (1+ i))
                  )
               )
             )
             (if (< 0 i)
               (vla-saveas dbxDoc dwgName)
             )
             (setvar 'nomutt 0)
             (prompt
               (strcat "\n >> "
                       dwg
                       " >> "
                       (itoa i)
                       " layer"
                       (if (= 1 i)
                         ""
                         "s"
                       )
                       (if (= :vlax-true frz)
                         " frozen "
                         " thawed "
                       )
               )
             )
             (setvar 'nomutt 1)
           )
         )
       )
       (setvar 'nomutt 0)
       (prompt "\nDone. \n")
       (*error* nil)
     )
     (cond
       (layerName
        (*error*
          "Unable to create \"ObjectDBX.AxDbDocument\" Object"
        )
       )
       (path (*error* "No drawings found"))
       (oShell (*error* nil))
       (dwgName
        (*error* "Unable to create \"Shell.Application\" Object")
       )
       ((*error*
          "Unable to create \"AcadApplication Object\" Object"
        )
       )
     )
  )
)

 

Cheers

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Answer Day

Rail Community


 

Autodesk Design & Make Report