原帖由 airen 于 2006-10-20 16:09 发表
口水啦。。
看来在你心里 还存在 高难度 才是 高技术的思维哦。。
我不知你为什么会这样的想法。。。
模板在好也只是模板,高难度高技术谈不上。
以下是从日记录的代码,希望有些朋友会用得上
调用模板:不难滴
' NX 4.0.0.21
' Journal created by yp on Wed Oct 11 18:04:43 2006 '
Option Strict Off
Imports System
Imports NXOpen
Module NXJournal
Sub Main
Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim displayPart As Part = theSession.Parts.Display
' ----------------------------------------------
' Dialog Begin 创建操作
' ----------------------------------------------
Dim nCGroup1 As CAM.NCGroup = CType(workPart.CAMSetup.CAMGroupCollection.FindObject("N1"), CAM.NCGroup)
Dim nCGroup2 As CAM.NCGroup = CType(workPart.CAMSetup.CAMGroupCollection.FindObject("METHOD"), CAM.NCGroup)
Dim nCGroup3 As CAM.NCGroup = CType(workPart.CAMSetup.CAMGroupCollection.FindObject("D10"), CAM.NCGroup)
Dim nCGroup4 As CAM.NCGroup = CType(workPart.CAMSetup.CAMGroupCollection.FindObject("WP-1"), CAM.NCGroup)
Dim operation1 As CAM.Operation
operation1 = workPart.CAMSetup.CAMOperationCollection.Create(nCGroup1, nCGroup2, nCGroup3, nCGroup4, "makino", "ZLEVEL_PROFILE_MB", CAM.OperationCollection.UseDefaultName.False, "AAA")
' ----------------------------------------------
' Dialog Begin ZLEVEL_PROFILE_MB
' ----------------------------------------------
' ----------------------------------------------
' Menu: 工具->日记->停止
' ----------------------------------------------
End Sub
End Module |