See the top rated post in this thread. Click here

Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: X-REF Manager Auto Re-load???

  1. #21
    I could stop if I wanted to Chirag Mistry's Avatar
    Join Date
    2004-06
    Location
    Atlanta
    Posts
    254
    Login to Give a bone
    0

    Default Re: X-REF Manager Auto Re-load???

    Reload an External Reference by selecting it

    ^C^C(if(not c:reload)(load "reload")) reload

    This works great for me, just click on the button and pick the xref.

  2. #22
    100 Club
    Join Date
    2005-01
    Posts
    185
    Login to Give a bone
    0

    Default Re: X-REF Manager Auto Re-load???

    Quote Originally Posted by RobertB
    Look at the FileDependency object. (Is there an echo in here?)
    Ok, but how on earth do you use it? I don't mess with VBA portions of stuff, because I have yet to figure out how to call it from LISP. If it changed a variable it would work great, beacuse I have a routine that reacts to variables being changed.

  3. #23
    Member
    Join Date
    2005-05
    Posts
    24
    Login to Give a bone
    0

    Default Re: X-REF Manager Auto Re-load???

    Hi folks, I'm new here (actually my first post) but I've been running this Cad thing for a while now...anyway I just flipped briefly through this thread...ummm ya know the little status bar icon where that baloon thingy originates from, well if you right click it you get an option to reload all xrefs...or is that just an oversimplification???

  4. #24
    Active Member
    Join Date
    2004-10
    Location
    Tampa
    Posts
    52
    Login to Give a bone
    0

    Default Re: X-REF Manager Auto Re-load???

    Not really, that still requires 2 clicks, and I've got it down to one. It doesn't seem like much, but after 500 reloads it is substantial.

  5. #25
    Member
    Join Date
    2005-06
    Posts
    23
    Login to Give a bone
    0

    Default Re: X-REF Manager Auto Re-load???

    Quote Originally Posted by richardl.25628
    revised code

    Code:
    (defun C:RX	(/ BLOCKS NEXTBLOCK N)  ;; Reload all "loaded" xref's only
                                                                              ;; Richard Lawrence (c) 2005
      (defun ASC (ELEMENT ENTITY /) (cdr (assoc ELEMENT ENTITY))) ;;; retrieve assoc data from entity
      (setq BLOCKS NIL)
      (setq NEXTBLOCK (tblnext "BLOCK" t))
      (while (/= NEXTBLOCK NIL)
        (if	(= (logand (ASC 70 NEXTBLOCK) 4) 4)
          (if (= (logand (ASC 70 NEXTBLOCK) 32) 32)
    	(if BLOCKS
    	  (setq BLOCKS (append BLOCKS (list (ASC 2 NEXTBLOCK))))
    	  (setq BLOCKS (list (ASC 2 NEXTBLOCK)))
    	)
          )
        )
        (setq NEXTBLOCK (tblnext "BLOCK"))
      )
      (if blocks
        (progn
          (foreach N BLOCKS
    	(command "-XREF" "R" N)
          )
          (if (= (length blocks) 1)
    	(princ (strcat "n"(itoa(length blocks))" reference reloaded."))
    	(princ (strcat "n"(itoa(length blocks))" references reloaded."))
          )
        )
        (princ "nNo xref's found.")
      )
      (princ)
    )
    Ok, I'm very new to all of this, and I've never worked with this type of stuff before. I am one of those people who would be greatly affected by having a shortcut to reloading only the loaded XREF's. However, I am not sure how you would go about putting this code into autocad to make it work for simple people like me. I was hoping that someone could explain this simply for me

    thank you (in advance)

  6. #26
    The Silent Type Mike.Perry's Avatar
    Join Date
    2000-11
    Posts
    13,656
    Login to Give a bone
    0

    Default Re: X-REF Manager Auto Re-load???

    Quote Originally Posted by cullen.88517
    Ok, I'm very new to all of this, and I've never worked with this type of stuff before. I am one of those people who would be greatly affected by having a shortcut to reloading only the loaded XREF's. However, I am not sure how you would go about putting this code into autocad to make it work for simple people like me. I was hoping that someone could explain this simply for me
    Hi

    Have a read of this post and this one.

    +

    Have a browse of the following threads -

    Image transparency

    Total polyline length

    Have a good one, Mike

  7. #27
    Member
    Join Date
    2005-08
    Posts
    12
    Login to Give a bone
    0

    Default Re: X-REF Manager Auto Re-load???

    GENIUS! I was hoping I could get direction to write this and here it is! Thanks!

    Quote Originally Posted by Opie View Post
    revised code

    Code:
    (defun C:RX	(/ BLOCKS NEXTBLOCK N)  ;; Reload all "loaded" xref's only
                                                                              ;; Richard Lawrence (c) 2005
      (defun ASC (ELEMENT ENTITY /) (cdr (assoc ELEMENT ENTITY))) ;;; retrieve assoc data from entity
      (setq BLOCKS NIL)
      (setq NEXTBLOCK (tblnext "BLOCK" t))
      (while (/= NEXTBLOCK NIL)
        (if	(= (logand (ASC 70 NEXTBLOCK) 4) 4)
          (if (= (logand (ASC 70 NEXTBLOCK) 32) 32)
    	(if BLOCKS
    	  (setq BLOCKS (append BLOCKS (list (ASC 2 NEXTBLOCK))))
    	  (setq BLOCKS (list (ASC 2 NEXTBLOCK)))
    	)
          )
        )
        (setq NEXTBLOCK (tblnext "BLOCK"))
      )
      (if blocks
        (progn
          (foreach N BLOCKS
    	(command "-XREF" "R" N)
          )
          (if (= (length blocks) 1)
    	(princ (strcat "\n"(itoa(length blocks))" reference reloaded."))
    	(princ (strcat "\n"(itoa(length blocks))" references reloaded."))
          )
        )
        (princ "\nNo xref's found.")
      )
      (princ)
    )

  8. #28
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: X-REF Manager Auto Re-load???

    Go back to my original post. I have revised the code once more to allow one to select the xrefs to reload or if none are previously selected, all loaded xrefs will be reloaded.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Replies: 2
    Last Post: 2013-11-18, 04:03 PM
  2. add in manager cannot load dll
    By pengear in forum Revit - API
    Replies: 0
    Last Post: 2010-10-18, 10:37 AM
  3. Thin Line (TL) auto on at load?
    By still.james in forum Revit Architecture - General
    Replies: 1
    Last Post: 2010-06-08, 01:36 PM
  4. Auto Load DLL
    By bweir in forum Dot Net API
    Replies: 3
    Last Post: 2008-12-01, 03:15 AM
  5. Auto Load Dim Styles
    By martyk in forum AutoCAD General
    Replies: 2
    Last Post: 2005-03-30, 09:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •