|
|
马上注册,结识高手,享用更多资源,轻松玩转三维网社区。
您需要 登录 才可以下载或查看,没有帐号?注册
x
5 Y& k& m8 m& I T" C
SolidWorks 基于vb开发时 我要进行插入一个基准面,但是到了红色的那行就出现这种错误,请都来看看,这是为什么?如何实现自动插入基准面?
( F* r' s7 n! ~7 V9 lSub main()
9 ?- [4 n- x9 o2 v7 |4 {
" {2 M6 n8 J' T" J1 W+ mSet swApp = Application.SldWorks0 B9 E5 ~, [8 p q% f
& j+ [* `5 j1 vSet Part = swApp.ActiveDoc
: H3 h4 Z% `! F# V8 Aboolstatus = Part.SetUserPreferenceToggle(swUserPreferenceToggle_e.swDisplayTemporaryAxes, True) N1 c; t6 L6 ~ o) o9 t
boolstatus = Part.Extension.SelectByID2("前视基准面", "PLANE", 0, 0, 0, True, 0, Nothing, 0). W. B" ^. a: B! h
boolstatus = Part.Extension.SelectByID2("", "AXIS", -6.519065563976E-04, 0.00908716626584, -0.001047656130313, True, 1, Nothing, 0)$ |5 C( p* z5 K' U0 B2 c; U: H. |
Dim myRefPlane As Object! l* |: ?1 g7 e `+ {/ V; e# y( a8 q
Set myRefPlane = Part.FeatureManager.InsertRefPlane(16, 1.396263401595, 4, 0, 0, 0)$ M! E/ C9 O) R
Part.ClearSelection2 True i; H0 a1 w' Z" g! P+ q% \8 S
End Sub+ f1 ~1 N2 |- y: U" K
' m# a! e6 U5 j. V; _! X
|
|