Dim iApp As RFEM5.Application
Dim iMod As RFEM5.model
Ustaw iApp = GetObject(, "RFEM5.Application")
Dim rs_no As Integer
rs_no = 1
On Error GoTo e
' Sprawdza licencję RS-COM i blokuje korzystanie z aplikacji przez COM.
iApp.LockLicense
Set iMod = iApp.GetActiveModel
' Pobierz interfejs modułu
Dim iDyn As IDynamModule
Ustaw iDyn = iMod.GetModule("DynamPro")
' Pobierz interfejs obudowy modułu
Dim iDynCase As IModuleCase
Ustaw iDynCase = iDyn.GetData
' ustawić parametry spektrum odpowiedzi
Dim rspara As RPSarams
rspara = iDynCase.GetRSParams (rs_no)
Dim rs_spec (0 do 10) As RSTableRow
Indeks dim As Integer
indeks = 0
rs_spec (indeks).s = 0,6
rs_spec(indeks).T = 0
indeks = 1
rs_spec(indeks).s = 1,33
rs_spec(indeks).T = 0,153
indeks = 2
rs_spec(indeks).s = 1,33
rs_spec (indeks).T = 0,4
indeks = 3
rs_spec (indeks).s = 1,204
rs_spec(indeks).T = 0,443
indeks = 4
rs_spec(indeks).s = 1,07
rs_spec (indeks).T = 0,5
indeks = 5
rs_spec (indeks).s = 0,7
rs_spec (indeks).T = 0,761
indeks = 6
rs_spec(indeks).s = 0,508
rs_spec(indeks).T = 1,051
indeks = 7
rs_spec(indeks).s = 0,367
rs_spec (indeks).T = 1,453
indeks = 8
rs_spec(indeks).s = 0,267
rs_spec(indeks).T = 1,995
indeks = 9
rs_spec(indeks).s = 0,16
rs_spec (indeks).T = 2,584
indeks = 10
rs_spec(indeks).s = 0,16
rs_spec(indeks).T = 5
rspara.UserDefinedTable = rs_spec
rspara.Comment = "przetestuj rs"
rspara.DefinitionType = ResponseSpectraType.UserDefinedRS
rspara.description = "przetestuj rs przez COM"
rspara.Number = rs_no
iDynCase.SetRSParams rs_no, rspara
e: Jeżeli Err.Number <> 0 to MsgBox Err.description, , Err.Source
iMod.GetApplication.UnlockLicense
Ustaw iMod = Nic
Ustaw iApp = Nic