📄 form2.frm
字号:
VERSION 5.00
Begin VB.Form FEM计算
Caption = "调用ANSYS进行FEM计算"
ClientHeight = 7275
ClientLeft = 4590
ClientTop = 2940
ClientWidth = 5895
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 7275
ScaleWidth = 5895
Begin VB.Frame Frame4
Caption = "计算结果存放位置"
Height = 855
Left = 240
TabIndex = 10
Top = 6240
Width = 5535
Begin VB.Label lbloutput
Height = 375
Left = 120
TabIndex = 11
Top = 360
Width = 4935
End
End
Begin VB.Frame Frame3
Caption = "BATCH命令位置"
Height = 855
Left = 240
TabIndex = 8
Top = 5160
Width = 5535
Begin VB.Label lblbatch
Height = 375
Left = 120
TabIndex = 9
Top = 360
Width = 4815
End
End
Begin VB.Frame Frame2
Caption = "计算结果存放路径"
Height = 4815
Left = 3120
TabIndex = 4
Top = 240
Width = 2655
Begin VB.CommandButton Command1
Caption = "提 交"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 855
Left = 360
TabIndex = 7
Top = 3600
Width = 1695
End
Begin VB.DirListBox Dir2
Height = 1770
Left = 120
TabIndex = 6
Top = 840
Width = 2175
End
Begin VB.DriveListBox Drive2
Height = 300
Left = 120
TabIndex = 5
Top = 360
Width = 2175
End
End
Begin VB.Frame Frame1
Caption = "BATCH命令位置"
Height = 4815
Left = 240
TabIndex = 0
Top = 240
Width = 2535
Begin VB.FileListBox File1
Height = 1890
Left = 120
TabIndex = 3
Top = 2760
Width = 2175
End
Begin VB.DirListBox Dir1
Height = 1770
Left = 120
TabIndex = 2
Top = 840
Width = 2175
End
Begin VB.DriveListBox Drive1
Height = 300
Left = 120
TabIndex = 1
Top = 360
Width = 2175
End
End
End
Attribute VB_Name = "FEM计算"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If lblbatch.Caption = "" Then
respond = MsgBox("没有选择可执行文件", vbExclamation + vbOKOnly, "错误")
Exit Sub
End If
If File1.List(File1.ListIndex) <> "ansys80.exe" Then
respond = MsgBox("选择了错误的可执行文件", vbExclamation + vbOKOnly, "错误")
respond = MsgBox("必须选择安装目录下的\Ansys Inc\v80\ANSYS\bin\intel\ansys80.exe文件", vbExclamation + vbOKOnly, "错误")
Exit Sub
End If
If lbloutput.Caption = "" Then
respond = MsgBox("没有选择计算结果存放位置", vbExclamation + vbOKOnly, "错误")
Exit Sub
End If
s1 = lblbatch.Caption
s2 = lbloutput.Caption + "\circlekk.MAC"
s3 = lbloutput.Caption + "\circlekk.txt"
s4 = " -g -i "
s5 = " -o "
s = s1 + s4 + s2 + s5 + s3
ss = lbloutput.Caption + "\circlekk.Err"
jglj = lbloutput.Caption
Datalj = lbloutput.Caption + "\circlekk.dat"
Open Datalj For Output As #1
Print #1, A
Print #1, B
Print #1, R
Print #1, H
Print #1, Qwy
Print #1, Qny
Print #1, Ec
Print #1, u
Print #1, rz
Print #1, Ft
Print #1, fy
Close #1
Unload Me
Load 调用
调用.Show
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Dir2_Change()
lbloutput.Caption = Dir2.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub Drive2_Change()
Dir2.Path = Drive2.Drive
End Sub
Private Sub File1_Click()
lblbatch.Caption = Dir1.Path + "\" + File1.List(File1.ListIndex)
End Sub
Private Sub Label2_Click()
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -