tgibbo Posted March 12, 2015 Share Posted March 12, 2015 ^C^C_LA;S;Lines;^C^C_Linetype;S;HIDDEN;^C^C_lineweight;.09;^C^C_Color;008;^C^C_line ^C^C_LA;S;Lines;^C^C_Linetype;S;CONTINUOUS;^C^C_lineweight;.18;^C^C_Color;008;^C^C_line These 2 macros work perfectly. Can you tell what I can add to the end to change back to the layer before I ran this command. I need to reset it to layer Construction all with BYLAYER Thank you Quote Link to comment Share on other sites More sharing options...
SLW210 Posted March 12, 2015 Share Posted March 12, 2015 I moved your thread to the The CUI, Hatches, Linetypes, Scripts & Macros Forum. Please read the Code Posting Guidelines and edit your post to include the Macros in Code Tags. Quote Link to comment Share on other sites More sharing options...
steven-g Posted March 12, 2015 Share Posted March 12, 2015 The command layerp will change back to the last altered layer setting, unfortunately your macro at the moment finishes by starting the line command, and there is no way to run a macro that will let you draw infinte line segments and then run another command. You could try this ^C^C_LA;S;Lines;^C^C_Linetype;S;HIDDEN;^C^C_lineweight;.09;^C^C_Color;008;^C^C_line;\\;layerp; But it will only allow you to draw a single line segment Quote Link to comment Share on other sites More sharing options...
zaphod Posted March 12, 2015 Share Posted March 12, 2015 what if you used polyline? Quote Link to comment Share on other sites More sharing options...
steven-g Posted March 12, 2015 Share Posted March 12, 2015 Same problem, the double backslash at the end of the macro lets you pick a start point and a second point the ";" tells the macro to finish the line command and move onto the next command, you could use \\\\; to allow four pick points etc, the same goes for polyline. If the number of pick points is constant then no problem, but there is no way in a macro to have an undefined number of points, maybe it's possible in LISP. Quote Link to comment Share on other sites More sharing options...
tgibbo Posted March 12, 2015 Author Share Posted March 12, 2015 Thank you very much Steven. It works now. I may have to look into lisp if this bugs me too much. Maybe you could have a look at this one for me?? http://www.cadtutor.net/forum/showthread.php?91317-Changing-some-lines-in-a-Lisp-file. Its a bit complicated so it might take up too much of your time. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 13, 2015 Share Posted March 13, 2015 You can do a lisp version of what you have as either a series of commands or saved as a single lisp ;menu part ^C^C(load "xxxx") ; this xxxx.lsp saved on hard drive (setq oldlay (getvar "clayer")) (setvar "clayer" "Lines") (setvar "Linetype" "HIDDEN) (setvar "lineweight" 0.09) ; here is a pline just change to Line etc ; create pline by picking points press enter when finished (command "_pline") (while (= (getvar "cmdactive") 1 ) (command pause) ) (setvar "clayer" oldlay) Quote Link to comment Share on other sites More sharing options...
tgibbo Posted March 13, 2015 Author Share Posted March 13, 2015 Hi Bigal Thanks for the reply. This looks very promising. Can you change the first part to be similar to lots of other lisps I have. EG (defun C:tozalines () My command line can then be tozalines Quote Link to comment Share on other sites More sharing options...
tgibbo Posted March 13, 2015 Author Share Posted March 13, 2015 Hi Bigal I have been trying this one out and it works up to changing the layer to lines but after that it won't change the linetype to hidden. It keeps the line type setting for layer Lines. Is there something that might be missing here? Regards Tony Quote Link to comment Share on other sites More sharing options...
tombu Posted March 16, 2015 Share Posted March 16, 2015 See other thread: http://www.cadtutor.net/forum/showthread.php?91404-Lisp-rotine-for-simple-line-commands#5 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.