Message 1 of 3
i get an error saying "The parameter is incorrect"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
i can run my rules with no Errors but when i try to creat my ipt, i get an error saying my rule is incorrect
Dim oDoc As PartDocument oDoc = ThisApplication.ActiveDocument Dim oCompDef As SheetMetalComponentDefinition oCompDef = oDoc.ComponentDefinition Dim oiMate As iMateDefinition For Each oiMate In oCompDef.iMateDefinitions If InStr(oiMate.Name,"Stud") Then oiMate.Delete() End If Next Dim oFeature As PartFeature For Each oFeature In oCompDef.Features If InStr(oFeature.Name,"Bushing") Then Dim oFace As Face For Each oFace In oFeature.Faces Dim oEdge As Edge For Each oEdge In oFace.Edges Dim oCurveEval As CurveEvaluator = oEdge.Evaluator Dim MinParam As Double Dim MaxParam As Double oCurveEval.GetParamExtents(MinParam, MaxParam) Dim length As Double oCurveEval.GetLengthAtParam(MinParam, MaxParam, length) Dim MidParam As Double oCurveEval.GetParamAtLength(MinParam, length * 0.5, MidParam) Dim Params() As Double = {MidParam} Dim Points(2) As Double oCurveEval.GetPointAtParam(Params, Points) If length = (.875 in * PI*2.54) And Points(2) = Thickness * 2.54 Then Dim strMatchList(0) As String strMatchList(0) = Left(oFeature.Name,2) Dim oInsertiMateDefinition As InsertiMateDefinition oInsertiMateDefinition = oCompDef.iMateDefinitions.AddInsertiMateDefinition(oEdge, True, 0 , , Left(oFeature.Name,2) & " Stud", strMatchList) 'oInsertiMate = oCompDef.iMateDefinitions.AddInsertiMateDefinition(oEdge, True, 0, , Left(oFeature.Name,2) & " Stud",strMatchList ) End If Next Next End If Next