hi, can someone please tell me how to assign layers to different commands? for example I'd like all viewports to be drawn in the layer AM_VIEWS.
I used to be able to do this, but following a reset of my CAD software, new viewports are drawn in the current layer.
Also, how would i get all my dimensions drawn in a certain layer?
Solved! Go to Solution.
Solved by AcadAdamLT. Go to Solution.
Solved by hwalker. Go to Solution.
I've just had a look online and this is what I've found
^C^C-layer;Set;0;;
The 0 is for layer 0. I then assume at the end you put your command.
As to the dimensions. I've set myself up a tool palette with all the dimension commands in it. In tool palettes you can set which layer an object appears on, so all my dimensions (using the tool palette) automatically go on the dimensions layer.
Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
^C^C-Layer;set;*Layer*;;^C^C_Dimlinear;
This command changes the current layer to specified layer.
^C^C-Layer;make;*layer*;;^C^C_Dimlinear;
This command creates a new layer with specified name and changes the current layer to your new layer.
If it were me, I'd prefer to stay away from doing it via menu macros. I would be inclined to redefine the command itself. This way whether you run the command via command line OR menu, it would perform as expected.
In the appropriate acad*.lsp file (there are many to choose from depending upon your setup):
(command "undefine" "MVIEW")
(defun c:mview()
(command
"-layer" "s" "AM_VIEW" "" ;sets the layer current, assumes the layer exists.
;This could be developed further to create the layer if it doesn't already exist
"-MVIEW" ;this starts the mview command so that you can create the viewport.
;The hyphen tells acad to use the OOTB (undefined version of the command).
)
)
P.S. What Dean said. ^^^^^^^^
Don Ireland
Engineering Design Technician
The "AM_" prefix on the layer name gives a hint - you were using AutoCAD Mechanical before. Are you still using that, or are you using vanilla AutoCAD? Mechanical and other vertical AutoCAD products have built in tools for (among many other things) layer control. If you are now running vanilla AutoCAD you will need to create your own customizations. If you are still using Mechanical, I would suggest visiting the Mechanical board for set-up suggestions: http://forums.autodesk.com/t5/AutoCAD-Mechanical-General/bd-p/39
Modifying any of the ACAD####.LSP files isn't recommended. User customizations should be in either ACAD.LSP or ACADDOC.LSP (note the lack of version numbers). These are not provided with AutoCAD, and are user-created. Updating, patching, etc. won't molest these files.
GrantsPirate
Piping and Mech. Designer
Always save a copy of the drawing before trying anything suggested here.
----------------------------------------------------------------------------
If something I wrote can be interpreted two ways, and one of the ways makes you sad or angry, I meant the other one.
@GrantsPirate wrote:
I use a lisp program with reactors made by the talented Lee-Mac, called LayerDirector.lsp http://www.lee-mac.com/layerdirector.html While there think about a small donation, he provides some pretty sophisticated programs without asking for payment.
I came to this thread to say exactly what @GrantsPirate said here ^^^^^^