Home > front end >  Microsoft VBScript runtime error error '800 a01a8' lack of object: 'Part', line
Microsoft VBScript runtime error error '800 a01a8' lack of object: 'Part', line

Time:10-29

Dim swApp
Dim Part

On the Error Resume Next
The Set swapp=GetObject (, "SldWorks. Application")
If Err Then
Err. Clear
The Set swApp=CreateObject (" SldWorks. Application ")
The Set Part=swApp. ActiveDoc
SwApp. Visible=true
SwApp. UserControl=True
End the If
The Set objFSO=CreateObject (" Scripting. FileSystemObject ")
The Set objFile=objFSO. GetFile (" beam. SLDPRT ")
The Set Part=swApp. Competing OpenDoc (objFSO GetAbsolutePathName (objFile), 1)
The Set Part=swApp. ActivateDoc (" beam. SLDPRT ")
'swApp. Visible=true
On Error GoTo 0

Call ChangePara (Part, 0.05, 0.02, 0.02, 0.02, 0.05, 0.02, 0.2)
Sub ChangePara (Part, Val1, Val2, Val3, Val4, Val5, Val6, Val7)
Part. The Parameter (" HeightUp @ sketch 1 "). The System Value=https://bbs.csdn.net/topics/Val1
Part. The Parameter (" 1 "Height Down @ sketch). The System Value=https://bbs.csdn.net/topics/Val2
Part. The Parameter (" FlangeRight @ sketch 1 "). The System Value=https://bbs.csdn.net/topics/Val3
Part. The Parameter (" FlangeLeft @ sketch 1 "). The System Value=https://bbs.csdn.net/topics/Val4
Part. The Parameter (" 1 "Height @ sketch). The System Value=https://bbs.csdn.net/topics/Val5
Part. The Parameter (" 1 "Width @ sketch). The System Value=https://bbs.csdn.net/topics/Vale6
Part. The Parameter (" Length @ stretching 1 "). The System Value=https://bbs.csdn.net/topics/Val7

Part. EditRebuild
End Sub

Part. The SaveAs (objFSO GetParentFolderName (objFile) & amp;" \ "& amp;" Beam. Igs ")
SwApp. CloseDoc "beam. SLDPRT
"
  •  Tags:  
  • ASP
  • Related