TiagoFigueiredo
Industrial
I'm trying to create a chamfer using pre selected faces in a macro. But i'm no having much sucess
what I have tried:
The faces are previously selected.
the error appears here:
chamfer1.AddElementToChamfer(reference1)
Tiago Figueiredo
Tooling Engineer
what I have tried:
The faces are previously selected.
Code:
chamfer2 = shapeFactory1.AddNewChamfer(reference1, catTangencyChamfer, catLengthAngleChamfer, catNoReverseChamfer, 1, 45.0#)
Dim Num_Faces As Integer = selection1.count
Dim Faces_ref(Num_Faces)
For i = 1 To Num_Faces
Dim MyBRepName = (selection1.Item(i).Value.Name)
MyBRepName = Replace(MyBRepName, "Selection_", "")
MyBRepName = Left(MyBRepName, InStrRev(MyBRepName, "));"))
MyBRepName = MyBRepName + ");WithPermanentBody;WithoutBuildError;WithSelectingFeatureSupport;MFBRepVersion_CXR15)"
MsgBox(MyBRepName)
reference1 = Part1.CreateReferenceFromName(MyBRepName)
chamfer1.AddElementToChamfer(reference1)
Next
the error appears here:
chamfer1.AddElementToChamfer(reference1)
Tiago Figueiredo
Tooling Engineer