' ******************************************************************************
' swxJRNL.swj - journal recorded on 06/13/01 by jon
' ******************************************************************************

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 = CreateObject ("SldWorks.Application")
Set Part = swApp.OpenDoc4 ("J:\Work In Progress\rin-bin\DeconnAssem_V4\DeConnAssem_V4.SLDASM", 2, 0, "", longstatus)
Set Part = swApp.ActivateDoc ("DeConnAssem_V4.SLDASM")
swApp.ActiveDoc.ActiveView.FrameLeft = 0
swApp.ActiveDoc.ActiveView.FrameTop = 0
swApp.ActiveDoc.ActiveView.FrameState = 1
swApp.ActiveDoc.ActiveView.FrameState = 1
Part.FileFind
Part.SelectByID "Swing.Lock.Support-1@DeConnAssem_V4", "COMPONENT", 0, 0, 0
' MSGBOX
' You cannot replace a component with another of the same name (but different directory) using Component Properties. 
' Please use Reload/Replace instead

Part.SelectByID "Swing.Lock.Support-1@DeConnAssem_V4", "COMPONENT", 0, 0, 0
Part.SelectByID "Swing.Lock.Support-1@DeConnAssem_V4", "COMPONENT", 0, 0, 0
Part.ComponentReload
Part.ClearSelection
Part.FileReload
Part.EditRebuild
Part.FileFind
swApp.LoadFile2 "J:\Work In Progress\rin-bin\rin_V2.SLDASM", ""
Set Part = swApp.ActiveDoc
Set Part = swApp.OpenDoc4 ("J:\Work In Progress\rin-bin\rin_V2.SLDASM", 2, 0, "", longstatus)
swApp.ActiveDoc.ActiveView.FrameLeft = 0
swApp.ActiveDoc.ActiveView.FrameTop = 0
swApp.ActiveDoc.ActiveView.FrameState = 1
Set Part = swApp.ActivateDoc ("rin_V2.SLDASM")
Part.ViewZoomtofit
Part.SelectByID "DeConnAssem_V2-1@rin_V2", "COMPONENT", 0, 0, 0
Part.ComponentReload
Part.ClearSelection
Part.FileReload
' MSGBOX
' A document named "DeConnAssem_V4" is already opened. Please choose a different name.

swApp.ActiveDoc.ActiveView.FrameLeft = 0
swApp.ActiveDoc.ActiveView.FrameTop = 0
swApp.ActiveDoc.ActiveView.FrameState = 1
Set Part = swApp.ActivateDoc ("DeConnAssem_V4.SLDASM")
Part.Save2 FALSE
Set Part = Nothing
swApp.CloseDoc "DeConnAssem_V4.SLDASM"
swApp.ActiveDoc.ActiveView.FrameLeft = 0
swApp.ActiveDoc.ActiveView.FrameTop = 0
swApp.ActiveDoc.ActiveView.FrameState = 1
Set Part = swApp.ActivateDoc ("rin_V2.SLDASM")
Part.SelectByID "DeConnAssem_V2-1@rin_V2", "COMPONENT", 0, 0, 0
Part.CompConfigProperties3 2, 0, 1, 1
Part.ClearSelection
Part.SelectByID "DeConnAssem_V2-2@rin_V2", "COMPONENT", 0, 0, 0
Part.CompConfigProperties3 2, 0, 1, 1
Part.ClearSelection
Part.FileFind
' MSGBOX
' Unable to locate the file J:\Work In Progress\rin-bin\hardhat17.SLDPRT.  Would you like to find it yourself?

' MSGBOX
' Unable to locate the file J:\Work In Progress\rin-bin\S4.SLDPRT.  Would you like to find it yourself?

' MSGBOX
' Unable to locate the file J:\Work In Progress\rin-bin\hardhat17.SLDPRT.  Would you like to find it yourself?

' MSGBOX
' Unable to locate the file J:\Work In Progress\rin-bin\Re-Bar_ST.SLDPRT.  Would you like to find it yourself?

' MSGBOX
' Some of the models referenced in this document have been modified.  They must be saved when the document is saved.
' 		Save the document and the referenced models now?

Part.Save2 FALSE
Set Part = Nothing
swApp.CloseDoc "rin_V2.SLDASM"
swApp.ExitApp
End Sub
