Author Topic: Save/restore xref layer states only  (Read 7797 times)

0 Members and 1 Guest are viewing this topic.

pkohut

  • Guest
Re: Save/restore xref layer states only
« Reply #15 on: November 10, 2008, 03:47:07 PM »
It's pretty easy to save them out to a file then restore them later.
This allows you to save different states for different needs.
Below is an example from a layerset, with the following fields:
Layername, state, color, linetype, lineweight, plot style name, is clayer
Code: [Select]
GRID 67 7 CONTINUOUS -3 Color_7 0
PROP_CORNERS 67 6 CONTINUOUS -3 Color_6 0
plan-siteplan$0$DCA_INFO 66 7 CONTINUOUS -3 Color_7 0
plan-siteplan-scheme1 (5)|DCA_INFO 80 7 CONTINUOUS -3 Color_7 0
plan-siteplan-scheme1 (5)|PROF_INFO 80 7 CONTINUOUS -3 Color_7 0
plan-siteplan-scheme1 (5)|00-VIEWPORTS 80 7 CONTINUOUS -3 Color_7 0

Paul

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Save/restore xref layer states only
« Reply #16 on: November 10, 2008, 03:49:51 PM »
It's pretty easy to save them out to a file then restore them later.

That's kinda what I'm leaning towards - I just have to decide if I'm going to do it with VBA or LSP/OpenDCL combo.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Save/restore xref layer states only
« Reply #17 on: November 10, 2008, 03:50:17 PM »
Are you just doing for one drawing one time?   (If am I reading you correctly)
IN that case creat and then export a layer "filter" from the "to be match" drawing and then import that filter into the file to the matching.  But I am probaly all wet. 

I will go back to drooling this :-D

That would give me EVERY layer... I just want the xref layers.
Returns just xref layers.  Core command and thing is Autodesk already set did this for you.  They even broke it down by each xref.  Again probably just something I am not seeing from here.  Darn Beer keeps distracting me.  Usually it the girls outside the window.
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

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Save/restore xref layer states only
« Reply #18 on: November 10, 2008, 03:53:15 PM »
Are you just doing for one drawing one time?   (If am I reading you correctly)
IN that case creat and then export a layer "filter" from the "to be match" drawing and then import that filter into the file to the matching.  But I am probaly all wet. 

I will go back to drooling this :-D

That would give me EVERY layer... I just want the xref layers.
Returns just xref layers.  Core command and thing is Autodesk already set did this for you.  They even broke it down by each xref.  Again probably just something I am not seeing from here.  Darn Beer keeps distracting me.  Usually it the girls outside the window.


But can you export just that layer filter to an LAS file?  I haven't tried.  I assumed it took ALL of the layers.  I'll have to play around with that as soon as AutoCAD stops being stupid!!!  Not responding my arse!  You're just being lazy!!  You hear me AutoCAD??  Lay-freaking-zee!!

I'm good now.  Sorry.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Save/restore xref layer states only
« Reply #19 on: November 10, 2008, 03:56:53 PM »
Just as I thought... It grabs all layers.


Go back to being a drunk, you drunk!


(jealous)
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Save/restore xref layer states only
« Reply #20 on: November 10, 2008, 04:06:06 PM »
Just as I thought... It grabs all layers.


Go back to being a drunk, you drunk!


(jealous)
I am not that drunk yet.  It don't grab all the layers.  You screwed your filter some how.

It imports and exports just the filters.  not settings of the layers.  You will still have to make the changes to filtered layers in each file.  I do admit that code is easier if it is doing the setting for you.  But this is quick and dirty. 


Now come on 4:45.  Actually it will have to wait until tomorrow night because I have to take the oldest to her swimming lessons tonight.  :-(


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

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Save/restore xref layer states only
« Reply #21 on: November 10, 2008, 04:09:12 PM »
.LFT files?? What version are you using?  I've got 2008 and it creates .LAS files.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Save/restore xref layer states only
« Reply #22 on: November 10, 2008, 04:10:18 PM »
Oh, wait a second... Yup.. There it is.  Ummm... I mean... WHOOMP!  There it is!!  WHOOMP!  There it is!!   :mrgreen:

Thanks!  That should work for the meantime.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Save/restore xref layer states only
« Reply #23 on: November 10, 2008, 04:24:17 PM »
See what happens when you go to lunch.  You miss all the good stuff.

James,

  How come you don't just use 'wcmatch' in the function 'kb:GetLayerList'?  I would think it would be easier, and then you could filter for any layer.


Glad you got something you can use Matt.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Save/restore xref layer states only
« Reply #24 on: November 11, 2008, 08:09:17 AM »
Oh, wait a second... Yup.. There it is.  Ummm... I mean... WHOOMP!  There it is!!  WHOOMP!  There it is!!   :mrgreen:

Thanks!  That should work for the meantime.

It should, but it doesn't.   :-(

It saves the filter, but not how the layers appear.  In other words, if I save an XREF (*|*) filter with all xref layer colors as gray then import that LFT file into another drawing, it won't change the color of the xref layers... it just adds the filter in the layer manager dialog box.  So it looks like I'm back to coding something.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Save/restore xref layer states only
« Reply #25 on: November 11, 2008, 08:31:29 AM »
Oh, wait a second... Yup.. There it is.  Ummm... I mean... WHOOMP!  There it is!!  WHOOMP!  There it is!!   :mrgreen:

Thanks!  That should work for the meantime.

It should, but it doesn't.   :-(

It saves the filter, but not how the layers appear.  In other words, if I save an XREF (*|*) filter with all xref layer colors as gray then import that LFT file into another drawing, it won't change the color of the xref layers... it just adds the filter in the layer manager dialog box.  So it looks like I'm back to coding something.

It imports and exports just the filters.  not settings of the layers.  You will still have to make the changes to filtered layers in each file.  I do admit that code is easier if it is doing the setting for you.  But this is quick and dirty. 
:wink:  :-)
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

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Save/restore xref layer states only
« Reply #26 on: November 11, 2008, 08:38:19 AM »
Oh, wait a second... Yup.. There it is.  Ummm... I mean... WHOOMP!  There it is!!  WHOOMP!  There it is!!   :mrgreen:

Thanks!  That should work for the meantime.

It should, but it doesn't.   :-(

It saves the filter, but not how the layers appear.  In other words, if I save an XREF (*|*) filter with all xref layer colors as gray then import that LFT file into another drawing, it won't change the color of the xref layers... it just adds the filter in the layer manager dialog box.  So it looks like I'm back to coding something.

It imports and exports just the filters.  not settings of the layers.  You will still have to make the changes to filtered layers in each file.  I do admit that code is easier if it is doing the setting for you.  But this is quick and dirty. 
:wink:  :-)

I didn't read everything.... I was just skimming over the thread.   :oops:
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Save/restore xref layer states only
« Reply #27 on: November 11, 2008, 11:02:32 AM »
Do you need help coding it?  Or you got it under control?
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Save/restore xref layer states only
« Reply #28 on: November 11, 2008, 11:06:14 AM »
Quote
How come you don't just use 'wcmatch'

Ha!  yea, that would be better wouldn't it.  Why? beccause this was originally written a very long time ago . . . before I knew all the smart people here at the swamp  :wink:
James Buzbee
Windows 8