Message 1 of 13
IntersctWith Method fails

Not applicable
01-07-2006
11:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a drawing, drawn by someone else, that refuses to return valid
intersections of 2 arcs or an Arc & Pline. A listing of both objects'
properties gives no clues, to may anyway, of why this would be. Strange
thing is, Autocad's TRIM command will not work correctly with them, either.
I'm attaching a portion of this drawing to demonstrate this. I'm also
posting some lisp code (I know this is a VBA group, lisp is simpler for this
demonstration) that shows it does not work. If anyone has any ideas as to
why this happens and what I can do to work around it, I'd be mighty
grateful.
[code]
(defun c:IntTest (/ ent1 ent2 obj1 obj2 intpts)
(if (setq ent1 (car (entsel "\nFirst entity: "))
ent2 (car (entsel "....second entity: ")))
(progn
(setq obj1 (vlax-ename->vla-object ent1)
obj2 (vlax-ename->vla-object ent2))
(if (setq intpts (vlax-invoke obj1 'intersectwith obj2 acextendnone))
(print intpts)
(princ "\nNo intersections found.")
)
)
)
(princ)
)[/code]
Thanks,
Jeff
intersections of 2 arcs or an Arc & Pline. A listing of both objects'
properties gives no clues, to may anyway, of why this would be. Strange
thing is, Autocad's TRIM command will not work correctly with them, either.
I'm attaching a portion of this drawing to demonstrate this. I'm also
posting some lisp code (I know this is a VBA group, lisp is simpler for this
demonstration) that shows it does not work. If anyone has any ideas as to
why this happens and what I can do to work around it, I'd be mighty
grateful.
[code]
(defun c:IntTest (/ ent1 ent2 obj1 obj2 intpts)
(if (setq ent1 (car (entsel "\nFirst entity: "))
ent2 (car (entsel "....second entity: ")))
(progn
(setq obj1 (vlax-ename->vla-object ent1)
obj2 (vlax-ename->vla-object ent2))
(if (setq intpts (vlax-invoke obj1 'intersectwith obj2 acextendnone))
(print intpts)
(princ "\nNo intersections found.")
)
)
)
(princ)
)[/code]
Thanks,
Jeff