Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good morning!
I've been putting together lisps by researching here, mashing things together/trial and error until I'm able to get it to work as I want. But I've been struggling to get this one going (and another one that I'll make a different post for).
This one is about the Offset into a specific layer and linetype. Below is what I have to far.
The idea is to run the command and select which option to go with 1/5.
4 of them go to the same layer but different linetypes. The last one goes into a different layer and linetype by layer.
However I'm having issues with it changing into the linetype I want. Please help
;;;;;;;;;;;;;;;;;;;;;;;;;;;; OFFSET-WIRE to Layer/ LT ;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun c:WIRE () (setvar "cmdecho" 0) (command "attdia" "1") (setq offDist 10) ;(getstring "enter offest distance")) (setq oldlayer(getvar "clayer")) ;Determine current Layer; (setq client (getint "What Line Offset do you need? [1] 1/W IN, [2] 2/W IN, [3] 3/W IN, [4] 4/W IN, [5] RM" ) ) (IF (= CLIENT 1) (command "layer" "s" "INSTALL" "") (setq linety "1WIRE") ) (IF (= CLIENT 2) (command "layer" "s" "INSTALL" "") (setq linety "2WIRE") ) (IF (= CLIENT 3) (command "layer" "s" "INSTALL" "") (setq linety "3WIRE") ) (IF (= CLIENT 4) (command "layer" "s" "INSTALL" "") (setq linety "4WIRE") ) (IF (= CLIENT 5) (command "layer" "s" "REMOVE" "") (setq linety "bylayer") ) (print "select line to offset") (command "offset" offDist pause pause "") (command "chprop" "last" "" "lt" linety "") (command "layer" "s" oldlayer "") ;Layer back to previous; (princ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;; END OFFSET-WIRE to Layer/ LT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Solved! Go to Solution.