Author Topic: XREF stamp Deluxe Edition ?  (Read 5184 times)

0 Members and 1 Guest are viewing this topic.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: XREF stamp Deluxe Edition ?
« Reply #15 on: February 02, 2006, 12:38:33 PM »
Gary,

Now I'm really confused.  After loading it, and running it, I don't get any error.  I guess if it works then it is all good.
Quote from: Acad Command Line
Command: xreftextlist

 Select insertion point for Xref text:
Command:
Thanks for posting back.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: XREF stamp Deluxe Edition ?
« Reply #16 on: February 03, 2006, 02:29:46 PM »
I noticed that no one may know that I updated the code, so this is a formal notice.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

phoulx

  • Guest
Re: XREF stamp Deluxe Edition ?
« Reply #17 on: February 03, 2006, 03:47:53 PM »
Finally got my version working more or less.  It is not pretty, but Tim got me pointed in the right direction so I'm happy with the outcome.  I actually like picking the individual xrefs and having just those appear on the drawing.  This means a) I can avoid a possibly huge clunky list that would be hard to place on the drawing and b) I don't have to list our own drawings.  Our xrefs may be a few weeks old but still be the most current version.  My thinking is that if a client sees five xrefs dated yesterday and one from last month, they might assume it is out-of-date/wrong.  The CYA mode.  It works wonders when the architects drawing is perceived as old I don't want it to backfire.  Preference I suppose.  Anyway, if I could just get it to auto-update...
Code: [Select]
(defun c:xrr (/ clay omd ctxt ctxtsz pta xrd xrpth systime fulltxt xrefdate)
  (vl-load-com)
    (setvar "cmdecho" 0)
    (setq clay (getvar "clayer"))
    (command "-layer" "m" "xrefinfo" "c" "2" "" "")
    (setq omd (getvar "orthomode"))
    (setvar "orthomode" 1)
    (setq ctxt (getvar "textstyle"))
    (setq ctxtsz (getvar "textsize"))
    (command "-style" "xrefinfo" "simplex" ctxtsz "1" "20" "n" "n" "n")
      (setq xrpth (cdr (assoc 1 (entget (tblobjname "block" (cdr (assoc 2 (entget (car (entsel "\nSelect Xref:"))))))))))
        (setq xrd (findfile xrpth))
        (setq systime (vl-file-systime xrd))
        (setq XrefDate (strcat (itoa (cadr SysTime)) "/" (itoa (cadddr SysTime)) "/" (itoa (car SysTime))))
        (setq fulltxt (strcat xrpth "  " xrefdate))
        (setq pta (getpoint "\nSelect location for xrefinfo: "))
        (command "text" pta 0 fulltxt)
    (setvar "clayer" clay)
    (setvar "orthomode" omd)
    (setvar "textstyle" ctxt)
    (setvar "cmdecho" 1)
  (princ)
)

T.Willey

  • Needs a day job
  • Posts: 5251
Re: XREF stamp Deluxe Edition ?
« Reply #18 on: February 03, 2006, 03:54:09 PM »
To have it auto update you can search for all the text objects on the layer you create, then seach each string to see if the xref path is in that text string, if it is, then update that one, it not, then run the text command.

Glad you got something you like.

You could also have it loop until you finish picking xrefs, and would only need on pick for the start point of the text.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.