Message 1 of 6

Not applicable
10-05-2020
11:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear All,
I am trying to put "XLINE" in all the "CENTER" lines. For that i an trying the way of like Selection set > get the starting point and end point then placing the XLINE. Below are my code. But i am facing problrm in that.
Could anybody can solve this and teach me where i put wrongly ?? will be appreciated.
(defun c:xlines()
(command "FILEDIA" 0) ;;Making command line process
(setvar "CMDECHO" 0) ;;Turn off the SNAP
(command "TILEMODE" "1")
(if (setq cL(ssget '((0 . "LINE")(8 . "Top (Plan) View-CENTER"))))
(progn
(setq ctr 0)
(while
(setq ent(ssname cL ctr))
(setq ln(car ent))
(setq lnEnt(entget ln))
(setq startPoint(cdr(assoc 10 lnEnt)))
(setq endPoint(cdr(assoc 11 lnEnt)))
(if (=(car(cdr(assoc 10 lnEnt))) (car(cadr(assoc 11 lnEnt))))
(progn
(command "_.XLINE" "V" startPoint "")
)
)
(command "_.XLINE" "H" startPoint "")
)
(setq ctr(1+ ctr))
)
)
(command "TILEMODE" "0")
(princ)
)
Regards
Ananth
Solved! Go to Solution.