Author Topic: XREF Insert  (Read 1401 times)

0 Members and 1 Guest are viewing this topic.

lemacs

  • Guest
XREF Insert
« on: February 01, 2011, 03:24:46 PM »
 Does anyone know of a command that would create a layer of and xref's drawing name appon attaching the xref.
Then move that xref to that layer.

EX.

Attach xref "x-proposed.dwg"
Create Layer "x-proposed"
Move x-proposed xref to x-proposed layer.

Thanks
lemacs :-o







Tharwat

  • Swamp Rat
  • Posts: 710
  • Hypersensitive
Re: XREF Insert
« Reply #1 on: February 01, 2011, 03:51:28 PM »
Check this out ......

Code: [Select]
(defun c:test (/ clay )
  (entmakex (list (cons 0 "LAYER") (cons 100 "AcDbSymbolTableRecord")
                  (cons 100 "AcDbLayerTableRecord")
                  (cons 2 "x-proposed")
                  (cons 70 0)))
  (setq clay (getvar 'clayer))
  (setvar 'clayer "x-proposed")
  (vl-cmdf "_.-xref" "_attach" (strcat (getvar 'dwgprefix)"x-proposed") pause "" "" "")
   (setvar 'clayer clay)
  (princ)
  )

Tharwat

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: XREF Insert
« Reply #2 on: February 01, 2011, 04:08:46 PM »
Do a search for xref reactors. There are a couple of that will do what you want. There are some here but I am heading out the door and have already shut down. 
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans