|
马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我想在装配中加入新零件
Imports System.Runtime.InteropServices
Imports NXOpen
Imports NXOpen.Features
Imports NXOpen.Preferences
Imports NXOpen.UF
Module EX_Modl
Dim theSession As Session
Dim theUfSession As UFSession
Public Sub Main()
theSession = Session.GetSession()
theUfSession = UFSession.GetUFSession()
Dim part1dir As String = "d:\ceshi.prt"
Dim aspart As NXOpen.Tag= theUfSession.Part.AskPartTag(part1dir)
Dim insname1 As String = "a"
Dim refname1 As String = ""
Dim origin(3) As Double
Dim cys_matrix() As Double = {1, 0, 0, 0, 0, 1}
Dim ptag1 As NXOpen.Tag
Dim errorstatus1 As NXOpen.UF.UFPart.LoadStatus
theUfSession.Assem.AddPartToAssembly(aspart, part1dir, refname1, insname1, origin, cys_matrix, 0, ptag1, errorstatus1)
theUfSession.Part.Save()
end sub
End Module
为什么总提示tag有错误!!??
我是新手,谢谢各位指教
|
|