Professional Documents
Culture Documents
If IsNothing(sheet) Then
Console.Write("sheet is null")
End If
'Console.WriteLine(sheet.Name.ToString())
wb.SaveAs("c:\GSA_training\primes.xlsx")
excel.Quit()
excel = Nothing
gsaObj.Open("c:\GSA_training\Env.gwb")
gsaObj.Delete("RESULTS_AND_CASES")
gsaObj = Nothing
'-------------------------------
' GwaCommand
' element 1
elRef = 1 ' could be HIGHEST + 1 too
gwaRecord = "EL," & elRef & ",,NO_RGB,BEAM,1,1," & n1 & "," & n2
ret = gsa.GwaCommand(gwaRecord)
If 0 = ret Then
Console.WriteLine("Created element {0}", elRef)
Else
Console.WriteLine("Failed to create element {0}", elRef)
End If
' element 2
elRef += 1
gwaRecord = String.Format("EL,{0},,NO_RGB,BEAM,1,1, {1},{2}", elRef, n2,
n3)
ret = gsa.GwaCommand(gwaRecord)
If 0 = ret Then
Console.WriteLine("Created element {0}", elRef)
Else
Console.WriteLine("Failed to create element {0}", elRef)
End If
' element 3
elRef += 1
gwaRecord = String.Format("EL,{0},,NO_RGB,BEAM,1,1, {1},{2}", elRef, n3,
n4)
ret = gsa.GwaCommand(gwaRecord)
If 0 = ret Then
Console.WriteLine("Created element {0}", elRef)
Else
Console.WriteLine("Failed to create element {0}", elRef)
End If
'------------------------
' output
ret = gsa.Output_Init(OP_INIT_INFINITY, "default", acaseString, dataref, 3)
If Not Integer.Equals(0, ret) Then
Console.WriteLine("Output_Init failed.")
Exit Sub
End If
Dim ents() As Integer ' array to store node numbers in the list
Console.WriteLine("Output title: " & title & "IsPerRecord = " & isPerNode)