Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

looking for offset lisp routine

4 REPLIES 4
Reply
Message 1 of 5
zootango
2192 Views, 4 Replies

looking for offset lisp routine

I need an offset lisp routine to offset a selected line a set distance on each side of the selected line and change the layer of the offset lines to the current layer, and then keep prompting me to select the next line for offsetting until I'm finished.

 

Anyone have anything like this?

4 REPLIES 4
Message 2 of 5
rkmcswain
in reply to: zootango

See this, if it doesn't do exactly what you want, it's a good head start:

http://forums.augi.com/showthread.php?9932-Offset-line-both-sides-at-the-same-time

 

 

R.K. McSwain     | CADpanacea | on twitter
Message 3 of 5
Kundertk
in reply to: zootango

Here is one that might work for you:  http://www.lee-mac.com/doubleoffset.html

Message 4 of 5
Lisa_Pohlmeyer
in reply to: zootango

I use this one all the time.



Lisa Pohlmeyer
Civil 3D User
Website | Facebook | Twitter

Message 5 of 5
Anonymous
in reply to: zootango

Give this a try...

 

to run command after lisp is loaded type "droffset"

 

;***********************************************************************************
(DEFUN c:droffset (/ layer echo temp entity);start of offset
(if (= initerr nil)
(progn
(load "error")
(initerr)
)
)
(setq layer (getvar "clayer")
oldlay (getvar "clayer")
echo (getvar "cmdecho"))
(setvar "cmdecho" 0)
(while
(progn
(setq temp (getstring (strcat "\nDestination layer?<"layer">:")))
(cond
((eq temp "") nil)
((tblsearch "layer" temp) (setq layer temp) nil)
(t (princ "\nLayer not found."))
)))
(initget (+ 2 4) "through")
(setq temp (getdist (strcat "\nOffset distance or through <"
(if dist (rtos dist) "through") ">: ")))
(cond
((eq temp "through") (setq dist nil))
(temp (setq dist temp))
)
(setq temp (if dist "\nSide to offset?"
"\nThrough point: "))
(while
(and
(setq entity (entsel
"\nSelect object to offset: "))
(setq pt (getpoint temp))
)
(command ".offset" (if dist dist "t")
entity pt "")
(setq entity (entlast)
entity (entget entity)
entity (subst (cons 8 layer)
(assoc 8 entity) entity))
(entmod entity)
)
(setvar "cmdecho" echo)
(COMMAND "LAYER" "S" oldlay "")
(reset nil)
;(princ)
); end of offset
;***********************************************************************************

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report