Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Hi @aelqabbany,

 

try this approach (this is the Ilogic version):

 

Sub Main()
	Dim oPartDoc As PartDocument = ThisApplication.ActiveDocument
	Dim oCompDef As PartComponentDefinition = oPartDoc.ComponentDefinition
	Dim Solid1 As SurfaceBody = oCompDef.SurfaceBodies(1)
	Dim workPlane As WorkPlane = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAllPlanarEntities, "Select Plane")
	
	Dim context As NameValueMap = ThisApplication.TransientObjects.CreateNameValueMap
	context.Add(IntersectionFound,true)
	
    Dim contextValueForIntersection As Double
  	contextValueForIntersection = ThisApplication.MeasureTools.GetMinimumDistance(Solid1, workPlane.Plane, , , context)
	
	If (contextValueForIntersection = 0) Then
		MessageBox.Show("Intersection is found")
	Else 
		MessageBox.Show("No intersection")
	End If	
End Sub

 

Check out my Add-InsPlace Fasteners AddIn    Quick Section View AddIn 

:grinning_face: