Hi,
inventor 2022
API VB.NET Visual Studio
I try to Select a Face with a Slot, Take the Inside EdgeLoop, and Create a Chamfer on this Slot:
This is the Goal
This is my Code:
Dim oFaceSlot As Face = g_inventorApplication.CommandManager.Pick(SelectionFilterEnum.kPartFaceFilter, "Pick a Face")
Dim oEdgeloop As EdgeLoop
Dim oEdge As Edge
Dim oEdgeColl As EdgeCollection = oTO.CreateEdgeCollection
For Each oEdgeloop In oFaceSlot.EdgeLoops
If oEdgeloop.IsOuterEdgeLoop = False Then
For Each oEdge In oEdgeloop.Edges
oEdgeColl.Add(oEdge)
Next
End If
Next
Dim oChamfer As ChamferFeature
oChamfer = oPart_C_Def.Features.ChamferFeatures.AddUsingDistance(oEdgeColl, 0.5, True)
Error:
Unknow Error
It Works with Fillet
But i Need a Chamfer.
Thanks for Suggestion
Hi,
inventor 2022
API VB.NET Visual Studio
I try to Select a Face with a Slot, Take the Inside EdgeLoop, and Create a Chamfer on this Slot:
This is the Goal
This is my Code:
Dim oFaceSlot As Face = g_inventorApplication.CommandManager.Pick(SelectionFilterEnum.kPartFaceFilter, "Pick a Face")
Dim oEdgeloop As EdgeLoop
Dim oEdge As Edge
Dim oEdgeColl As EdgeCollection = oTO.CreateEdgeCollection
For Each oEdgeloop In oFaceSlot.EdgeLoops
If oEdgeloop.IsOuterEdgeLoop = False Then
For Each oEdge In oEdgeloop.Edges
oEdgeColl.Add(oEdge)
Next
End If
Next
Dim oChamfer As ChamferFeature
oChamfer = oPart_C_Def.Features.ChamferFeatures.AddUsingDistance(oEdgeColl, 0.5, True)
Error:
Unknow Error
It Works with Fillet
But i Need a Chamfer.
Thanks for Suggestion
The code looks fine and it works for me. May be the chamfer size (0.5) is too big for your test case. Dimension units in API is always in centimeters.
The code looks fine and it works for me. May be the chamfer size (0.5) is too big for your test case. Dimension units in API is always in centimeters.
Still unknow Error:
i also was trying with 0.1 or 0.05 or "0.1"
Stil Error.
Should i Use a Chamfer Definition?
But dont know exactly what to use it?
Still unknow Error:
i also was trying with 0.1 or 0.05 or "0.1"
Stil Error.
Should i Use a Chamfer Definition?
But dont know exactly what to use it?
This is my test case with local iLogic rule
This is my test case with local iLogic rule
Hi @Michael.Navara ,
I check your iLogic Rules, and it work also with Curved Face.
is this Possible that i got Error, because in my Example the Face is not Planar.
This is a Curved Face, do this matter?
Maybe this is the Problem with API?
Is Stange, because the FilletFeature Works Fine.
I only Think, that the Feature still need some Ddefinitions?
Hi @Michael.Navara ,
I check your iLogic Rules, and it work also with Curved Face.
is this Possible that i got Error, because in my Example the Face is not Planar.
This is a Curved Face, do this matter?
Maybe this is the Problem with API?
Is Stange, because the FilletFeature Works Fine.
I only Think, that the Feature still need some Ddefinitions?
Can you post your test data, where my code doesn't work?
Can you post your test data, where my code doesn't work?
Hi,
Your iLogic Code is Working, also with Curved Face.
What you mean test data?
Hi,
Your iLogic Code is Working, also with Curved Face.
What you mean test data?
Can't find what you're looking for? Ask the community or share your knowledge.