<?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: Update xref insertion to 0,0,0 in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284425#M3805</link>
    <description>&lt;P&gt;Thanks for the extra info: sadly it does not change anything, unless you can share DWG examples of a "factory" and a couple of "pieces" for someone to confirm.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jan 2025 19:08:48 GMT</pubDate>
    <dc:creator>pendean</dc:creator>
    <dc:date>2025-01-27T19:08:48Z</dc:date>
    <item>
      <title>Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284319#M3801</link>
      <description>&lt;P&gt;We have a master drawing that pulls in several hundred xrefs and most xrefs do not have a 0,0,0 insertion point.&amp;nbsp; I am looking for a lisp routine that would create a copy of each xref drawing with an updated insertion point allowing each drawing to be inserted using 0,0,0.&amp;nbsp; There may be a couple ways to skin this cat but my intitial thought would be to bind the xrefs and then wblock them back out.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 18:01:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284319#M3801</guid>
      <dc:creator>bsanada</dc:creator>
      <dc:date>2025-01-27T18:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284345#M3802</link>
      <description>&lt;P&gt;XREFs and blocks always have a &lt;SPAN&gt;0,0,0 insertion point, you literally can't avoid it:&amp;nbsp;&lt;/SPAN&gt;if I may ask, do you mean and are you by chance just assuming the point&amp;nbsp;&lt;SPAN&gt;0,0,0 always means your content from the XREFs are always going to align?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 18:13:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284345#M3802</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2025-01-27T18:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284379#M3803</link>
      <description>&lt;P&gt;For reference the project involves a 3D arrangement of equipment in a factory.&amp;nbsp; Our overall model xreferences each piece of equipment into a master file, but the insertion point of each piece of xreferenced eqiupment is not 0,0,0 to have the equipment in the proper location in the overal general arrangement.&amp;nbsp; The individual equipment files have a random insertion point and the xrefs are being moved around to fit the arrangment in the master file.&amp;nbsp; I am looking for a way to update the insertion points in the equipment files so they can be inserted at 0,0,0.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 18:27:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284379#M3803</guid>
      <dc:creator>bsanada</dc:creator>
      <dc:date>2025-01-27T18:27:05Z</dc:date>
    </item>
    <item>
      <title>Betreff: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284393#M3804</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;your idea is not so bad, just in details not the best way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You insert all, you move* each to the place you need (hoping it is just the position, not the rotation)&lt;/P&gt;&lt;P&gt;and a Tool would edit the xref files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good workflow, I like it and will take a look.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*You have to move, because a program can't know where the right position is.&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>Mon, 27 Jan 2025 18:31:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284393#M3804</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2025-01-27T18:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284425#M3805</link>
      <description>&lt;P&gt;Thanks for the extra info: sadly it does not change anything, unless you can share DWG examples of a "factory" and a couple of "pieces" for someone to confirm.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 19:08:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284425#M3805</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2025-01-27T19:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284426#M3806</link>
      <description>&lt;P&gt;Any reason for making a copy of the xref dwgs? &amp;nbsp;That would defeat the purpose of the use of xrefs. The idea is to make the change once and not twice. You might as well bind the xrefs as block inserts in the master dwg and then modify each of the block inserts base points.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 18:54:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284426#M3806</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-01-27T18:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284472#M3807</link>
      <description>&lt;P&gt;FYI after converting all xrefs to block inserts in master dwg then you can use Lee Macs &lt;A href="https://lee-mac.com/changeblockinsertion.html" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;CBPR&lt;/STRONG&gt;&lt;/A&gt; command to change all the bound blocks insert point to master dwgs 0,0,0&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 20:26:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284472#M3807</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-01-27T20:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284574#M3808</link>
      <description>&lt;P&gt;Thank you,this seems like it would be a useful part of the solution.&amp;nbsp; I will check it out.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 20:18:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284574#M3808</guid>
      <dc:creator>bsanada</dc:creator>
      <dc:date>2025-01-27T20:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284581#M3809</link>
      <description>&lt;P&gt;You’re welcome and hope that works out for you…cheers!!!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 20:27:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284581#M3809</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-01-27T20:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284679#M3810</link>
      <description>&lt;P&gt;I would:&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; Draw a LINE from some identifiable point in each Xref in the master drawing, to the master drawing's 0,0.&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp; Ctrl-X remove it from the master drawing and put it in the clipboard.&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp; OPEN the Xref'd file.&lt;/P&gt;
