Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Inventor 2022
API VB.NET Visual Studio
i try to Sort Edges with Shortest Distance to CeneterPoint (0,0,0)
My Goal is to Create SketchLines to Connect all Edges in This Way:
The Edges are with Length between 81.0 to 81.3mm
Is there a way to sort the Edges with Shortest Distance to CenterPoint(0,0,0)
and then Connect each Bottom Vertex from each Edge with each other.
To get the Result like in Sketch1 ?
This is my Code:
Still in Progess
Imports System.Runtime.InteropServices
Imports Inventor
Imports Microsoft.Win32
Imports System.Collections.Generic
Imports System.Linq
Imports System.IO
Imports Autodesk.iLogic.Automation
Imports Autodesk.iLogic.Interfaces
Module CommandFunctionButton_16
Public Sub CommandFunctionfweButton_16()
Dim oPartDoc As PartDocument = g_inventorApplication.ActiveDocument
Dim oCompDef As PartComponentDefinition = oPartDoc.ComponentDefinition
Dim oTO As TransientObjects = g_inventorApplication.TransientObjects
Dim oTG As TransientGeometry = g_inventorApplication.TransientGeometry
Dim oFace As Face = g_inventorApplication.CommandManager.Pick(SelectionFilterEnum.kPartFaceFilter, "Pick a Face")
Dim oEdge As Edge
Dim oCurveEval As CurveEvaluator
Dim oMin, oMax, oLength As Double
For Each oEdge In oFace.Edges
oCurveEval = oEdge.Evaluator
Call oCurveEval.GetParamExtents(oMin, oMax)
Call oCurveEval.GetParamAtLength(oMin, oMax, oLength)
Next
End Sub
End Module
Thanks for any Suggestion.
Solved! Go to Solution.