|
|
马上注册,结识高手,享用更多资源,轻松玩转三维网社区。
您需要 登录 才可以下载或查看,没有帐号?注册
x
- }. N3 ~) m/ ~* a
SolidWorks 基于vb开发时 我要进行插入一个基准面,但是到了红色的那行就出现这种错误,请都来看看,这是为什么?如何实现自动插入基准面?3 O) c/ M- }7 W7 k O0 z. W* X F
Sub main()4 j0 k2 r7 U ]
$ ]5 w5 m: w4 A9 p
Set swApp = Application.SldWorks
3 }1 H! ]* f% E# g# ~$ x. i: |5 G* B9 s4 d9 j( ^) ~
Set Part = swApp.ActiveDoc
5 i3 f ^( I% f. aboolstatus = Part.SetUserPreferenceToggle(swUserPreferenceToggle_e.swDisplayTemporaryAxes, True)6 l7 U6 ]3 E& F6 Q: A# t+ i
boolstatus = Part.Extension.SelectByID2("前视基准面", "PLANE", 0, 0, 0, True, 0, Nothing, 0)7 i5 t& H3 S& J/ o% _: J2 u
boolstatus = Part.Extension.SelectByID2("", "AXIS", -6.519065563976E-04, 0.00908716626584, -0.001047656130313, True, 1, Nothing, 0)% c* w8 `. x! \8 h
Dim myRefPlane As Object0 ` z0 i1 y) _# Q
Set myRefPlane = Part.FeatureManager.InsertRefPlane(16, 1.396263401595, 4, 0, 0, 0)
7 [! O8 d" o9 V: y; }! K; bPart.ClearSelection2 True
+ L# ]4 y4 S8 Z% o9 U! V6 X) Z/ q1 sEnd Sub3 \; K; B3 @2 x: j7 U3 r; B& x
! ]! `0 T* l# h+ Y- s |
|