&lt;P&gt;4.&amp;nbsp; Ctrl-V paste that Line in, and MOVE it to have the appropriate end at that same identifiable point.&lt;/P&gt;
&lt;P&gt;5.&amp;nbsp; Use the &lt;STRONG&gt;BASE&lt;/STRONG&gt; command to set the insertion point of that drawing to &lt;EM&gt;the other end of that Line&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;6.&amp;nbsp; ERASE the Line.&lt;/P&gt;
&lt;P&gt;7.&amp;nbsp; QSAVE &amp;amp; CLOSE the Xref'd drawing, and reload it in the master drawing.&lt;/P&gt;
&lt;P&gt;8.&amp;nbsp; MOVE it from its new insertion point to 0,0 [you can grip-edit, or just type in Properties].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 21:40:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13284679#M3810</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2025-01-27T21:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13287114#M3811</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6346"&gt;@bsanada&lt;/a&gt;&amp;nbsp; hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;check this XREFOUT command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Run this only on master.dwg after you exactly placed all your xrefs.&lt;/P&gt;&lt;P&gt;the command starts by asking the folder to save the xrefs. of course you could select the origin folder and override the origin xrefs but it's recommended to place them in a new.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you Lee Mac for the amazing (&lt;SPAN&gt;LM:browseforfolder) function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;before run, it is recommended to manually try to bind each xref to reduce&amp;nbsp;failures at run time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;to achieve what you want, xrefout do:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. set xref scale to 1x1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. set xref rotation to 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. xref bind&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4. explode blocks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;5. turn all layers on&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;6. gather all exploded objects to SS&amp;nbsp; selection set.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;7. write out block (WBLOCK)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cause you said i have several hundred xrefs this could be long process... a progress bar is used.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if it work without errors, your master drawing should be left intact&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;enjoy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Moshe&lt;/SPAN&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;;; Browse for Folder  -  Lee Mac
;; Displays a dialog prompting the user to select a folder.
;; msg - [str] message to display at top of dialog
;; dir - [str] [optional] root directory (or nil)
;; bit - [int] bit-coded flag specifying dialog display settings
;; Returns: [str] Selected folder filepath, else nil.

