sharksun 发表于 2004-7-11 02:10:00

问:对象相交

如果两实体没有交点,那返回值是什么? 帮助里提示:<BR>If the two objects do not intersect, no data is returned.                       


intPoints = lineObj(i).IntersectWith(splineObj(1), acExtendNone)<BR>               <FONT color=#ee1169>If intPoints = ???</FONT>Then 。。。。。。<BR>                                               .........<BR>               end if<BR>               


       试了一下,intpoint=vbNull       vbEmpty Empty 等等,都出错。提示类型不匹配。<BR>        那应该等于什么? 难道只能用On error resume next 来处理?


<BR>

shenhui 发表于 2004-7-11 04:37:00

VB中返回的交点是Variant类型,可用Ubound函数来判断,如果返回值为 -1表示不相交

sharksun 发表于 2004-7-11 11:09:00

谢谢。
页: [1]
查看完整版本: 问:对象相交