- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Inventor and Visual Studio
I try to make a Fillet Feature on a Edge of 3D Modell.
I was creating a Pocket in a 3D Model (simple Extrude with Cut Operation with kNegativeExtentDirection )
Now i try to make a Fillet on the EndFace of the Extrude Object.
The Final Result should look like This:
I want to choose or select with Scripting those Edges.
I was looking for information about the Position or number of: Points, Edges, Faces
But i was finde nothing.
Is this Posistion of Edges like in the Foto below?
This is my Code:
Imports System.Runtime.InteropServices
Imports Inventor
Imports Microsoft.Win32
Module CommandFunctionButton_01
Public Sub CommandFunctionfweButton_01()
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 oWorkPoint1 As Vertex
oWorkPoint1 = g_inventorApplication.CommandManager.Pick(SelectionFilterEnum.kAllPointEntities, "Pick a Points1")
Dim oWorkPoint2 As Vertex
oWorkPoint2 = g_inventorApplication.CommandManager.Pick(SelectionFilterEnum.kAllPointEntities, "Pick a Points2")
Dim oWorkPoint3 As Vertex
oWorkPoint3 = g_inventorApplication.CommandManager.Pick(SelectionFilterEnum.kAllPointEntities, "Pick a Points3")
Dim oWorkPlaneA1 As WorkPlane
oWorkPlaneA1 = oCompDef.WorkPlanes.AddByThreePoints(oWorkPoint1, oWorkPoint2, oWorkPoint3, False)
Dim oWorkSketch As PlanarSketch = oCompDef.Sketches.Add(oWorkPlaneA1, False)
Dim oRectangleLines As SketchEntitiesEnumerator
oRectangleLines = oWorkSketch.SketchLines.AddAsTwoPointRectangle(oTG.CreatePoint2d(0, 0), oTG.CreatePoint2d(2.5, 1))
Dim oProfile As Profile
oProfile = oWorkSketch.Profiles.AddForSolid
Dim oExtrudeDef As ExtrudeDefinition
oExtrudeDef = oCompDef.Features.ExtrudeFeatures.CreateExtrudeDefinition(oProfile, PartFeatureOperationEnum.kCutOperation)
Call oExtrudeDef.SetDistanceExtent(1, PartFeatureExtentDirectionEnum.kNegativeExtentDirection)
Dim oExtrude1 As ExtrudeFeature
oExtrude1 = oCompDef.Features.ExtrudeFeatures.Add(oExtrudeDef)
Dim oEdges As Edge
oEdges = oExtrude1.EndFaces.Item(10)
Dim oFillet As FilletFeature
oFillet = oCompDef.Features.FilletFeatures.AddSimple(oEdges, 1)
End Sub
End Module
I get a Error.
This Code works Fine until Extrude the Pocket.
Then it crash.
It is Possible to Select the Edges with a Number?
Thanks for any Suggestion.
Solved! Go to Solution.