Jump to content
bogeymen77

looking for a lisp to offset and change the new line color in the same layer

Recommended Posts

bogeymen77

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.

Share this post


Link to post
Share on other sites
BIGAL

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".....

Share this post


Link to post
Share on other sites
bogeymen77

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

Share this post


Link to post
Share on other sites
dlanorh
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 by dlanorh

Share this post


Link to post
Share on other sites
BIGAL

Good to see you have a go its how to learn, you were very close, dlanorh tidied it.

Share this post


Link to post
Share on other sites
bogeymen77

Awesome !!

 

Thank you very much dlanorh that will save me a lot of time at the end of the day.

Thank you Bigal too.

Share this post


Link to post
Share on other sites
dlanorh
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. ;)

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...