11-29-2021
04:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
11-29-2021
04:48 AM
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-Ins: Place Fasteners AddIn Quick Section View AddIn
![]()