四级士官
UID2161266
U币1
G币706
技术0
主题8
精华0
阅读权限55
注册时间2014-3-12
最后登录2021-1-22
在线时间50 小时
四级士官
|
提示:System.NullReferenceException: 未将对象引用设置到对象的实例
getpt.CreateSurfaceCurveIntersection(fa, cv.Tag, helppt1, helppt2, outpt) 这一行出错
Public Function createpoint() As Integer
Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim displayPart As Part = theSession.Parts.Display
Dim getpt As UFPoint
Dim fa As NXOpen.Tag
Dim cv As NXOpen.Tag
fa=intface.Tag 'intface是选的面
cv=intcurve(0).Tag 'intcurve(0)是选的线
Dim helppt1 As NXOpen.Tag
Dim helppt2 As NXOpen.Tag
Dim outpt As NXOpen.Tag = Tag.Null
Dim c1 As Double() = {-640, -409.326198682, 23.052587025}
Dim c2 As Double() = {-640.0, -824.876391165, -13.940597438}
theufsession.Curve.CreatePoint(c1, helppt1)
theufsession.Curve.CreatePoint(c2, helppt2)
getpt.CreateSurfaceCurveIntersection(fa, cv.Tag, helppt1, helppt2, outpt)
End Function
|
|