' ******************************************************************************
' swxJRNL.swj - journal recorded on 04/25/03 by hamilton
' *****************************************************************************
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long
Dim Annotation As Object
Dim Gtol As Object
Dim DatumTag As Object
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
Sub main()

Set swApp = Application.SldWorks

Set Part = swApp.OpenDoc4 ("K:\Drawings\BatteryMidbody\BatteryPack3x1kW.sldasm", 2, 0, "", longstatus)
Set Part = swApp.ActivateDoc ("BatteryPack3x1kW")
swApp.ActiveDoc.ActiveView.FrameLeft = 0
swApp.ActiveDoc.ActiveView.FrameTop = 0
swApp.ActiveDoc.ActiveView.FrameState = 1
swApp.ActiveDoc.ActiveView.FrameState = 1
Part.ShowNamedView2 "*Isometric", 7
boolstatus = Part.Extension.SelectByID("1kw_bat-4@BatteryPack3x1kW", "COMPONENT", 0, 0, 0, False, 0, Nothing)
Part.OpenCompFile
swApp.LoadFile2 "K:\Drawings\BatteryMidbody\1kw_bat.SLDPRT", ""
Set Part = swApp.ActiveDoc
Set Part = swApp.OpenDoc4 ("K:\Drawings\BatteryMidbody\1kw_bat.SLDPRT", 1, 0, "", longstatus)
swApp.ActiveDoc.ActiveView.FrameLeft = 0
swApp.ActiveDoc.ActiveView.FrameTop = 0
swApp.ActiveDoc.ActiveView.FrameState = 1
swApp.ActiveDoc.ActiveView.FrameState = 1
Set Part = swApp.ActivateDoc ("1kw_bat")
Part.ClearSelection
Part.ShowNamedView2 "*Isometric", 7
Part.ActiveView().RotateAboutCenter 0.00678739, 0
Part.ActiveView().RotateAboutCenter 0.244346, 0.071797
Part.ActiveView().RotateAboutCenter 0.0678739, 0.071797
Part.ActiveView().RotateAboutCenter 0.0203622, 0.0398872
Part.ActiveView().RotateAboutCenter 0.00678739, 0.0159549
Part.ActiveView().RotateAboutCenter 0, 0.0159549
Part.ActiveView().RotateAboutCenter 0.0203622, 0.207413
Part.ActiveView().RotateAboutCenter 0.0135748, 0.733925
Part.ActiveView().RotateAboutCenter -0.0542991, 0.351007
Part.ActiveView().RotateAboutCenter -0.033937, 0.0319098
Part.ActiveView().RotateAboutCenter -0.033937, 0
Part.ActiveView().RotateAboutCenter -0.0746613, 0
Part.ActiveView().RotateAboutCenter -0.00678739, 0
Part.ActiveView().RotateAboutCenter -0.0271496, -0.00797744
Part.ActiveView().RotateAboutCenter -0.0610865, -0.0638195
Part.ActiveView().RotateAboutCenter 0.0135748, -0.295165
Part.ActiveView().RotateAboutCenter 0.0542991, -0.414827
Part.ActiveView().RotateAboutCenter 0.0950235, -0.590331
Part.ActiveView().RotateAboutCenter 0.142535, -0.31112
Part.ActiveView().RotateAboutCenter 0.00678739, -0.0159549
Part.ActiveView().RotateAboutCenter 0.00678739, -0.00797744
Part.ActiveView().RotateAboutCenter 0.0271496, -0.0159549
Part.ActiveView().RotateAboutCenter 0.149323, 0.0239323
Part.ActiveView().RotateAboutCenter 0.0950235, 0.0239323
Part.ActiveView().RotateAboutCenter 0.0542991, 0.0797744
Part.ActiveView().RotateAboutCenter 0.0678739, 0.199436
Part.ActiveView().RotateAboutCenter 0.0678739, 0.127639
Part.ActiveView().RotateAboutCenter 0.00678739, 0.0239323
Part.ActiveView().RotateAboutCenter -0.0135748, 0.00797744
Part.ActiveView().RotateAboutCenter -0.0814487, 0.0239323
Part.ActiveView().RotateAboutCenter -0.0475117, -0.0159549
Part.ActiveView().RotateAboutCenter -0.0475117, -0.0319098
Part.ToolsMassProps
boolstatus = Part.Extension.SelectByID("1kw_bat.SLDPRT", "COMPONENT", 0, 0, 0, True, 0, Nothing)
swApp.LoadFile2 "C:\Program Files\SolidWorks\data\templates\Assembly.asmdot", ""
Set Part = swApp.ActiveDoc
swApp.ActiveDoc.ActiveView.FrameLeft = 0
swApp.ActiveDoc.ActiveView.FrameTop = 0
swApp.ActiveDoc.ActiveView.FrameState = 1
swApp.ActiveDoc.ActiveView.FrameState = 1
Set Part = swApp.NewDocument ("C:\Program Files\SolidWorks\data\templates\Assembly.asmdot", 0, 0.000000, 0.000000)
Set Part = swApp.ActivateDoc ("Assem1")
Part.AddComponent "K:\Drawings\BatteryMidbody\1kw_bat.SLDPRT", -0.0004178464606182, 0.0001392821535394, 0
Part.ShowNamedView2 "*Isometric", 7
swApp.ActiveDoc.ActiveView.FrameState = 1
swApp.ActiveDoc.ActiveView.FrameLeft = 0
swApp.ActiveDoc.ActiveView.FrameTop = 0
swApp.ActiveDoc.ActiveView.FrameState = 1
Set Part = swApp.ActivateDoc ("1kw_bat")
Part.ClearSelection
swApp.ExitApp
End Sub
