Jump to content

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


bogeymen77

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Awesome !!

 

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

Thank you Bigal too.

Link to comment
Share on other sites

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. ;)

Link to comment
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

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