|
|
马上注册,结识高手,享用更多资源,轻松玩转三维网社区。
您需要 登录 才可以下载或查看,没有帐号?注册
x
8 |. _5 I# ]" A) u7 o6 D
SolidWorks 基于vb开发时 我要进行插入一个基准面,但是到了红色的那行就出现这种错误,请都来看看,这是为什么?如何实现自动插入基准面?6 i7 X6 K0 N& Z5 z
Sub main()( _$ n$ H! |$ |+ u, x3 X& w2 @
; z* Q0 d/ M4 y2 ~Set swApp = Application.SldWorks( [: Q) K7 n. a: c
^1 ]* |! b0 ^+ a7 c% `/ \Set Part = swApp.ActiveDoc
2 |# E; V- d! D1 ~, ~boolstatus = Part.SetUserPreferenceToggle(swUserPreferenceToggle_e.swDisplayTemporaryAxes, True)
& J9 f7 P8 V1 i1 _' X: p/ Yboolstatus = Part.Extension.SelectByID2("前视基准面", "PLANE", 0, 0, 0, True, 0, Nothing, 0)5 Z" L* p- y& n3 q7 N( I% I
boolstatus = Part.Extension.SelectByID2("", "AXIS", -6.519065563976E-04, 0.00908716626584, -0.001047656130313, True, 1, Nothing, 0)
9 F. A8 u. Q+ `Dim myRefPlane As Object! u& ^' d# f7 p8 M5 I2 @
Set myRefPlane = Part.FeatureManager.InsertRefPlane(16, 1.396263401595, 4, 0, 0, 0)
) N- {" Y& y4 t, yPart.ClearSelection2 True! r5 n4 |! f3 A( o1 N! Y5 h1 P" r
End Sub
2 [1 C7 y1 Y4 N% m9 l; _. Q
& D# G& L' y2 _6 f2 ?5 q. g' } |
|