(defun LM:browseforfolder ( msg dir bit / err fld pth shl slf )
    (setq err
        (vl-catch-all-apply
            (function
                (lambda ( / app hwd )
                    (if (setq app (vlax-get-acad-object)
                              shl (vla-getinterfaceobject app "shell.application")
                              hwd (vl-catch-all-apply 'vla-get-hwnd (list app))
                              fld (vlax-invoke-method shl 'browseforfolder (if (vl-catch-all-error-p hwd) 0 hwd) msg bit dir)
                        )
                        (setq slf (vlax-get-property fld 'self)
                              pth (vlax-get-property slf 'path)
                              pth (vl-string-right-trim "\\" (vl-string-translate "/" "\\" pth))
                        )
                    )
                )
            )
        )
    )
    (if slf (vlax-release-object slf))
    (if fld (vlax-release-object fld))
    (if shl (vlax-release-object shl))
    (if (vl-catch-all-error-p err)
        (prompt (vl-catch-all-error-message err))
        pth
    )
)


; Save xref back to disk to 0,0,0
(defun c:xrefout (/ is_acetutil_modula_exist objects_counter get_last_ent       ; local functions
                    adoc blocks folder ctr pbar_ctr AcDbEntity AcDbBlkTblRec    ; local variable
                    xname xrefname newxrefname ename ss xn xname)               ; local variables
  
  ; check if aceutil.arx is loaded?
 (defun is_acetutil_modula_exist ()
  (if (null (member "acetutil.arx" (arx)))
   (progn
    (setq *isAcetUtil* :vlax-false)
    (vlr-beep-reaction)
    (prompt "\nacetutil.arx modula is not loaded.")
   )
   (setq *isAcetUtil* :vlax-true)
  )
 ); is_acetutil_modula_exist
  
  
 ; return cumulate number of objects in xrefs
 (defun objects_counter (/ counter AcDbBlkTblRec)
  (setq counter -1)
  (vlax-for AcDbBlkTblRec blocks
   (if (and
         (eq (vla-get-isXref AcDbBlkTblRec) :vlax-true)
         ; make sure it is attached
         (ssget "_x" (list '(0 . "insert") (cons '2 (vla-get-name AcDbBlkTblRec))))
       )
    (setq counter (+ counter (vla-get-count AcDbBlkTblRec)))
   )  
  ); vlax-for
   
  counter
 ); objects_counter

  
 ; make sure last entity is exist
 ; even if drawing is empty
 (defun get_last_entity ()
  (command "._point" "0,0,0")
  (entlast)
 ); get_last_entity
   
  
 : Here start c:xrefout
 (setq adoc (vla-get-activedocument (vlax-get-acad-object)))
 (vla-startundomark adoc)
  
 (setq blocks (vla-get-blocks adoc))
  
 (setvar "cmdecho" 0)
 (setvar "expert"  5)
 
 (if (setq folder (LM:browseforfolder "Select a folder" (getvar "dwgprefix") 0))
  (progn 
   (is_acetutil_modula_exist) 
   (setq ctr (objects_counter))
   
   ; init progress meter
   (if (eq *isAcetUtil* :vlax-true)
    (progn
     ; progress bar init requires bigger value 
     (acet-ui-progress-init "Processing" ctr)
     (setq pbar_ctr -1) ; progress bar counter
    ); progn
   ); if    

   (vlax-for AcDbEntity (vla-get-modelspace adoc)
    (if (and
         (eq (vla-get-objectname AcDbEntity) "AcDbBlockReference")
         (not (wcmatch (setq xname (vla-get-name AcDbEntity)) "`*U*"))  ; not anonymous block
         (null (member (strcase xname) lst))                            ; not processed yet
         (setq AcDbBlkTblRec (vla-item blocks xname))                   ; get BTR
         (eq (vla-get-isXref AcDbBlkTblRec) :vlax-true)                 ; is it xref?
         (setq xrefname (vla-get-path AcDbBlkTblRec))
         (setq newxrefname (strcat folder "\\" (vl-filename-base xrefname) ".dwg"))
        )
     (progn
      (vlax-release-object AcDbBlkTblRec)
      (setq AcDbBlkTblRec nil)
       
      ; update progress meter 
      (if (eq *isAcetUtil* :vlax-true)
       (progn 
        (setq pbar_ctr (1+ pbar_ctr)) ; inc progress bar
        (acet-ui-progress-safe pbar_ctr)
       ); progn
      ); if
         
      (command "._undo" "_begin")
      (setq ss (ssadd) ename (get_last_entity))
       
      ; make sure the xref will be saved at X=1,Y=1,Z=1,R=0
      (vla-put-XScaleFactor AcDbEntity 1.0)
      (vla-put-YScaleFactor AcDbEntity 1.0)
      (vla-put-ZScaleFactor AcDbEntity 1.0)
      (vla-put-rotation     AcDbEntity 0.0)
           
      (command "._xref" "_bind" xname)
      (command "._explode" (vlax-vla-object-&amp;gt;ename AcDbEntity))
      ; make sure all objects selected
      (command "._layer" "_thaw" "*" "_on" "*" "_unlock" "*" "") 
      
      ; collecting all objects
      (while (setq ename (entnext ename))
       (ssadd ename ss)  
      ); while

      ; write out wblock\xref
      (command "._wblock" (strcat folder "\\" xname) "" "0,0,0" "_si" ss)
      (command "._undo" "_end")
      (command "._u") ; restore actions
       
      (setq lst (cons (strcase xname) lst))
     ); progn
     ; else
     (if (and
          AcDbBlkTblRec
          (eq (type AcDbBlkTblRec) VLA-Object)
         )
      (progn
       (vlax-release-object AcDbBlkTblRec)
       (setq AcDbBlkTblRec nil)
      ); progn
     ); if
    ); if
            
    (vlax-release-object AcDbEntity)         
   ); vlax-for
    
   (if (eq *isAcetUtil* :vlax-true)
    (acet-ui-progress-done); close progress meter
   )
  ); progn
 ); if
  
 (setvar "expert"  0)
 (setvar "cmdecho" 1)
  
 (vlax-release-object blocks)
  
 (vla-endundomark adoc)
 (vlax-release-object adoc)

 (princ "\nDone.")
 (princ)
); c:xrefout&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 21:14:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13287114#M3811</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-01-28T21:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13287121#M3812</link>
      <description>&lt;P&gt;This sounds very promising.&amp;nbsp; I will test it out when I get a chance. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 21:19:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13287121#M3812</guid>
      <dc:creator>bsanada</dc:creator>
      <dc:date>2025-01-28T21:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13289425#M3813</link>
      <description>&lt;P&gt;I tested this on a file and received the following error "; error: bad argument type: fixnump: 0".&amp;nbsp; I did confirm all xrefs would bind without any issues before trying to run this routine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks - Brad&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2025 22:35:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13289425#M3813</guid>
      <dc:creator>bsanada</dc:creator>
      <dc:date>2025-01-29T22:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13289640#M3814</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6346"&gt;@bsanada&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I am not offering any code, but here is the way I would attack the issue...&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a list of all the xrefs including their full paths.&lt;/LI&gt;&lt;LI&gt;Make sure that SDI is 0.&lt;/LI&gt;&lt;LI&gt;Set a bulletin board variable to, say, "Fixing insbases"&lt;/LI&gt;&lt;LI&gt;Open each xref in the list, which will temporarily make each the active drawing.&lt;/LI&gt;&lt;LI&gt;Check the bulletin board value to see if the conversion is in progress.&lt;BR /&gt;If not, then quit that xref drawing; otherwise&lt;/LI&gt;&lt;LI&gt;(setvar "insbase" '(0 0 0)&lt;/LI&gt;&lt;LI&gt;Save and close the xref drawing.&lt;BR /&gt;This will return focus to the host drawing and make it active again.&lt;/LI&gt;&lt;LI&gt;Reload the xref.&lt;/LI&gt;&lt;LI&gt;Repeat steps 4 though 8 for each xref.&lt;/LI&gt;&lt;LI&gt;Set the bulletin board value to nil.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 30 Jan 2025 00:44:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13289640#M3814</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2025-01-30T00:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13290028#M3815</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6346"&gt;@bsanada&lt;/a&gt;&amp;nbsp;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry it did not work and i think i know why and gave a fix so try again&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&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>Thu, 30 Jan 2025 08:21:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13290028#M3815</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-01-30T08:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13290039#M3816</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Brad do not wants just setting each xref insertion point to 0,0,0 but it wants the 0,0,0 of the master.dwg&lt;/P&gt;&lt;P&gt;for this he needs to attach each xref inside master, position it in right place and then wblock out as master 0,0,0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope i am not wrong&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&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>Thu, 30 Jan 2025 08:30:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13290039#M3816</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-01-30T08:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13290868#M3817</link>
      <description>&lt;P&gt;No luck with the update routine.&amp;nbsp; I did some manual testing and ran into a few issues.&amp;nbsp; Below are the steps I took and the challenges.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Open the master drawing and bound the xrefs.&lt;/LI&gt;&lt;LI&gt;Used&amp;nbsp;&lt;SPAN&gt;Lee Macs&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://lee-mac.com/changeblockinsertion.html" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;STRONG&gt;CBPR&lt;/STRONG&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;command&amp;nbsp;to reset insertion points to 0,0.&lt;/SPAN&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;Issue - You have to run the command on each xref individually, it doesn't seem to have an option to process all the blocks at once.&amp;nbsp; I expect the complication would be not processing nested blocks.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Issue - We do have some xrefs that are rotated and this routing does not reset the rotation to 0.&amp;nbsp; Perhaps this routine could be updated to reset rotation to 0 as well.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Issue - There are a handful of exceptions where the same xref is inserted multiple times in different locations.&amp;nbsp; This will likely complicate things in any solution.&amp;nbsp; Perhaps this is what is causing the XREFOUT routine to crash.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;It is a bit painful trying to sort through which blocks you have processed and which ones still need it.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Wblocked out the previously bound xrefs.&lt;/SPAN&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;The xrefs have a lot of nested blocks so it takes some effort sorting through the list to find the correct block to export.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Erased all blocks and reattached the nested blocks with 0,0,0 insertion.&lt;/SPAN&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;This worked well other than the ones that were rotated.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;Question - Are there options for only selecting top level blocks and not nested blocks?&amp;nbsp; It seems like this function would be required in order to run the CBRP command globally and also for an option to automatically Wblock the files out without processing all the nested block (I have a routine to do this but it does include the nested blocks).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;BR /&gt;Brad&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 15:09:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13290868#M3817</guid>
      <dc:creator>bsanada</dc:creator>
      <dc:date>2025-01-30T15:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13290986#M3818</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6346"&gt;@bsanada&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you want to solve this, this is the time to post some sample files cause i'm testing it on my simple files and it works &lt;SPAN&gt;smoothly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;as i said earlier, xrefout does set the attached xref to 1x1 and rotation angle to 0 before exploding to make sure the xref&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;is in it's origin state before attaching it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Moshe&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;</description>
      <pubDate>Thu, 30 Jan 2025 15:56:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13290986#M3818</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2025-01-30T15:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13291051#M3819</link>
      <description>&lt;P&gt;Let me see if I can modify the drawing to replicate the issue without sending confidential information.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 16:19:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13291051#M3819</guid>
      <dc:creator>bsanada</dc:creator>
      <dc:date>2025-01-30T16:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Update xref insertion to 0,0,0</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13291103#M3820</link>
      <description>&lt;P&gt;Here are the sample files I am trying to work with.&amp;nbsp;00-For Testing RN-XGG-06_Peeling-3D-EQ.dwg is the master file pulling the xrefs together.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Brad&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 16:40:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-xref-insertion-to-0-0-0/m-p/13291103#M3820</guid>
      <dc:creator>bsanada</dc:creator>
      <dc:date>2025-01-30T16:40:03Z</dc:date>
    </item>
  </channel>
</rss>

