This appears to work. Haven't tested extensively, let me know if it doesn't work as expected.
This compares 2 LWPolylines (will not work for 2DPolylines or 3DPolylines, but can be made to do so if necessary).
Makes 2 set of marks, if the routine finds a vertex without a matching vertex in the second polyline it draws a ray.
The 2 polylines are selected arbitrarily from the selection set, so each marked point will need manually inspected for your purposes.
The red ortho left rays are for the first polyline checked, the green ortho right rays are for the second.
From here you can modify as you need to get whatever marks you want.
Code:
(vl-load-com)
(defun c:CPL () (c:ComparePolylines))
(defun c:ComparePolylines ( / ss pl1 pl2 pl:lst1 pl:lst2 a cnt chk)
(setq ss (ssadd))
(While (not (= (sslength ss) 2))
(princ "\nSelect 2 LwPolylines: ")
(setq ss (ssget (list (cons 0 "LWPOLYLINE"))))
(if (not (= (sslength ss) 2)) (princ "\nMust Select 2 LWPolylines to compare"))
)
(setq pl1 (ssname ss 0) pl2 (ssname ss 1))
(setq pl:lst1 (getcoords pl1) pl:lst2 (getcoords pl2))
(foreach a pl:lst1
(progn
(setq cnt 0)
(setq chk nil)
(repeat (length pl:lst2)
(if (and (= (car a) (car (nth cnt pl:lst2))) (= (cadr a) (cadr (nth cnt pl:lst2))))
(setq chk T)
)
(setq cnt (1+ cnt))
)
(if (not chk)
(entmakex (list (cons 0 "RAY") (cons 100 "AcDbEntity") (cons 100 "AcDbRay") (cons 62 1) (cons 10 a) '(11 -1.0 0.0 0.0)))
)
)
)
(foreach a pl:lst2
(progn
(setq cnt 0)
(setq chk nil)
(repeat (length pl:lst1)
(if (and (= (car a) (car (nth cnt pl:lst1))) (= (cadr a) (cadr (nth cnt pl:lst1))))
(setq chk T)
)
(setq cnt (1+ cnt))
)
(if (not chk)
(entmakex (list (cons 0 "RAY") (cons 100 "AcDbEntity") (cons 100 "AcDbRay") (cons 62 3) (cons 10 a) '(11 1.0 0.0 0.0)))
)
)
)
(princ)
)
(defun getcoords (ent / lst1 lst2)
(setq lst1 (vlax-safearray->list (vlax-variant-value (vlax-get-property (vlax-ename->vla-object ent) "Coordinates"))))
(setq lst2 (list))
(While lst1
(setq lst2 (append lst2 (list (list (car lst1) (cadr lst1)) )))
(setq lst1 (cddr lst1))
)
(if lst2 lst2 (princ))
)
(princ "\nComparePolylines Loaded, enter \"ComparePolylines\" or \"CPL\" to run.")
(princ)