Author Topic: Resetting Xref Layer Overrides of only selected objects  (Read 199 times)

0 Members and 1 Guest are viewing this topic.

scottafro

  • Mosquito
  • Posts: 6
Resetting Xref Layer Overrides of only selected objects
« on: April 08, 2019, 03:13:51 PM »
Seems like there would be a pretty simple solution to this but my LISP skills are limited. Was hoping to manipulate options by means of -layer but there are no good options.
To be clear I want to be able to select xref objects and have the layers of those objects only reset. Thoughts? Thanks!

tombu

  • Newt
  • Posts: 138
  • ByLayer=>Not0
Re: Resetting Xref Layer Overrides of only selected objects
« Reply #1 on: April 08, 2019, 04:05:30 PM »
You're trying to modify the layers in the drawing that's xrefed into the current drawing?
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D

scottafro

  • Mosquito
  • Posts: 6
Re: Resetting Xref Layer Overrides of only selected objects
« Reply #2 on: April 08, 2019, 09:51:45 PM »
Yes. I want to set the layers of an xref back to what they are in the xref but only for selected items. I have a routine which resets all layers back to the xrefs original content but would like to be able to do that for just selected items.

scottafro

  • Mosquito
  • Posts: 6
Re: Resetting Xref Layer Overrides of only selected objects
« Reply #3 on: April 08, 2019, 09:54:30 PM »
Sorry I believe I misread that. I've overridden an xrefs layer properties in the drawing in which it is xrefed too. I want to set those overridden properties back to the original properties located in the xrefd drawing. But only for the layers of selected objects.

tombu

  • Newt
  • Posts: 138
  • ByLayer=>Not0
Re: Resetting Xref Layer Overrides of only selected objects
« Reply #4 on: April 08, 2019, 10:59:35 PM »
Starting with 2019 versions AutoCAD displays xref overrides in the layer manager.  They can be reset easily.
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D

Lee Mac

  • Seagull
  • Posts: 12195
  • London, England
Re: Resetting Xref Layer Overrides of only selected objects
« Reply #5 on: April 09, 2019, 08:03:34 AM »
This program could be modified to target specific layers.

scottafro

  • Mosquito
  • Posts: 6
Re: Resetting Xref Layer Overrides of only selected objects
« Reply #6 on: April 10, 2019, 01:36:53 PM »
Thanks Lee! I'm a LISP newbie. Can you provide me one more favor and point me to the piece of code I can investigate adjusting? Appreciate your help!

Lee Mac

  • Seagull
  • Posts: 12195
  • London, England
Re: Resetting Xref Layer Overrides of only selected objects
« Reply #7 on: April 10, 2019, 02:07:41 PM »
Thanks Lee! I'm a LISP newbie. Can you provide me one more favor and point me to the piece of code I can investigate adjusting? Appreciate your help!

The easiest modification would be to add the following line between lines 365 & 366:
Code - Auto/Visual Lisp: [Select]
  1. (member (substr lyn (+ 2 pos)) (mapcar 'strcase '("TargetLayer1" "TargetLayer2" "TargetLayer3")))

(Changing "TargetLayer1" "TargetLayer2" "TargetLayer3" to the name or names of the layers that you wish to modify).

Implementing a user selection of such layers is possible but would require far more modification.