Message 1 of 17
Error AutoCAD.Application Not applicable

Not applicable
11-07-2016
06:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I'm getting this error message while execute (vlax-invoke ob1 'intersectwith ob2 mod) and unable to predict the error. Could you please support on this ;program to segregate the objects (defun intersectionsbetweensets ( ss1 ss2 / id1 id2 ob1 ob2 rtn ) (VL-LOAD-COM) (vl-list-loaded-vlx) (setq id1 nil id2 nil ob1 nil ob2 nil rtn nil ) (repeat (setq id1 (sslength ss1)) (setq ob1 (vlax-ename->vla-object (ssname ss1 (setq id1 (1- id1)))) );repeat (repeat (setq id2 (sslength ss2)) (setq ob2 (vlax-ename->vla-object (ssname ss2 (setq id2 (1- id2)))) rtn (cons (intersections ob1 ob2 acextendnone) rtn))) );repeat (apply 'append (reverse rtn)) );defun ;program to find intersection between two selectionsets (defun C:x_intersets_horizontal (/ ss1 ss2 ) (vl-load-com) (vl-list-loaded-vlx) (setq ss1 nil ss2 nil ss nil ent1 nil ssno nil pnt nil) (if (and (setq ss1 (ssget "l")) (setq ss2 (ssget "X")) );and (progn ; and true condition (setq ent1 (ssname ss1 0) ss (ssdel ent1 ss2)) (if (= ss nil) (progn ; (= ss nil) true condition (setq pnt nil) (command "setvar" "users1" "0") );progn (= ss nil) true condition (progn ; (= ss nil) false condition (setq ssno (sslength ss)) (setq pnt (intersectionsbetweensets ss1 ss)) ;find the intersection (if (= pnt nil) (progn ; (= pnt nil) true condition (setq ss1 nil ss nil) (command "setvar" "users1" "0") );progn (= pnt nil) (progn ; false condition (setq no 0 no (length pnt)) (setq ss1 nil ss nil) (command "setvar" "users1" no) );progn (= pnt nil) false condition );if (= pnt nil) );progn (= ss nil) false condition ); if (= ss nil) ); progn and true condition ); if );defun ;program to find the intersection of objects (defun intersections ( ob1 ob2 mod / lst rtn ) (vl-load-com) (vl-list-loaded-vlx) (setq lst nil lst (vlax-invoke ob1 'intersectwith ob2 mod) );setq (repeat (/ (length lst) 3) (setq rtn (cons (list (car lst) (cadr lst) (caddr lst)) rtn) lst (cdddr lst) );setq );repeat (reverse rtn) );defun