到Tools->Journal下面打开纪录开关,开始记录
在草图里做一个倒圆弧(Fillet), 不要打开自动裁剪开关
回到Tools->Journal下面停止纪录。用Alt+F11看看都是些什么
' NX 3.0.1.1
Option Strict Off
Imports System
Imports NXOpen
Module NXJournal
Sub Main
Dim theSession As Session = Session.GetSession()
' ----------------------------------------------
' Menu: Insert->Fillet...
' ----------------------------------------------
Dim session_UndoMarkId1 As Session.UndoMarkId
session_UndoMarkId1 = theSession.SetUndoMark(Session.MarkVisibility.Invisible, "Profile short list")
Dim session_UndoMarkId2 As Session.UndoMarkId
session_UndoMarkId2 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Sketch Fillet")
Dim curve1 As Curve = CType(theSession.ActiveSketch.FindObject("Curve Arc2"), Curve)
Dim curve2 As Curve = CType(theSession.ActiveSketch.FindObject("Curve Line1"), Curve)
Dim curve3 As Curve = CType(theSession.ActiveSketch.FindObject("Curve Arc1"), Curve)
Dim point3d1 As Point3d = New Point3d(-16.3587812762339, 12.1731575031805, 0.0)
Dim point3d2 As Point3d = New Point3d(21.5496698208353, 12.2482013341624, 0.0)
Dim point3d3 As Point3d = New Point3d(-10.1078964615615, -17.8791243960493, 0.0)
Dim arcArray1() As Arc
Dim sketchConstraintArray1() As SketchConstraint
arcArray1 = theSession.ActiveSketch.Fillet(curve1, curve2, curve3, point3d1, point3d2, point3d3, 362.079613989109, Sketch.TrimInputOption.False, Sketch.DeleteThirdCurveOption.False, Sketch.CreateDimensionOption.False, Sketch.AlternateSolutionOption.False, sketchConstraintArray1)
theSession.ActiveSketch.Update()
' ----------------------------------------------
' Menu: Tools->Journal->Stop
' ----------------------------------------------
End Sub
End ModuleSample Text
[ 本帖最后由 vodka 于 2005-10-12 13:59 编辑 ] |