IntersectWith Method

Back to Methods Reference

Gets the points where one object intersects another object in the drawing.

Signature

VBA : RetVal = object.IntersectWith(IntersectObject, ExtendOption)

VL : RetVal = (vla-IntersectWith object IntersectObject, ExtendOption)

(vla-IntersectWith obj1 obj2 acExtendBoth)

  • Object : All Drawing Objects (Except Pviewport and PolygonMesh)
    The object or objects this method applies to.

  • IntersectObject : Object, input-only;
    The object can be one of All Drawing Objects.

  • ExtendOption : AcExtendOption enum; input-only
    This option specifies if one or the other, both, or none of the entities are to be extended in order to attempt an intersection.

acExtendNone

Does not extend either object.

acExtendThisEntity

Extends the base object.

acExtendOtherEntity

Extends the object passed as an argument.

acExtendBoth

Extends both objects.

 

  • RetVal : Variant (array of doubles)
    The array of points where one object intersects another object in the drawing.

Remarks

If the two objects do not intersect, no data is returned. You can request the point of intersection that would occur if one or both of the objects were extended to meet the other.

Example :


(defun c:al-intersectwith ()

(vl-load-com)

(setq util (vla-get-utility 
                   (vla-get-activedocument 
                        (vlax-get-acad-object))))
                        
(vla-getentity util 'obj1 'ip "\nSelect First Object: ")

(vla-getentity util 'obj2 'ip "\nSelect Second Object: ")

(setq int (vla-IntersectWith obj1 obj2 acExtendBoth))

(princ int)

(princ)

);defun

 
The AutoLisp/Visual Lisp/VBA Resource Website
Google
Search the WWW Search AfraLisp

Copyright © 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website