Well OK here is the dwg.
+ the real problem is that is not always a strait polyline it can have arc inside.
The code has a lot of things that can be faster, but it works and it is correct and precise, and i have to do this routine 10 times a day so i do not care if it is enough quick to run in 1000 times a day.
(defun c:jpp()
(setq primitiv (ssget)) ;;; select the base line
(setq pt1 (getpoint "\Specify side"))
(setq bp (getreal"\Paplasinajuma joslas platums")) ;;;first number it can be 3,5 fir example
(setq dist (getreal"\Paplasinajuma joslas garums")) ;;; this need to be 50 by the dwg i posted
;;;here i do an offset job and getting all the lines in future to delete them
(command "_.offset" (* bp 0.02) primitiv pt1 "e")
(setq primitiv2 (ssget "l"))
(command "_.offset" (* bp 0.08) primitiv pt1 "e")
(setq primitiv3 (ssget "l"))
(command "_.offset" (* bp 0.18) primitiv pt1 "e")
(setq primitiv4 (ssget "l"))
(command "_.offset" (* bp 0.32) primitiv pt1 "e")
(setq primitiv5 (ssget "l"))
(command "_.offset" (* bp 0.5) primitiv pt1 "e")
(setq primitiv6 (ssget "l"))
(command "_.offset" (* bp 0.68) primitiv pt1 "e")
(setq primitiv7 (ssget "l"))
(command "_.offset" (* bp 0.82) primitiv pt1 "e")
(setq primitiv8 (ssget "l"))
(command "_.offset" (* bp 0.92) primitiv pt1 "e")
(setq primitiv9 (ssget "l"))
(command "_.offset" (* bp 0.98) primitiv pt1 "e")
(setq primitiv10 (ssget "l"))
(command "_.offset" bp primitiv pt1 e)
(setq primitiv11 (ssget "l"))
(command "_.measure" primitiv "b" "help1" "y" (* dist 0.1))
;;; this is the code for getting crossing blocks, exploding them, and finding the intersection lines
(setq skers (ssget "l"))
(command "_.explode" skers)
(setq skers (ssget "l"))
(command "_test1" skers primitiv )
;;;here is the place for the finding the intersection points, i do not need a loop hear i can do the command 10 times and it is ok for me
;;;here i simply delete all the polylines, this part works
;(command "_.erase" primitiv2 "")
;(command "_.erase" primitiv3 "")
;(command "_.erase" primitiv4 "")
;(command "_.erase" primitiv5 "")
;(command "_.erase" primitiv6 "")
;(command "_.erase" primitiv7 "")
;(command "_.erase" primitiv8 "")
;(command "_.erase" primitiv9 "")
;(command "_.erase" primitiv10 "")
;(command "_.erase" primitiv11 "")
(princ)
)
Thanks for your help, i have nobody to help me with Lisp in Latvia. In lisp way we are in stone age here