rjbrittain11 Posted August 27, 2014 Share Posted August 27, 2014 Hey all, I have a question for you. Is it possible to have autocad, im using 2014, assign a layer to a specific command? For example, if I use the command PL and want to draw a polyline, it will automatically switch the layer to a layer that I have designated for a line, such as LINE. Or if i want to create a leader, it will automatically make the layer LEADER the current layer when i type LEADER into the command line? Also, if the layer isn't created yet, it would create the layer and then assign it to the current layer once i type the command. I want to say that I was a previous job years ago and the CAD manager had created a LISP for this. Its fuzzy but I think he did. Anyway, anyone heard of this or has a resource to find out how to do this? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 27, 2014 Share Posted August 27, 2014 Try my Layer Director application Lee Quote Link to comment Share on other sites More sharing options...
rkent Posted August 27, 2014 Share Posted August 27, 2014 Try my Layer Director application Lee I have been using this one ever since Lee generously provided it to anyone and everyone. Easy to modify for the layers and commands you want included, works very well. Quote Link to comment Share on other sites More sharing options...
rjbrittain11 Posted August 27, 2014 Author Share Posted August 27, 2014 Thanks for the referral guys! Now, to get it to load and work. I've loaded it into autocad, but it doesn't seem to work. Do I have to turn something else on or off? All i did was go to APPLOAD, found the downloaded routine, then hit load. Anything I am missing? I type TEXT and it doesn't change anything. Quote Link to comment Share on other sites More sharing options...
rkent Posted August 27, 2014 Share Posted August 27, 2014 First type LD at the command line, if it is loaded you will see it turn on or off at the command line. Now open the LayerDirector.lsp file and edit the top portion for your needs, like the following (defun LM:LayerDirector nil (vl-load-com) (setq *LayerData* '( ("*TEXT" "M-ANNO" 7) ("*DIM*,*QLEADER" "M-DIMS" 7) ("*VPORT*" "M-VIEW" 42) ("*MVIEW*" "M-VIEW" 42) ("*MLEA*" "M-ANNO" 7) ;mleader ("*NEWOR*" "M-ANNO" 7) ;newwork custom command ("RAY*" "XLINE" 201) ; ("*REV*" "M-ANNO" 7) ;revcloud ("*TABL*" "M-ANNO" 7) ;table ("*WIPEO*" "M-VIEW" 251) ;wipeout ("*XATT*, *WFATT*" "XREF" 7) ;xref attach ("*XLIN*" "XLINE" 201) ;xline ("*XL*" "XLINE" 201) ;xline ("*HATC*" "M-PATT" ;bhatch hatch ) ) ( Quote Link to comment Share on other sites More sharing options...
rjbrittain11 Posted August 27, 2014 Author Share Posted August 27, 2014 ahhh, working now! Thanks again!!! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 27, 2014 Share Posted August 27, 2014 Thanks for the referral guys! Now, to get it to load and work. I've loaded it into autocad, but it doesn't seem to work. Do I have to turn something else on or off? All i did was go to APPLOAD, found the downloaded routine, then hit load. Anything I am missing? I type TEXT and it doesn't change anything. The program is currently set to load automatically on drawing startup - if you want to enable it manually midway through a drawing session, you will need to type 'LDON' as rkent correctly indicates. If you set the application to load on drawing startup (following one of these methods), there is no need to type the command to enable it everytime. I hope it helps! Lee Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 27, 2014 Share Posted August 27, 2014 I have been using this one ever since Lee generously provided it to anyone and everyone. Easy to modify for the layers and commands you want included, works very well. That's fantastic to hear rkent! - I'm delighted that you get so much use out of the program. Now open the LayerDirector.lsp file and edit the top portion for your needs, like the following (defun LM:LayerDirector nil (vl-load-com) (setq *LayerData* '( ... ) ) FYI, that looks like a snippet from an older version of the program - I updated the program in June of this year to V1.2 to enable more layer properties to be configured for new layers. Cheers, Lee Quote Link to comment Share on other sites More sharing options...
rkent Posted August 27, 2014 Share Posted August 27, 2014 That's fantastic to hear rkent! - I'm delighted that you get so much use out of the program. FYI, that looks like a snippet from an older version of the program - I updated the program in June of this year to V1.2 to enable more layer properties to be configured for new layers. Cheers, Lee It definitely makes life easier, and yes I was using the original. I have d/l the newer one and made the changes for my layers. I was wondering today when this thread started if you could add linetypes, and shazam, yes you can and yes you did. Thanks, rkent Quote Link to comment Share on other sites More sharing options...
Dadgad Posted August 28, 2014 Share Posted August 28, 2014 That's fantastic to hear rkent! - I'm delighted that you get so much use out of the program. FYI, that looks like a snippet from an older version of the program - I updated the program in June of this year to V1.2 to enable more layer properties to be configured for new layers. Cheers, Lee Lee, I've said it before, and I'll say it again, this lisp is, as are you, awesome! Thanks for all you give and do. I was using the old version too, will update it. Everybody should use this one, why wouldn't you? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 28, 2014 Share Posted August 28, 2014 A couple more suggestions you can use menu's, toolbars and palettes to have custom commands that draw specific objects eg drainage pit is two plines on layer drainage-pit. This way if you still want a pline you can still control which layer, maybe also preloaded defuns PLA polyline on layer A, LEA leader on layer A. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 28, 2014 Share Posted August 28, 2014 I was wondering today when this thread started if you could add linetypes, and shazam, yes you can and yes you did. Lee, I've said it before, and I'll say it again, this lisp is, as are you, awesome! Thanks for all you give and do. I was using the old version too, will update it. Everybody should use this one, why wouldn't you? Cheers Dadgad - that's very kind of you I've noticed from your other posts that you are a fan of this program Quote Link to comment Share on other sites More sharing options...
Aggz Posted March 20 Share Posted March 20 I was wondering if there is a way to set variables such as height and rotation for [D] Text? I have it pointing to the layer and other properties as intended but the variables are stopping this function from working as intended, also is there a way to assign an annotation style as well? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.