Jump to content

multiple drawing xref bind lisp


philk

Recommended Posts

I'm not sure why it doesn't like the purgeall, but oh well, you could always change it back to (command "_.-purge"...)

 

As for adding another function, I hate doing it, but if you must, I would add it just after the vla-purgeall, and call it like:

 

(c:PAA)

Link to comment
Share on other sites

  • Replies 131
  • Created
  • Last Reply

Top Posters In This Topic

  • erik_NL

    24

  • JeepMaster

    18

  • rkohan

    12

  • Lee Mac

    10

LEE MAC

 

its great lisp

but there is a quastion, what habbens with unloaded Xrefs?

 

Unloaded xrefs gets detached...or at least that's what my original lisp does.

Link to comment
Share on other sites

LeeMac,

Okay, so I've added my purge code in and it works fine. But now I can't see the list of problem xrefs because during purging, all the activity bump the command screen down. How can I list the problem xrefs in the end of the code?

(strcat "\n<< XREF: " (car xref)" Failed to Bind >>") 

Here's what I have so far.

(defun c:sent (/ *error* doc xlst dfile)
 (vl-load-com)

 (defun *error* (msg)
   (vla-EndUndoMark doc)
   (if (not (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*"))
     (princ (strcat "\n<< Error: " msg " >>"))
     (princ "\n*Cancel*"))
   (setvar "modemacro" ".")
   (princ))

 (setq doc (vla-get-ActiveDocument
             (vlax-get-acad-object)))
 (vla-StartUndoMark doc)
 (setvar "modemacro" "Audit/Bind/PurgeAll processing......please wait......")
 (vla-AuditInfo doc :vlax-true)
 (if (setq dfile (findfile "dummy.dwg"))
   (if (setq xlst (xstatus))
     (foreach xref xlst
       (if (not (x_bind (car xref) dfile (if (cdr xref) t)))
           (princ
             (strcat "\n<< XREF: " (car xref)" Failed to Bind >>"))))
     (princ "\n<< No XREFs Found >>"))
   (princ "\n<< Dummy File Not Found >>"))
 [color=Black](prompt "\nPurging RegApps")(terpri)
 (command "-purge" "R" "*" "N")
 (prompt "\nPurging #1")(terpri)
 (command "-purge" "a" "*" "N")
 (prompt "\nPurging #2")(terpri)
 (command "-purge" "a" "*" "N")
 (prompt "\nPurging #3")(terpri)
 (command "-purge" "a" "*" "N")[/color]
 (prompt "\n--- Audit, Bind, PurgeAll completed! ---")
 (setvar "modemacro" ".")
 (vla-EndUndoMark doc)
 (princ))

(defun xstatus (/ tdef elst flag xlst)
 (while (setq tdef (tblnext "BLOCK" (not tdef)))
   (cond ((eq 4 (logand 4 (cdr (assoc 70 tdef))))
          (setq elst
            (entget
              (tblobjname "BLOCK"
                (cdr (assoc 2 tdef))))
                flag (cdr (assoc 70 elst)))
          (setq xlst
            (cons (cons (cdr (assoc 2 elst))
                        (cond ((eq 32 (logand 32 flag)) nil)
                              ((assoc 71 elst) t)
                              (t t))) xlst)))))
 (reverse xlst))

(defun x_bind (xNme file flag / xref)
 (setq blk (vla-get-Blocks
             (vla-get-ActiveDocument
               (vlax-get-acad-object))))
 (if (not (vl-catch-all-error-p
            (vl-catch-all-apply
              (function
                (lambda (/ xref)
                  (setq xref (vla-item blk xNme))                   
                  (if flag
                    (progn
                      (vla-put-path xref file)
                      (vla-reload xref)))
                  (vla-Bind xref :vlax-false))))))
   t))

 

Thanks for the help so far Lee Mac.

Link to comment
Share on other sites

Two options:

 

 

1)

(defun c:sent (/ *error* doc xlst dfile)
 (vl-load-com)

 (defun *error* (msg)
   (vla-EndUndoMark doc)
   (if (not (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*"))
     (princ (strcat "\n<< Error: " msg " >>"))
     (princ "\n*Cancel*"))
   (setvar "modemacro" ".")
   (princ))

 (setq doc (vla-get-ActiveDocument
             (vlax-get-acad-object)))
 (vla-StartUndoMark doc)
 (setvar "modemacro" "Audit/Bind/PurgeAll processing......please wait......")
 (vla-AuditInfo doc :vlax-true)
 (if (setq dfile (findfile "dummy.dwg"))
   (if (setq xlst (xstatus))
     (foreach xref xlst
       (if (not (x_bind (car xref) dfile (if (cdr xref) t)))
           (princ
             (strcat "\n<< XREF: " (car xref)" Failed to Bind >>"))))
     (princ "\n<< No XREFs Found >>"))
   (princ "\n<< Dummy File Not Found >>"))
 (prompt "\nPurging RegApps")(terpri)
 (command "-purge" "R" "*" "N")
 (prompt "\nPurging #1")(terpri)
 (command "-purge" "a" "*" "N")
 (prompt "\nPurging #2")(terpri)
 (command "-purge" "a" "*" "N")
 (prompt "\nPurging #3")(terpri)
 (command "-purge" "a" "*" "N")
 (prompt "\n--- Audit, Bind, PurgeAll completed! ---")
 (setvar "modemacro" ".")
 (textscr)
 (vla-EndUndoMark doc)
 (princ))

(defun xstatus (/ tdef elst flag xlst)
 (while (setq tdef (tblnext "BLOCK" (not tdef)))
   (cond ((eq 4 (logand 4 (cdr (assoc 70 tdef))))
          (setq elst
            (entget
              (tblobjname "BLOCK"
                (cdr (assoc 2 tdef))))
                flag (cdr (assoc 70 elst)))
          (setq xlst
            (cons (cons (cdr (assoc 2 elst))
                        (cond ((eq 32 (logand 32 flag)) nil)
                              ((assoc 71 elst) t)
                              (t t))) xlst)))))
 (reverse xlst))

(defun x_bind (xNme file flag / xref)
 (setq blk (vla-get-Blocks
             (vla-get-ActiveDocument
               (vlax-get-acad-object))))
 (if (not (vl-catch-all-error-p
            (vl-catch-all-apply
              (function
                (lambda (/ xref)
                  (setq xref (vla-item blk xNme))                   
                  (if flag
                    (progn
                      (vla-put-path xref file)
                      (vla-reload xref)))
                  (vla-Bind xref :vlax-false))))))
   t))

2)

 

(defun c:sent (/ *error* doc xlst dfile lst)
 (vl-load-com)

 (defun *error* (msg)
   (vla-EndUndoMark doc)
   (if (not (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*"))
     (princ (strcat "\n<< Error: " msg " >>"))
     (princ "\n*Cancel*"))
   (setvar "modemacro" ".")
   (princ))

 (setq doc (vla-get-ActiveDocument
             (vlax-get-acad-object)))
 (vla-StartUndoMark doc)
 (setvar "modemacro" "Audit/Bind/PurgeAll processing......please wait......")
 (vla-AuditInfo doc :vlax-true)
 (if (setq dfile (findfile "dummy.dwg"))
   (if (setq xlst (xstatus))
     (foreach xref xlst
       (if (not (x_bind (car xref) dfile (if (cdr xref) t)))
           (setq lst
             (cons (strcat "\n<< XREF: " (car xref)" Failed to Bind >>") lst))))
     (princ "\n<< No XREFs Found >>"))
   (princ "\n<< Dummy File Not Found >>"))
 (prompt "\nPurging RegApps")(terpri)
 (command "-purge" "R" "*" "N")
 (prompt "\nPurging #1")(terpri)
 (command "-purge" "a" "*" "N")
 (prompt "\nPurging #2")(terpri)
 (command "-purge" "a" "*" "N")
 (prompt "\nPurging #3")(terpri)
 (command "-purge" "a" "*" "N")
 (prompt "\n--- Audit, Bind, PurgeAll completed! ---")
 (setvar "modemacro" ".")
 (if lst
   (mapcar 'princ (reverse lst)))
 (vla-EndUndoMark doc)
 (princ))

(defun xstatus (/ tdef elst flag xlst)
 (while (setq tdef (tblnext "BLOCK" (not tdef)))
   (cond ((eq 4 (logand 4 (cdr (assoc 70 tdef))))
          (setq elst
            (entget
              (tblobjname "BLOCK"
                (cdr (assoc 2 tdef))))
                flag (cdr (assoc 70 elst)))
          (setq xlst
            (cons (cons (cdr (assoc 2 elst))
                        (cond ((eq 32 (logand 32 flag)) nil)
                              ((assoc 71 elst) t)
                              (t t))) xlst)))))
 (reverse xlst))

(defun x_bind (xNme file flag / xref)
 (setq blk (vla-get-Blocks
             (vla-get-ActiveDocument
               (vlax-get-acad-object))))
 (if (not (vl-catch-all-error-p
            (vl-catch-all-apply
              (function
                (lambda (/ xref)
                  (setq xref (vla-item blk xNme))                   
                  (if flag
                    (progn
                      (vla-put-path xref file)
                      (vla-reload xref)))
                  (vla-Bind xref :vlax-false))))))
   t))

Link to comment
Share on other sites

That is excellent LeeMac. I used the 2nd option because I use it on batch scripts alot and don't want to have another pop up while running batch scripts. It works awsome! Thanks so much.

I'd buy you a beer if only I could reach over the computer to you. :)

Link to comment
Share on other sites

That is excellent LeeMac. I used the 2nd option because I use it on batch scripts alot and don't want to have another pop up while running batch scripts. It works awsome! Thanks so much.

I'd buy you a beer if only I could reach over the computer to you. :)

 

Glad you like it :)

 

Lee

Link to comment
Share on other sites

  • 2 weeks later...
See here

http://www.cadtutor.net/forum/showthread.php?t=38269

 

 

Dear Sir,

 

It worked but only to one drawing. what I need is to automate purge in multiple sheets.

Link to comment
Share on other sites

Dear Sir,

 

It worked but only to one drawing. what I need is to automate purge in multiple sheets.

 

It should work on every drawing that it open - so you can open all the drawings you want it done to, and run it :)

Link to comment
Share on other sites

Or you can use batch script programs like ScriptPro and run your scripts to a folder of drawings. I personally like using SuperScript, it's much faster and doesn't close/reopen autocad on every drawing.

The script then would just be something very simple like:

PurgeAll
QSave

Link to comment
Share on other sites

Or you can use batch script programs like ScriptPro and run your scripts to a folder of drawings. I personally like using SuperScript, it's much faster and doesn't close/reopen autocad on every drawing.

The script then would just be something very simple like:

PurgeAll
Save

 

 

Thank you Mr. Jeep Master, that exactly I want to run script to my drawing folder. The Code the you give me is just like that how to execute that. I am not very familiar using ScriptPro and superscript. Would you like to help me to further. Thanks a lot I learned a lot.

Sorry for my grammar I am not a english man, Im from Philippines

Link to comment
Share on other sites

Here's a simple tutorial showing how to use scriptpro. I'm linking you to this since scriptpro is free and you might even have it on your machine already. It's part of AutoCAD if you have it installed during setup.

http://www.lazydrafter.com/autocad-tips/scriptpro/

 

To write the actual script, just open notepad from your computer and type in:

PurgeAll

QSave

 

Save the file with "scr" extension. Like: PurgeAll.scr

Now use this file as per the tutorial. I hope it works out for you.:)

Link to comment
Share on other sites

Here's a simple tutorial showing how to use scriptpro. I'm linking you to this since scriptpro is free and you might even have it on your machine already. It's part of AutoCAD if you have it installed during setup.

http://www.lazydrafter.com/autocad-tips/scriptpro/

 

To write the actual script, just open notepad from your computer and type in:

PurgeAll

QSave

 

Save the file with "scr" extension. Like: PurgeAll.scr

Now use this file as per the tutorial. I hope it works out for you.:)

 

Thanks Mr. jeepmaster! I will come back to you if there any problem I might be encountered. Thanks a lot Hope you don;t mind

Link to comment
Share on other sites

  • 4 weeks later...

Lee Mac

Thank you and jeepmaster for your lsp.:D

They work great for me in 2008 acad but i'm now upgrading to 2010 acad.

In 2010 I get a problem that it will not bind Xref’s who status is not found .

This did work in 2008, in 2009 it worked but reported it didn't for some reason.

Could the problem be that all dwg's are not in 2010 format?

Or do you have any other ideas why it isn't working?

Link to comment
Share on other sites

hey guys,

 

so not sure why but one of the earlier lsp that jeepmaster posted that didn't always work in 2008 now always works in 2010 and the lsp that lee mac has always works in 2008. see below

 

acad can be funny but anyway thaks for all the info

next part is to save the file with a new, add a custom layout i have (blank except a disclaimer) then do an exportlayout. this way the model space bound dwg's that we issue will have our disclaimer at the approbriate scale.

 

then if i can only get this to run as a batch file on muliiple files on a folder, then i will be much loved around my office.:D:D

 

2010 lsp

;...............................................................................
;
;       << Detach unloaded/unresolved xrefs, Bind xrefs, Audit, Purge >>
;                              << June 2009 >>
;                              << Version 2.2.1 >>
;
;          NOTE: Must have a blank dwg in search path name "dummy.dwg" 
;
;...............................................................................

(defun C:SENT ( / )

 (defun *error*(msg)
   (setvar "bindtype" oldBnType)
   (setvar "cmdecho" 1)
   (princ "\n...undoing SENT...")
   (command "_undo" "E")
   (command "_undo" "1")
   (command "regenall")(terpri)
   (princ "\n...SENT Undone!...Audit/Bind/PurgeAll terminated!!!  ")
   (setvar "modemacro" ".")
   (princ)
   ); end of *error*

 (command "_undo" "BE")
 (setvar "modemacro" "Audit/Bind/PurgeAll processing......please wait......")
 (setvar "cmdecho" 0)
 (prompt "\n--- Audit/Bind/PurgeAll......please wait---")
 (prompt "\nAuditing...")(terpri)
 (command "_audit" "y")
 (command "-purge" "a" "*" "N")
 (bind_xrefs)
 (prompt "\nPurging RegApps")(terpri)
 (command "-purge" "R" "*" "N")
 (prompt "\nPurging #1")(terpri)
 (command "-purge" "a" "*" "N")
 (prompt "\nPurging #2")(terpri)
 (command "-purge" "a" "*" "N")
 (prompt "\nPurging #3")(terpri)
 (command "-purge" "a" "*" "N")
 (command "_undo" "E")(terpri)
 (prompt "\n--- Audit, Bind, PurgeAll completed! ---")
 (setvar "modemacro" ".")
 (setvar "cmdecho" 1)
 (princ)
); end of c:sent



(defun bind_xrefs ( / CMD)
 (setq oldBnType(getvar "bindtype"))
 (setq CMD (getvar "CMDECHO"))
 (setvar "CMDECHO" 0)
 (setvar "bindtype" 0)
 (setq XLIST (xref-status))
 (if XLIST 
   (progn
     (prompt "\nBinding all Xrefs...")
     (foreach n XLIST (rem-xref n))  
     (command "-xref" "b" "*" )
     (prompt "...done")(terpri)
   )  
 )
 (setvar "CMDECHO" CMD)
 (setvar "bindtype" oldBnType)
 (princ)
)


(defun rem-xref ( XL / XNAME XSTATUS )
 (setq XNAME (nth 0 XL))
 (setq XSTATUS (nth 2 XL))
 (if (= XSTATUS "UNLOADED")
   (rem_unload)
 )
 (if (= XSTATUS "UNRESOLVED")
   (rem_unload)
 )
)


(defun xref-status ( / d n f r)
 (while (setq d (tblnext "block" (null d)))
   (cond
     (
       (eq 4 (logand 4 (cdr (assoc 70 d))))
       (setq
         d (entget (tblobjname "block" (cdr (assoc 2 d))))
         n (cdr (assoc 2 d))
         p (cdr (assoc 3 d))
         f (cdr (assoc 70 d))
       )
       (setq r
         (cons
           (list n p
             (cond
               ( (eq 32 (logand 32 f)) "LOADED")
               ( (assoc 71 d) "UNLOADED")
               ( t "UNRESOLVED")
             )
           )
           r
         )
       )
     )
   )
 )
 (reverse r)
)




(defun rem_unload ( / )
 (setq DFILE (findfile "dummy.dwg"))
 (if (not DFILE)
   (prompt "\nCannot find dummy_xref drawing ")
   (progn
     (command "-xref" "p" XNAME DFILE)
     (command "-xref" "r" XNAME)
   )
 )
)

 

2008 lsp

[b][color=#ff0000]([/color][color=blue]defun[/color][/b] c:sent [b][color=red]([/color][/b][b][color=blue]/[/color][/b] *error* doc xlst dfile[b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]vl-load-com[/color][/b][b][color=red])[/color][/b]

[b][color=red]([/color][/b][b][color=blue]defun[/color][/b] *error* [b][color=red]([/color][/b]msg[b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]vla-EndUndoMark[/color][/b] doc[b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]if[/color][/b] [b][color=red]([/color][/b][b][color=blue]not[/color][/b] [b][color=red]([/color][/b][b][color=blue]wcmatch[/color][/b] [b][color=red]([/color][/b][b][color=blue]strcase[/color][/b] msg[b][color=red])[/color][/b] [b][color=#ff00ff]"*BREAK,*CANCEL*,*EXIT*"[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]princ[/color][/b] [b][color=red]([/color][/b][b][color=blue]strcat[/color][/b] [b][color=#ff00ff]"\n<< Error: "[/color][/b] msg [b][color=#ff00ff]" >>"[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]princ[/color][/b] [b][color=#ff00ff]"\n*Cancel*"[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]princ[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]

[b][color=red]([/color][/b][b][color=blue]setq[/color][/b] doc [b][color=red]([/color][/b][b][color=blue]vla-get-ActiveDocument[/color][/b]
[b][color=red]([/color][/b][b][color=blue]vlax-get-acad-object[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]vla-StartUndoMark[/color][/b] doc[b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]vla-AuditInfo[/color][/b] doc [b][color=blue]:vlax-true[/color][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]if[/color][/b] [b][color=red]([/color][/b][b][color=blue]setq[/color][/b] dfile [b][color=red]([/color][/b][b][color=blue]findfile[/color][/b] [b][color=#ff00ff]"dummy.dwg"[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]if[/color][/b] [b][color=red]([/color][/b][b][color=blue]setq[/color][/b] xlst [b][color=red]([/color][/b]xstatus[b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]foreach[/color][/b] xref xlst
[b][color=red]([/color][/b][b][color=blue]if[/color][/b] [b][color=red]([/color][/b][b][color=blue]not[/color][/b] [b][color=red]([/color][/b]x_reload [b][color=red]([/color][/b][b][color=blue]car[/color][/b] xref[b][color=red])[/color][/b] dfile [b][color=red]([/color][/b][b][color=blue]if[/color][/b] [b][color=red]([/color][/b][b][color=blue]cdr[/color][/b] xref[b][color=red])[/color][/b] [b][color=blue]t[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]princ[/color][/b]
[b][color=red]([/color][/b][b][color=blue]strcat[/color][/b] [b][color=#ff00ff]"\n<< XREF: "[/color][/b] [b][color=red]([/color][/b][b][color=blue]car[/color][/b] xref[b][color=red])[/color][/b][b][color=#ff00ff]" Failed to Bind >>"[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]princ[/color][/b] [b][color=#ff00ff]"\n<< No XREFs Found >>"[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]princ[/color][/b] [b][color=#ff00ff]"\n<< Dummy File Not Found >>"[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]vla-PurgeAll[/color][/b] doc[b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]vla-EndUndoMark[/color][/b] doc[b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]princ[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]

[b][color=red]([/color][/b][b][color=blue]defun[/color][/b] xstatus [b][color=red]([/color][/b][b][color=blue]/[/color][/b] tdef elst flag xlst[b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]while[/color][/b] [b][color=red]([/color][/b][b][color=blue]setq[/color][/b] tdef [b][color=red]([/color][/b][b][color=blue]tblnext[/color][/b] [b][color=#ff00ff]"BLOCK"[/color][/b] [b][color=red]([/color][/b][b][color=blue]not[/color][/b] tdef[b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]cond[/color][/b] [b][color=red]([/color][/b][b][color=red]([/color][/b][b][color=blue]eq[/color][/b] [b][color=#009900]4[/color][/b] [b][color=red]([/color][/b][b][color=blue]logand[/color][/b] [b][color=#009900]4[/color][/b] [b][color=red]([/color][/b][b][color=blue]cdr[/color][/b] [b][color=red]([/color][/b][b][color=blue]assoc[/color][/b] [b][color=#009900]70[/color][/b] tdef[b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]setq[/color][/b] elst
[b][color=red]([/color][/b][b][color=blue]entget[/color][/b]
[b][color=red]([/color][/b][b][color=blue]tblobjname[/color][/b] [b][color=#ff00ff]"BLOCK"[/color][/b]
[b][color=red]([/color][/b][b][color=blue]cdr[/color][/b] [b][color=red]([/color][/b][b][color=blue]assoc[/color][/b] [b][color=#009900]2[/color][/b] tdef[b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]
                flag [b][color=red]([/color][/b][b][color=blue]cdr[/color][/b] [b][color=red]([/color][/b][b][color=blue]assoc[/color][/b] [b][color=#009900]70[/color][/b] elst[b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]setq[/color][/b] xlst
[b][color=red]([/color][/b][b][color=blue]cons[/color][/b] [b][color=red]([/color][/b][b][color=blue]cons[/color][/b] [b][color=red]([/color][/b][b][color=blue]cdr[/color][/b] [b][color=red]([/color][/b][b][color=blue]assoc[/color][/b] [b][color=#009900]2[/color][/b] elst[b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]cond[/color][/b] [b][color=red]([/color][/b][b][color=red]([/color][/b][b][color=blue]eq[/color][/b] [b][color=#009900]32[/color][/b] [b][color=red]([/color][/b][b][color=blue]logand[/color][/b] [b][color=#009900]32[/color][/b] flag[b][color=red])[/color][/b][b][color=red])[/color][/b] [b][color=blue]nil[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=red]([/color][/b][b][color=blue]assoc[/color][/b] [b][color=#009900]71[/color][/b] elst[b][color=red])[/color][/b] [b][color=blue]t[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]t[/color][/b] [b][color=blue]t[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b] xlst[b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]reverse[/color][/b] xlst[b][color=red])[/color][/b][b][color=red])[/color][/b]

[b][color=red]([/color][/b][b][color=blue]defun[/color][/b] x_bind [b][color=red]([/color][/b]xNme file flag [b][color=blue]/[/color][/b] xref[b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]setq[/color][/b] blk [b][color=red]([/color][/b][b][color=blue]vla-get-Blocks[/color][/b]
[b][color=red]([/color][/b][b][color=blue]vla-get-ActiveDocument[/color][/b]
[b][color=red]([/color][/b][b][color=blue]vlax-get-acad-object[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]if[/color][/b] [b][color=red]([/color][/b][b][color=blue]not[/color][/b] [b][color=red]([/color][/b][b][color=blue]vl-catch-all-error-p[/color][/b]
[b][color=red]([/color][/b][b][color=blue]vl-catch-all-apply[/color][/b]
[b][color=red]([/color][/b][b][color=blue]function[/color][/b]
[b][color=red]([/color][/b][b][color=blue]lambda[/color][/b] [b][color=red]([/color][/b][b][color=blue]/[/color][/b] xref[b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]setq[/color][/b] xref [b][color=red]([/color][/b][b][color=blue]vla-item[/color][/b] blk xNme[b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]if[/color][/b] flag
[b][color=red]([/color][/b][b][color=blue]progn[/color][/b]
[b][color=red]([/color][/b][b][color=blue]vla-put-path[/color][/b] xref file[b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]vla-reload[/color][/b] xref[b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=red]([/color][/b][b][color=blue]vla-Bind[/color][/b] xref [b][color=blue]:vlax-false[/color][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]
[b][color=blue]t[/color][/b][b][color=red])[/color][/b][b][color=red])[/color][/b]

Edited by SLW210
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...