Author Topic: Questions about Layer  (Read 827 times)

0 Members and 1 Guest are viewing this topic.

MeasureUp

  • Bull Frog
  • Posts: 461
Questions about Layer
« on: July 19, 2022, 02:36:41 AM »
1st of all, there is no "filter" on the "-layer" command return list on the command prompt:
[?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile/Xref]
I am wondering if there is something else missing on the list as well. If yes, what are they?

Secondly, I know how to rename a layer by using "-layer" command:
(command ".-Layer" "Rename" "ABC" "Abc" "")
I'd like know how to make change from the layer table (list) in routine:
for example,
((0 . "LAYER") (2 . "ABC") (70 . 0) (62 . 7) (6 . "Continuous"))

Finally, how to switch from current layer group to the top parent "All" in routine?

Your helps are much appreciated.

dexus

  • Newt
  • Posts: 196
Re: Questions about Layer
« Reply #1 on: July 19, 2022, 03:11:58 AM »
A couple of questions, I think this might answers one of them:
Code - Auto/Visual Lisp: [Select]
  1.   (subst
  2.     (cons 2 "NEW NAME")
  3.     (cons 2 "OLD NAME")
  4.     (entget (tblobjname "layer" "OLD NAME"))
  5.   )
  6. )

tombu

  • Bull Frog
  • Posts: 288
  • ByLayer=>Not0
Re: Questions about Layer
« Reply #2 on: July 19, 2022, 07:34:24 AM »
While "-layer" has no filter option "+layer" does.
Enter it at the command line to see the options available.
Some verticals like Civil 3D also have Filter commands like LayerSaveFilterTree and LayerLoadFilterTree.
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D

MeasureUp

  • Bull Frog
  • Posts: 461
Re: Questions about Layer
« Reply #3 on: July 19, 2022, 08:00:23 PM »
Thanks dexus.
It works!

And thanks tombu.
"+layer" works.
But I have to use "layerclose" turn off the layer properties manager after setting the layer group to "All".
And IMO switching "filedia" value between "0" and "1" is not a good idea.
Both methods seem not good.

Is there a workaround?
Thanks.

= = = = = = = = = = =
Edit:
I figured it out.
It doesn't change to "All" while Layer Properties Manager is on.
It will show correctly when reopen Layer Properties Manager.

Now the 1st question in post #1 is still not resolved.
It seems the "+LAYER" command is invented to ONLY work for layer group.
Code: [Select]
Command: +LAYER
Specify filter [All/All Used Layers/Unreconciled New Layers/Viewport Overrides] <All>:

Why "+LAYER" command is not found in HELP?
And again, would any other functions not be listed in "-LAYER" options when "filter" function is hidden?
« Last Edit: July 20, 2022, 01:27:39 AM by MeasureUp »

tombu

  • Bull Frog
  • Posts: 288
  • ByLayer=>Not0
Re: Questions about Layer
« Reply #4 on: July 21, 2022, 07:36:05 AM »
And thanks tombu.
"+layer" works.

Now the 1st question in post #1 is still not resolved.
It seems the "+LAYER" command is invented to ONLY work for layer group.
Code: [Select]
Command: +LAYER
Specify filter [All/All Used Layers/Unreconciled New Layers/Viewport Overrides] <All>:

Why "+LAYER" command is not found in HELP?
And again, would any other functions not be listed in "-LAYER" options when "filter" function is hidden?

Unfortunately there's lots of functionality not described in AutoCAD Help. Try entering either
(command "_.layer" "_filter") or (command "_.layer" "_fi")
at the command line to see the filter options for the LAYER command.
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D