16.12.2025. Сделал грамотную спецификацию
This commit is contained in:
parent
a3468e8c36
commit
0871b652fb
|
|
@ -0,0 +1,163 @@
|
|||
' ******************************************************************************
|
||||
' swxJRNL.swj - journal recorded on 12/16/25 by Ìàêñèìêà
|
||||
' *****************************************************************************
|
||||
Dim swApp As Object
|
||||
|
||||
Dim Part As Object
|
||||
Dim boolstatus As Boolean
|
||||
Dim longstatus As Long, longwarnings As Long
|
||||
|
||||
Sub main()
|
||||
|
||||
Set swApp = Application.SldWorks
|
||||
|
||||
swApp.ActivateDoc2 "Òèñêè - ×ÌÂ2.00.00", False, longstatus
|
||||
Set Part = swApp.ActiveDoc
|
||||
Set Part = swApp.ActiveDoc
|
||||
Dim myModelView As Object
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.FrameLeft = 0
|
||||
myModelView.FrameTop = 0
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.FrameState = swWindowState_e.swWindowMaximized
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.FrameState = swWindowState_e.swWindowMaximized
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0.00257708772364788341, 0
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0.005154175447295766821, -0.02880936494558332048
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0.01288543861823941532, -0.0691424758693999636
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0.01546252634188729699, -0.09795184081498328754
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0.01030835089459153364, -0.1037137138040999662
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0.01288543861823941532, -0.1267612057605666254
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0.01288543861823941532, -0.1382849517387999272
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0.01030835089459153364, -0.1325230787496832763
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0.005154175447295766821, -0.0518568569020499831
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0.00257708772364788341, -0.0518568569020499831
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0.005154175447295766821, -0.0518568569020499831
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0.00257708772364788341, -0.0345712379346999818
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0.00257708772364788341, -0.0345712379346999818
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0, -0.02880936494558332048
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0.005154175447295766821, -0.02880936494558332048
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0, -0.0172856189673499909
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0.00257708772364788341, -0.0172856189673499909
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0, -0.0172856189673499909
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0, -0.0172856189673499909
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0, -0.005761872989116664789
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0, -0.01152374597823332958
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0.00257708772364788341, -0.005761872989116664789
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.RotateAboutCenter 0, -0.005761872989116664789
|
||||
|
||||
' Roll View
|
||||
Dim swModelView As Object
|
||||
Set swModelView = Part.ActiveView
|
||||
swModelView.RollBy 0
|
||||
|
||||
' Open
|
||||
Set Part = swApp.OpenDoc6("C:\Users\user\Documents\Chinenov_M.V\×ÌÂ2\Îñíîâàíèå - ×ÌÂ2.01.00.SLDDRW", 3, 0, "", longstatus, longwarnings)
|
||||
Dim swDrawing As Object
|
||||
Set swDrawing = Part
|
||||
Set Part = swApp.ActiveDoc
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.FrameLeft = 0
|
||||
myModelView.FrameTop = 33
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.FrameState = swWindowState_e.swWindowMaximized
|
||||
swApp.ActivateDoc2 "Îñíîâàíèå - ×ÌÂ2.01.00 - Ëèñò1", False, longstatus
|
||||
Set Part = swApp.ActiveDoc
|
||||
|
||||
' Pan
|
||||
Set swModelView = Part.ActiveView
|
||||
swModelView.TranslateBy -0.001556331877729257539, -0.05758427947598253327
|
||||
Set Part = swApp.ActiveDoc
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.FrameLeft = 0
|
||||
myModelView.FrameTop = 0
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.FrameState = swWindowState_e.swWindowMaximized
|
||||
swApp.ActivateDoc2 "Òèñêè - ×ÌÂ2.00.00", False, longstatus
|
||||
Set Part = swApp.ActiveDoc
|
||||
boolstatus = Part.Extension.SelectByID2("Ïîäâèæíàÿ ÷àñòü - ×ÌÂ2.02.00-2@Òèñêè - ×ÌÂ2.00.00/Ãóáêè äëÿ òèñêîâ - ×ÌÂ2.01.05-2@Ïîäâèæíàÿ ÷àñòü - ×ÌÂ2.02.00", "COMPONENT", 0, 0, 0, False, 0, Nothing, 0)
|
||||
Part.ClearSelection2 True
|
||||
|
||||
' Open
|
||||
Set Part = swApp.OpenDoc6("C:\Users\user\Documents\Chinenov_M.V\×ÌÂ2\Ïîäâèæíàÿ ÷àñòü - ×ÌÂ2.02.00.SLDDRW", 3, 0, "", longstatus, longwarnings)
|
||||
Set swDrawing = Part
|
||||
Set Part = swApp.ActiveDoc
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.FrameLeft = 0
|
||||
myModelView.FrameTop = 33
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.FrameState = swWindowState_e.swWindowMaximized
|
||||
swApp.ActivateDoc2 "Ïîäâèæíàÿ ÷àñòü - ×ÌÂ2.02.00 - Ëèñò1", False, longstatus
|
||||
Set Part = swApp.ActiveDoc
|
||||
|
||||
' Zoom To Fit
|
||||
Part.ViewZoomtofit2
|
||||
|
||||
' Zoom To Fit
|
||||
Part.ViewZoomtofit2
|
||||
|
||||
' Zoom To Fit
|
||||
Part.ViewZoomtofit2
|
||||
|
||||
' Save
|
||||
Dim swErrors As Long
|
||||
Dim swWarnings As Long
|
||||
boolstatus = Part.Save3(1, swErrors, swWarnings)
|
||||
|
||||
' Open
|
||||
Set Part = swApp.OpenDoc6("C:\Users\user\Documents\Chinenov_M.V\×ÌÂ2\Îñíîâàíèå - ×ÌÂ2.01.00.SLDDRW", 3, 0, "", longstatus, longwarnings)
|
||||
Set swDrawing = Part
|
||||
Set Part = swApp.ActiveDoc
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.FrameLeft = 0
|
||||
myModelView.FrameTop = 33
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.FrameState = swWindowState_e.swWindowMaximized
|
||||
swApp.ActivateDoc2 "Îñíîâàíèå - ×ÌÂ2.01.00 - Ëèñò1", False, longstatus
|
||||
Set Part = swApp.ActiveDoc
|
||||
' MSGBOX
|
||||
' Ñîõðàíèòü èçìåíåíèÿ â ôàéëå Îñíîâàíèå - ×ÌÂ2.01.00?
|
||||
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.FrameState = swWindowState_e.swWindowMaximized
|
||||
Set Part = swApp.ActiveDoc
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.FrameLeft = 0
|
||||
myModelView.FrameTop = 33
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.FrameState = swWindowState_e.swWindowMaximized
|
||||
swApp.ActivateDoc2 "Ïîäâèæíàÿ ÷àñòü - ×ÌÂ2.02.00 - Ëèñò1", False, longstatus
|
||||
Set Part = swApp.ActiveDoc
|
||||
Set Part = swApp.ActiveDoc
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.FrameLeft = 0
|
||||
myModelView.FrameTop = 0
|
||||
Set myModelView = Part.ActiveView
|
||||
myModelView.FrameState = swWindowState_e.swWindowMaximized
|
||||
swApp.ActivateDoc2 "Òèñêè - ×ÌÂ2.00.00", False, longstatus
|
||||
Set Part = swApp.ActiveDoc
|
||||
swApp.ExitApp
|
||||
End Sub
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue