Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
C_Haines_ENG
in reply to: 3DAli

You can use the RangeBox property of a part feature, and then check if they are overlapping using "IsDisjoint". See code below. Be careful with this method though, as if the hole is COMPLETELY overlapped it will return "Nothing" for its rangebox and then you cant use .isDisjoint. I added in some checking for this, but its something to be aware of.

 

Dim oPart As PartDocument = ThisDoc.Document

For Each oFeature As PartFeature In oPart.ComponentDefinition.Features.HoleFeatures
	
	If oFeature.RangeBox Is Nothing Then Continue For

	For Each oFeatureOther As PartFeature In oPart.ComponentDefinition.Features.HoleFeatures
		
		If oFeatureOther IsNot oFeature And oFeatureOther.RangeBox IsNot Nothing 
			
			If Not oFeature.RangeBox.IsDisjoint(oFeatureOther.RangeBox) Then Logger.Info("OVERLAPPING: " & oFeature.Name)
			
		End If
		
	Next
	
Next