Reply

AddNormalToCurveAtDistanceAlongCurve

[ Edited ]

Hello,

 

i'm having a question concerning the function AddNormalToCurveAtDistanceAlongCurve

We are drawing a Line2D on a certain reference plane.

Now i want to create a new referenceplane along this curve.

When doing this with the code below i get the following message (see attachement)              

A missing reference.

I have seen the last argument of this function contains a optional parameter ParentCurve.

But i don't know wich or what object i have to put in this parameter.

Any suggestions about how to set a reference plane along a Line2D.

 

'*******************************************************************
'* Special entry add Notches to the tube
'*******************************************************************
                    Dim objProfileNotch As SolidEdgePart.Profile = Nothing


                    If paAddShapeEnd.rdbFront.Checked = True Then
                        objProfileNotch = paPartDocument.ProfileSets.Add.Profiles.Add(objRefPlaneFront)
                        objProfileNotch.Name = "FRONT_PROF_NOTCH"
                    ElseIf paAddShapeEnd.rdbEnd.Checked = True Then
                        objProfileNotch = paPartDocument.ProfileSets.Add.Profiles.Add(objRefPlaneEnd)
                        objProfileNotch.Name = "END_PROF_NOTCH"
                    End If

                    Dim loLineCurve As SolidEdgeFrameworkSupport.Line2d

                    If paAddShapeEnd.chkFlip.Checked = False Then
                        loLineCurve = objProfileNotch.Lines2d.AddBy2Points(loDataType.stPoint_AXE_X_1 / 1000, loDataType.stPoint_AXE_Y_1 / 1000, loDataType.stPoint_AXE_X_2 / 1000, loDataType.stPoint_AXE_Y_2 / 1000)
                    Else
                        loLineCurve = objProfileNotch.Lines2d.AddBy2Points((loDataType.stPoint_AXE_X_1 / 1000) * (-1), loDataType.stPoint_AXE_Y_1 / 1000, (loDataType.stPoint_AXE_X_2 / 1000) * (-1), loDataType.stPoint_AXE_Y_2 / 1000)
                    End If

                    objProfileNotch.End(SolidEdgePart.ProfileValidationType.igProfileSingle)

                    Dim loRefPlanesNotch As SolidEdgePart.RefPlanes = Nothing
                    Dim loRefPlaneNotch As SolidEdgePart.RefPlane = Nothing

                    loRefPlanesNotch = paPartDocument.RefPlanes

                    loRefPlaneNotch = paPartDocument.RefPlanes.AddNormalToCurveAtDistanceAlongCurve(loLineCurve, _
                                                                                            paPartDocument.RefPlanes.Item(1), _
                                                                                            0.002, _
                                                                                            Me.degreesToRadians(1), _
                                                                                            SolidEdgePart.ReferenceElementConstants.igNormalSide, _
                                                                                            SolidEdgePart.ReferenceElementConstants.igCurveStart,
                                                                                            False,
                                                                                            )

                    loRefPlaneNotch.Name = "REF_PLANE_NOTCH"