Author Topic: Change Layer Properties By Object Selection  (Read 547 times)

0 Members and 1 Guest are viewing this topic.

Dave M

  • Newt
  • Posts: 143
Change Layer Properties By Object Selection
« on: January 12, 2017, 11:51:14 am »
I have a routine (not written by me) that will allow one to change a layer's properties by selecting an object on the layer you want to change the properties of.  It will even work if the layer is nested in an xref or block.  It does not work in 2016, and it is protected so I can't modify it myself. 


Does anyone know of a similar routine that would work in 2016?


Thanks!
Civil 3D 2016 - Microstation SS4 - Windows 7 - Dropbox

jvillarreal

  • Bull Frog
  • Posts: 286
Re: Change Layer Properties By Object Selection
« Reply #1 on: January 17, 2017, 09:30:44 am »
Here's a modified routine shared by Vovka several years ago. I tried to add layer mod functionality to a dynamic info tool. It could definitely use an update.

jvillarreal

  • Bull Frog
  • Posts: 286
Re: Change Layer Properties By Object Selection
« Reply #2 on: January 17, 2017, 09:46:25 am »
Something to note: With the tool I shared, you'll have to double click linetypes and lineweights before hitting ok in their respective dialogs. (It was a workaround.)

alanjt

  • Needs a day job
  • Posts: 5308
  • Standby for witty remark...
Re: Change Layer Properties By Object Selection
« Reply #3 on: January 18, 2017, 01:10:25 pm »
Something to note: With the tool I shared, you'll have to double click linetypes and lineweights before hitting ok in their respective dialogs. (It was a workaround.)
That's pretty slick thinking.
Civil 3D 2013 ~ Windohz 7 64bit
Dropbox

jvillarreal

  • Bull Frog
  • Posts: 286
Re: Change Layer Properties By Object Selection
« Reply #4 on: January 18, 2017, 01:43:47 pm »
Thanks brother, but it wasn't my idea. I don't recall where I read about it or copied the necessary code as this was hacked together at least 5 years ago.

I'd use this routine a lot more often if it were updated to work with Civil 3d styles. Just haven't taken the time.

jvillarreal

  • Bull Frog
  • Posts: 286
Re: Change Layer Properties By Object Selection
« Reply #5 on: March 10, 2017, 03:15:08 pm »
Looking at updating or adding to this code. Anyone know of a way to access civil 3d object layers by selection? (layer a profile alignment or grid line resides on for example)

is a programmatic explode/undo workaround the only option with lisp?

jvillarreal

  • Bull Frog
  • Posts: 286
Re: Change Layer Properties By Object Selection
« Reply #6 on: March 16, 2017, 06:44:28 pm »
Seems to work without issue..

MSTG007

  • Water Moccasin
  • Posts: 1884
  • I can't remeber what I already asked! I need help!
Re: Change Layer Properties By Object Selection
« Reply #7 on: March 17, 2017, 10:22:06 am »
Dude, That is cool...
Autodesk Infrastructure Design Suite 2016