@eyal.ch ,
What @ВeekeeCZ is trying to say, is that Lee's website already shows you how to call the subfunction and everything.
If you are not comfortable enough with putting Lee's 2 pieces of information together, then perhaps you are trying to advance faster than you should be.
Do you know how to run a lisp file even by chance?
If not, look HERE.
Otherwise, save this text into a file with a '.lsp' extension (a lisp file):
;; Intersections - Lee Mac
;; Returns a list of all points of intersection between two objects
;; for the given intersection mode.
;; ob1,ob2 - [vla] VLA-Objects
;; mod - [int] acextendoption enum of intersectwith method
(defun LM:intersections ( ob1 ob2 mod / lst rtn )
(if (and (vlax-method-applicable-p ob1 'intersectwith)
(vlax-method-applicable-p ob2 'intersectwith)
(setq lst (vlax-invoke ob1 'intersectwith ob2 mod))
)
(repeat (/ (length lst) 3)
(setq rtn (cons (list (car lst) (cadr lst) (caddr lst)) rtn)
lst (cdddr lst)
)
)
)
(reverse rtn)
)
(defun c:inter ( / obj1 obj2 )
(if (and (setq obj1 (car (entsel "\nSelect 1st Object: ")))
(setq obj2 (car (entsel "\nSelect 2nd Object: ")))
)
(foreach pnt (LM:intersections (vlax-ename->vla-object obj1) (vlax-ename->vla-object obj2) acextendnone)
(entmake (list '(0 . "POINT") (cons 10 pnt)))
)
)
(princ)
)
(vl-load-com) (princ)
Then load the file into AutoCAD (as described in the link above).
Then run the INTER command (as defined in Lee's example lisp).
If you cannot perform these steps, then you will need to spend more time researching how to accomplish these basics.
Best,
~DD