clint0577 Posted November 1, 2012 Share Posted November 1, 2012 All I need to do is change the linetype to "OVERHEAD_ELECTRIC_SERVICE", draw a line or two, then switch back to "BYLAYER" linetype. This code I have written doesn't change the linetype at all and when I take out (setvar "celtype" "bylayer"), it works but then of course I'm out of Bylayer linetype. Somebody please help!!! This is driving me crazy (defun c:OES () (command "layer" "s" "ELECTRIC_LINE" "") (SETVAR "CELTYPE" "OVERHEAD_ELECTRIC_SERVICE") (command "LINE") (setvar "CELTYPE" "bylayer") (PRINC) ) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 1, 2012 Share Posted November 1, 2012 (defun c:oes ( / ) (command "_.-layer" "_M" "ELECTRIC_LINE" "") (if (tblsearch "LTYPE" "OVERHEAD_ELECTRIC_SERVICE") (setvar 'celtype "OVERHEAD_ELECTRIC_SERVICE") ) (command "_.line") (while (= 1 (logand 1 (getvar 'cmdactive))) (command "\\")) (setvar 'celtype "BYLAYER") (princ) ) Quote Link to comment Share on other sites More sharing options...
clint0577 Posted November 1, 2012 Author Share Posted November 1, 2012 Thanks!!!! Quote Link to comment Share on other sites More sharing options...
clint0577 Posted November 1, 2012 Author Share Posted November 1, 2012 I'm not sure if it matters or not but this is what I came up with (command "layer" "s" "ELECTRIC_LINE" "") (SETVAR "CELTYPE" "OVERHEAD_ELECTRIC_SERVICE") (command "LINE" PAUSE) (WHILE (< 0(GETVAR "CMDACTIVE")) (COMMAND PAUSE)) (setvar "CELTYPE" "bylayer") (PRINC) ) 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.