' ******************************************************************************
' swxJRNL.swj - journal recorded on 03/19/04 by jfeldman
' *****************************************************************************
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
Sub main()

Set swApp = Application.SldWorks

Set Part = swApp.OpenDoc6 ("C:\Documents and Settings\jfeldman\My Documents\SolidWorks files - in progress\ESP2G Jason\rotary valve\helical HCR 075-8-8.SLDPRT", 1, 0, "", longstatus, longwarnings)
Set Part = swApp.ActivateDoc ("helical HCR 075-8-8.SLDPRT")
swApp.ActiveDoc.ActiveView.FrameLeft = 0
swApp.ActiveDoc.ActiveView.FrameTop = 0
swApp.ActiveDoc.ActiveView.FrameState = 1
swApp.ActiveDoc.ActiveView.FrameState = 1
Set Part = Nothing
swApp.CloseDoc "helical HCR 075-8-8.SLDPRT"
Set Part = swApp.OpenDoc6 ("C:\Documents and Settings\jfeldman\My Documents\SolidWorks files - in progress\ESP2G Jason\rotary valve\rotary valve.SLDASM", 2, 0, "", longstatus, longwarnings)
Set Part = swApp.ActivateDoc ("rotary valve.SLDASM")
swApp.ActiveDoc.ActiveView.FrameLeft = 0
swApp.ActiveDoc.ActiveView.FrameTop = 0
swApp.ActiveDoc.ActiveView.FrameState = 1
swApp.ActiveDoc.ActiveView.FrameState = 1
boolstatus = Part.Extension.SelectByID("Fairloc shaft extender-1@rotary valve", "COMPONENT", 0, 0, 0, False, 0, Nothing)
boolstatus = Part.Extension.SelectByID("Extrude1@Fairloc shaft extender-1@rotary valve", "BODYFEATURE", 0, 0, 0, False, 0, Nothing)
Part.ActivateSelectedFeature
boolstatus = Part.Extension.SelectByID("Extrude2@Fairloc shaft extender-1@rotary valve", "BODYFEATURE", 0, 0, 0, False, 0, Nothing)
Part.ActivateSelectedFeature
Part.ClearSelection2 True
boolstatus = Part.Extension.SelectByID("Sketch2", "SKETCH", 0, 0, 0, False, 0, Nothing)
Part.ActivateSelectedFeature
boolstatus = Part.Extension.SelectByID("Sketch2", "SKETCH", 0, 0, 0, False, 0, Nothing)
Part.EditSketch
Part.ClearSelection2 True
boolstatus = Part.Extension.SelectByID("Line4", "SKETCHSEGMENT", -0.0468523580968, -0.07937880222932, -0.03377232700084, True, 0, Nothing)
boolstatus = Part.Extension.SelectByID("Arc5", "SKETCHSEGMENT", -0.02492241598976, -0.07346319671459, -0.0409792236151, True, 0, Nothing)
boolstatus = Part.Extension.SelectByID("Line3", "SKETCHSEGMENT", -0.02891459137676, -0.08600481956273, -0.02123101284802, True, 0, Nothing)
boolstatus = Part.Extension.SelectByID("Arc16", "SKETCHSEGMENT", -0.05137322531184, -0.08501716685203, -0.02518072497147, True, 0, Nothing)
Part.SetPickMode
Part.InsertSketch2 True
boolstatus = Part.Extension.SelectByID("Sketch2", "SKETCH", 0, 0, 0, False, 0, Nothing)
Part.EditSketch
Part.ClearSelection2 True
boolstatus = Part.Extension.SelectByID("D4@Sketch2@rotary valve.SLDASM", "DIMENSION", -0.01635109394201, -0.09492182192755, -0.03533860313564, False, 0, Nothing)
boolstatus = Part.Extension.SelectByID("D4@Sketch2@rotary valve.SLDASM", "DIMENSION", -0.01050116818764, -0.07040398995624, -0.07610020122452, False, 0, Nothing)
' MSGBOX
' The dimension selected is a driven dimension.  Its value cannot be changed.

Part.SetUserPreferenceIntegerValue swUnitsLinear , swMETER
Part.SetUserPreferenceIntegerValue swUnitsLinearDecimalPlaces , 4
Part.SetUserPreferenceIntegerValue swDocumentColorFeatBend , 461157568
Part.SetUserPreferenceIntegerValue swDocumentColorFeatBoss , 461157568
Part.SetUserPreferenceIntegerValue swDocumentColorFeatCavity , 0
Part.SetUserPreferenceIntegerValue swDocumentColorFeatCut , 0
Part.SetUserPreferenceIntegerValue swDocumentColorFeatLoftCut , 1
Part.SetUserPreferenceIntegerValue swDocumentColorFeatSurfCut , 523305344
Part.SetUserPreferenceIntegerValue swDocumentColorFeatSweepCut , 523305472
Part.SetUserPreferenceIntegerValue swDocumentColorFeatWeldBead , 461159808
Part.SetUserPreferenceIntegerValue swDocumentColorFeatExtrude , 1072693248
Part.SetUserPreferenceIntegerValue swDocumentColorFeatLibrary , 496
Part.SetUserPreferenceIntegerValue swDocumentColorFeatLoft , 129
Part.SetUserPreferenceIntegerValue swDocumentColorFeatMidSurface , 243057608
Part.SetUserPreferenceIntegerValue swDocumentColorFeatPattern , 1241480
Part.SetUserPreferenceIntegerValue swDocumentColorFeatRefSurface , 523305728
Part.SetUserPreferenceIntegerValue swDocumentColorFeatRevolution , 523138976
Part.SetUserPreferenceIntegerValue swDocumentColorFeatShell , 0
Part.SetUserPreferenceIntegerValue swDocumentColorFeatThicken , 523318592
Part.SetUserPreferenceIntegerValue swDocumentColorFeatRib , 0
Part.SetUserPreferenceIntegerValue swDocumentColorFeatDome , 13
Part.SetUserPreferenceIntegerValue swDocumentColorFeatForm , 0
Part.SetUserPreferenceIntegerValue swDocumentColorFeatShape , 0
Part.SetUserPreferenceIntegerValue swDocumentColorFeatReplaceFace , 0
Part.SetUserPreferenceIntegerValue swDocumentColorFeatStructuralMember , 523391584
Part.SetUserPreferenceIntegerValue swDocumentColorFeatGusset , 0
Part.SetUserPreferenceIntegerValue swDocumentColorFeatEndCap , 0
Part.SetUserPreferenceIntegerValue swDocumentColorFeatWrap , 0
Part.ClearSelection2 True
Part.InsertSketch2 True
swApp.ActiveDoc.ActiveView.FrameState = 1
' MSGBOX
' Save changes to rotary valve.SLDASM?

Part.Save2 FALSE
swApp.ExitApp
End Sub
