- K/ `, Q* @1 G {! e& g! v
Dim Part As Object
% s2 F" X# g$ r# {$ L5 Q' K8 XDim boolstatus As Boolean5 F2 x, v$ M4 T! g# ?% A/ ~# H! O3 G# J' Q8 }7 r) A4 B/ h* B
Dim longstatus As Long, longwarnings As Long
4 n6 s9 w0 B, T" f2 I
( M+ R {0 J0 d" CSub main()
9 P- ~& G$ V3 ~- Q( \6 S: h" v; p- ^; q& [6 v
Set swApp = _
2 |* p5 s' @$ B8 |( E) j, A- dApplication.SldWorks# e; K% {% L- k. D) q
6 p D t* U* e
) w3 k( M* ^2 T, \5 fSet Part = swApp.ActiveDoc) G2 [/ t- U: _$ w7 _$ V% Z0 J( P
Part.SketchManager.InsertSketch True
; R8 q1 T9 S p( SPart.ClearSelection2 True
& q7 R5 O7 p% g: R7 Q! ^# m; A4 jDim skSegment As Object
; q% ~5 B$ `1 D1 \Set skSegment = Part.SketchManager.CreateCenterLine(-0.05, 0#, 0#, 0.05, 0#, 0#)( t" V. I$ S, V$ ]
" j' {, \- W: X* r' zPart.SetPickMode
, } O" G& |( C# L# q7 |. T& B9 DPart.ClearSelection2 True& a: ~8 B2 g+ f- {. M
Set skSegment = Part.SketchManager.CreateCenterLine(0#, -0.05, 0#, -0#, 0.05, 0#)! {- s# l4 h) q
/ ~6 ~) e/ P% d& yPart.SetPickMode/ R- h+ j2 B/ ]( y5 M9 k
! h: m' {( A2 k ]Part.ClearSelection2 True
: H2 E5 O5 s! A8 MEnd Sub
/ C7 a: L( z7 U4 F1 W F M5 o, T2 A% | |