bogeymen77 Posted May 14, 2018 Posted May 14, 2018 Hi, i'm looking for a lisp that will offset a line to a distance of 1.875 and change the color from blue to white. thanks. Quote
BIGAL Posted May 14, 2018 Posted May 14, 2018 Just write down the steps you do manually and its 90% done start with (command "offset" .... use Pause for the two pick's required. 2nd hint (command "chprop" "L"..... Quote
bogeymen77 Posted May 14, 2018 Author Posted May 14, 2018 Thank you. but i'm not to sure to understand.. i'm new to lisp. so if i normally do: "o" (offset) 1.875 (enter) chose the line, chose where i want it. than i click on the new line and manually change the color to white... so for now i did add this line: ;counter top offset 1.875 (defun c:OC () (command "Offset" 1.875 pause)(princ)) and i use this command line to change the color after i did the offset.. (defun c:C1 () (command "CHANGE" (ssget) "" "P" "C" "WHITE" "") ) but what i don't know is how to combine them. i want the new offset line to change color each time i do the offset. thank Quote
dlanorh Posted May 14, 2018 Posted May 14, 2018 (edited) Thank you.but i'm not to sure to understand.. i'm new to lisp. so if i normally do: "o" (offset) 1.875 (enter) chose the line, chose where i want it. than i click on the new line and manually change the color to white... so for now i did add this line: ;counter top offset 1.875 (defun c:OC () (command "Offset" 1.875 pause)(princ)) and i use this command line to change the color after i did the offset.. (defun c:C1 () (command "CHANGE" (ssget) "" "P" "C" "WHITE" "") ) but what i don't know is how to combine them. i want the new offset line to change color each time i do the offset. thank ;counter top offset 1.875 (defun c:OC ( / ent pt) (setq ent (car (entsel "\nSelect Line to Offset : "))) (initget 1) (setq pt (getpoint "\n Select side to offset : ")) (command "Offset" 1.875 ent pt "") (command "CHANGE" (entlast) "" "P" "C" "WHITE" "") ) Edited May 14, 2018 by dlanorh Quote
BIGAL Posted May 14, 2018 Posted May 14, 2018 Good to see you have a go its how to learn, you were very close, dlanorh tidied it. Quote
bogeymen77 Posted May 14, 2018 Author Posted May 14, 2018 Awesome !! Thank you very much dlanorh that will save me a lot of time at the end of the day. Thank you Bigal too. Quote
SLW210 Posted May 14, 2018 Posted May 14, 2018 I have moved your thread to the AutoLISP, Visual LISP & DCL Forum, please post in the most appropriate forum. Quote
dlanorh Posted May 14, 2018 Posted May 14, 2018 Awesome !! Thank you very much dlanorh that will save me a lot of time at the end of the day. Thank you Bigal too. Not a problem, now you have to figure out how to make it better or do more. Quote
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.