Author Topic: Xref listing  (Read 2700 times)

0 Members and 1 Guest are viewing this topic.

ronjonp

  • Needs a day job
  • Posts: 7529
Xref listing
« on: February 15, 2005, 02:44:14 PM »
Do any of you have a routine that will grab all xrefs and generate a list in the textscreen of the xref name, the insertion point, rotation, and scale?

Thanks,

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

M-dub

  • Guest
Xref listing
« Reply #1 on: February 15, 2005, 02:53:56 PM »
There might be something at Cadalyst.com...I just did a search and found something called 'Name that Block'.  Go have a look there and you might find what you're looking for.
(Sorry, that's all I've got for ya...)
http://new.cadalyst.com/code/tips/CodeSearch_Advanced.cfm

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Xref listing
« Reply #2 on: February 15, 2005, 03:07:26 PM »
TheSwamp.org  (serving the CAD community since 2003)

M-dub

  • Guest
Xref listing
« Reply #3 on: February 15, 2005, 03:10:13 PM »
:oops:
Guess I should have tried searching this wonderful site first.

Sorry Mark & MP! ;)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Xref listing
« Reply #4 on: February 15, 2005, 03:17:35 PM »
<SlapWithWetFishUpsideHead.mpg>

Kidding!

:D
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

AfricaAD

  • Guest
Xref listing
« Reply #5 on: February 15, 2005, 03:21:43 PM »

M-dub

  • Guest
Xref listing
« Reply #6 on: February 15, 2005, 03:22:25 PM »
Quote from: MP
<SlapWithWetFishUpsideHead.mpg>

Kidding!

:D


That reminds me...
Have you seen the movie 'UHF' with Weird Al and Michael Richards (Kramer)?


"You so stupid!"  (You have to have seen the movie to know what I'm talking about....)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Xref listing
« Reply #7 on: February 15, 2005, 03:26:23 PM »
A really LONG time ago M-Dub, lol!

So long I don't get it. :(
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

M-dub

  • Guest
Xref listing
« Reply #8 on: February 15, 2005, 03:31:43 PM »
I think it was called 'Wheel of Fish' and the lady had to pick a box that contained her prize.  After picking one, the (oriental) host says "Let's see what's in the box"......
"Nothing!  Absolutely Nothing!!!  You stupid!  You so stupid!"

Something like that, anyway....I don't know why it reminded me of it, but it did...I should buy that movie even though it's horrible...it's still funny.
You MUST remember the kid who finds the marble in the pool of oatmeal and gets to drink from the 'magic firehose'...?!?!

ROFL!!!

ronjonp

  • Needs a day job
  • Posts: 7529
Xref listing
« Reply #9 on: February 15, 2005, 04:59:56 PM »
Code: [Select]
(defun c:getxr (/ ent b c scalex scaley scalez insertpt xrname)
(setq ent (entsel "\nSelect Xref"))
(if (= (cdr (assoc 0 (entget (car ent)))) "INSERT")
  (progn
    (setq b (car ent))
    (setq c (entget b))
    (setq scalex (cdr (assoc 41 c))) ;get xref x scale
    (setq scaley (cdr (assoc 42 c))) ;get xref y scale
    (setq scalez (cdr (assoc 43 c))) ;get xref z scale
    (setq insertpt (cdr (assoc 10 c))) ;get xref insertion  
    (setq xrname (cdr (assoc 2 c))) ;get xref name
           (list xrname scalex scaley scalez insertpt)    
  )
)
)


How do I convert scalex scaley scalez and insertpt to strings so I can use strcat? Am I going about this wrong?

Mark,

I saw the getxrefsproperties but was unsure where to start with all that code.  :oops:

Thanks,

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Xref listing
« Reply #10 on: February 16, 2005, 07:51:26 AM »
How about this Ron.
Code: [Select]

(defun c:getxr (/ ent b c scalex scaley scalez insertpt xrname)
    (setq ent (entsel "\nSelect Xref"))
    (if (= (cdr (assoc 0 (entget (car ent)))) "INSERT")
      (progn
        (setq b (car ent))
        (setq c (entget b))
        (setq scalex (cdr (assoc 41 c))) ;get xref x scale
        (setq scaley (cdr (assoc 42 c))) ;get xref y scale
        (setq scalez (cdr (assoc 43 c))) ;get xref z scale
        (setq insertpt (cdr (assoc 10 c))) ;get xref insertion
        (setq xrname (cdr (assoc 2 c))) ;get xref name
        (setq product
  (mapcar 'vl-princ-to-string
  (list xrname scalex scaley scalez insertpt)
  )
 )
(foreach item product
 (princ (strcat "\n" item))
 )
      )
 
    )
(princ)
)

output -->
Select Xref
710-151
1.0
1.0
1.0
(0.0 0.0 0.0)
TheSwamp.org  (serving the CAD community since 2003)

CADwoman

  • Guest
Re: Xref listing
« Reply #11 on: January 29, 2007, 11:21:30 AM »
Mark, this seem to be what i need. But the link is not working. I'm looking for ways to script process a group of files and then get a report of the xref list for each file. any such animal out there? thanks

maybe ..........

http://www.theswamp.org/phpBB2/viewtopic.php?t=3816