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

0 Members and 1 Guest are viewing this topic.

Dave M

  • Newt
  • Posts: 196
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 2018 - Microstation SS4 - Windows 10 - Dropbox

jvillarreal

  • Bull Frog
  • Posts: 332
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: 332
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: 5352
  • 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 2019 ~ Windohz 7 64bit
Dropbox

jvillarreal

  • Bull Frog
  • Posts: 332
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: 332
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: 332
Re: Change Layer Properties By Object Selection
« Reply #6 on: March 16, 2017, 06:44:28 PM »
Seems to work without issue..

MSTG007

  • Gator
  • Posts: 2598
  • 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...
Civil3D 2020