Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Inventor 2022
API Visual Studio VB.NET
i Try to make a IntersectWithCurve (Sketchline and SketchArc, for example) and Create a Point2d.
How can i get the Point2d?
Imports System.Runtime.InteropServices
Imports Inventor
Imports Microsoft.Win32
Module CommandFunctionButton_09
Public Sub CommandFunctionfweButton_09()
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 oWorkSketch01 As PlanarSketch
oWorkSketch01 = oCompDef.Sketches.Add(oCompDef.WorkPlanes.Item(3), False)
Dim oWorkPoint01 As Point2d
oWorkPoint01 = oTG.CreatePoint2d(0, 0)
Dim oWorkPoint02 As Point2d
oWorkPoint02 = oTG.CreatePoint2d(0, 10)
Dim oWorkPoint03 As Point2d
oWorkPoint03 = oTG.CreatePoint2d(-5, 5)
Dim oWorkPoint04 As Point2d
oWorkPoint04 = oTG.CreatePoint2d(5, 5)
Dim oWorkPoint05 As Point2d
oWorkPoint05 = oTG.CreatePoint2d(0, 8)
Dim oWorkPoint06 As Point2d
oWorkPoint06 = oTG.CreatePoint2d(0, 6)
Dim oSketchLine01 As SketchLine
oSketchLine01 = oWorkSketch01.SketchLines.AddByTwoPoints(oWorkPoint01, oWorkPoint02)
Dim oSketchArc01 As SketchArc
oSketchArc01 = oWorkSketch01.SketchArcs.AddByThreePoints(oWorkPoint03, oWorkPoint05, oWorkPoint04)
Dim oLineSegment01 As LineSegment2d
oLineSegment01 = oSketchLine01.Geometry
oLineSegment01.IntersectWithCurve(oSketchArc01,)
Dim oPointObj As ObjectCollection
oPointObj = oTO.CreateObjectCollection
Call oPointObj.Add()
Dim oPointsCross01 As Point2d
Dim oSketchLine02 As SketchLine
oSketchLine02 = oWorkSketch01.SketchLines.AddByTwoPoints(oWorkPoint03, oPointsCross01)
End Sub
End Module
Thanks for any Suggestion
Solved! Go to Solution.