FAQ 004622 | How can I enter or read out a response spectrum via the COM interface in DYNAM Pro?

Easily learn how to work with the Dlubal Software programs

  • Dlubal Software | Videos

Video

First Steps with RFEM

First steps

We provide hints and tips to help you get started with the basic program RFEM.

Please accept Marketing Cookies to watch this video.

Question

How can I enter or read out a response spectrum via the COM interface in DYNAM Pro?

Answer

The COM interface allows you to read out or create a user-defined response spectrum in RFEM and RSTAB.

For the conversion, it is necessary to get the interface to the module (IDynamModule) via the interface to the RFEM model (IModel). This interface is then used to create the module case (IModuleCase). IModuleCase includes the GetRSParams function, which can be used to read out the parameters for the response spectrum. On the other hand, the SetRSParams function can write new data. The following example code clarifies it:

Dim iApp As RFEM5.Application
Dim iMod As RFEM5.model
Set iApp = GetObject(, "RFEM5.Application")

Dim rs_no As Integer
rs_no = 1

On Error GoTo e

    ' Checks RS-COM license and locks the application for using by COM.
    iApp.LockLicense

    Set iMod = iApp.GetActiveModel

    '  get module interface
    Dim iDyn As IDynamModule
    Set iDyn = iMod.GetModule("DynamPro")

    '  get module case interface
    Dim iDynCase As IModuleCase
    Set iDynCase = iDyn.GetData
    
    '  set response spectra parameters
    Dim rspara As RSParams
    rspara = iDynCase.GetRSParams(rs_no)
    
    Dim rs_spec(0 To 10) As RSTableRow
    
    Dim index As Integer
    index = 0
    rs_spec(index).s = 0.6
    rs_spec(index).T = 0
    
    index = 1
    rs_spec(index).s = 1.33
    rs_spec(index).T = 0.153
    
    index = 2
    rs_spec(index).s = 1.33
    rs_spec(index).T = 0.4
    
    index = 3
    rs_spec(index).s = 1.204
    rs_spec(index).T = 0.443
    
    index = 4
    rs_spec(index).s = 1.07
    rs_spec(index).T = 0.5
    
    index = 5
    rs_spec(index).s = 0.7
    rs_spec(index).T = 0.761
    
    index = 6
    rs_spec(index).s = 0.508
    rs_spec(index).T = 1.051
    
    index = 7
    rs_spec(index).s = 0.367
    rs_spec(index).T = 1.453
    
    index = 8
    rs_spec(index).s = 0.267
    rs_spec(index).T = 1.995
    
    index = 9
    rs_spec(index).s = 0.16
    rs_spec(index).T = 2.584
    
    index = 10
    rs_spec(index).s = 0.16
    rs_spec(index).T = 5
    

    rspara.UserDefinedTable = rs_spec
    rspara.Comment = "test rs"
    rspara.DefinitionType = ResponseSpectraType.UserDefinedRS
    rspara.description = "test rs via COM"
    rspara.Number = rs_no
    
    iDynCase.SetRSParams rs_no, rspara
    
e:  If Err.Number <> 0 Then MsgBox Err.description, , Err.Source
    
    iMod.GetApplication.UnlockLicense
    Set iMod = Nothing
    Set iApp = Nothing

The response spectrum was created according to EN 1998‑1:2010 and has 11 points. First, an array of the RSTableRow type with 11 elements was created, filled with data, and then saved under the UserDefinedTable property. The transfer is carried out using the SetRSParams command.

Keywords

Dlubal FAQ Response spectrum COM RSParams RSTableRow DynamPro Frequently Asked Question FAQ about Dlubal Question and Answer about Dlubal

Links

Write Comment...

Write Comment...

  • Views 108x
  • Updated 02/19/2021

Contact us

Do you have any questions about our products or need advice on selecting the products needed for your projects?
Contact us via our free e-mail, chat, or forum support or find various suggested solutions and useful tips on our FAQ page.

(267) 702-2815

info-us@dlubal.com

Online Training | English

Eurocode 5 | Timber structures according to EN 1995-1-1

Online Training 03/17/2021 8:30 AM - 12:30 PM CET

Online Training | English

Eurocode 3 | Steel structures according to DIN EN 1993-1-1

Online Training 03/18/2021 8:30 AM - 12:30 PM CET

Online Training | English

RFEM | Dynamics | USA

Online Training 03/23/2021 1:00 PM - 4:00 PM EST

Plate and Shell Buckling Utilizing Dlubal Software

Plate and Shell Buckling Utilizing Dlubal Software

Webinar 03/30/2021 2:00 PM - 2:45 PM

Online Training | English

RFEM for Students | USA

Online Training 04/21/2021 1:00 PM - 4:00 PM EST

Online Training | English

RFEM | Timber | USA

Online Training 05/05/2021 1:00 PM - 4:00 PM EST

Online Training | English

Eurocode 3 | Steel structures according to DIN EN 1993-1-1

Online Training 05/06/2021 8:30 AM - 12:30 PM

Online Training | English

Eurocode 2 | Concrete structures according to DIN EN 1992-1-1

Online Training 05/11/2021 8:30 AM - 12:30 PM

Online Training | English

Eurocode 5 | Timber structures according to DIN EN 1995-1-1

Online Training 05/20/2021 8:30 AM - 12:30 PM

Online Training | English

RFEM | Basics | USA

Online Training 06/17/2021 9:00 AM - 1:00 PM EST

The Most Common User Errors With RFEM and RSTAB

The Most Common User Errors With RFEM and RSTAB

Webinar 02/04/2021 2:00 PM - 3:00 PM CET

ADM 2020 Member Design in RFEM

ADM 2020 Member Design in RFEM

Webinar 01/19/2021 2:00 PM - 3:00 PM EST

Dlubal Info Day

Dlubal Info Day Online | December 15, 2020

Webinar 12/15/2020 9:00 AM - 4:00 PM CET

FEA Troubleshooting and Optimization in RFEM

FEA Troubleshooting and Optimization in RFEM

Webinar 11/11/2020 2:00 PM - 3:00 PM EST

Soil-Structure Interaction in RFEM

Soil-Structure Interaction in RFEM

Webinar 10/27/2020 2:00 PM - 2:45 PM CET

NBC 2015 Modal Response Spectrum Analysis in RFEM

NBC 2015 Modal Response Spectrum Analysis in RFEM

Webinar 09/30/2020 2:00 PM - 3:00 PM EST

Documenting Results in the RFEM Printout Report

Webinar 08/25/2020 2:00 PM - 2:45 PM

ACI 318-19 Concrete Design in RFEM

ACI 318-19 Concrete Design in RFEM

Webinar 08/20/2020 2:00 PM - 3:00 PM EST

How to Be More Productive Using RFEM

How to Be More Productive Using RFEM

Webinar 07/07/2020 3:00 PM - 4:00 PM

Introduction to Solid Modeling \n in RFEM

Introduction to Solid Modeling in RFEM

Webinar 06/30/2020 2:00 PM - 3:00 PM EST

Modeling with Solids in RFEM

Modeling with Solids in RFEM

Webinar 06/09/2020 3:00 PM - 3:45 PM

CSA A23.3 Concrete Design in RFEM

CSA A23.3:19 Concrete Design in RFEM

Webinar 05/14/2020 2:00 PM - 3:00 PM EST