How can I retroactively modify a member via the COM interface?

Answer

To modify an existing element, you have to get the interface to the corresponding element, in this case on an example of a member:

    Dim iModel As RSTAB8.model
    Set iModel = GetObject(, "RSTAB8.Model")
    iModel.GetApplication.LockLicense
    
    Dim iModData As IModelData
    Set iModData = iModel.GetModelData
    
    Dim iMem As RSTAB8.IMember
    Set iMem = iModData.GetMember(1, AtNo)

Use this code to get the interface to Member 1, which should already be created. Then, you can use the .GetData () method of the interface to get the member data.

If you want to modify the data (such as the member rotation here), you can subsequently transfer it to the program within the Prepare-/FinishModification block with the method .SetData ().


    Dim mem As RSTAB8.Member
    mem = iMem.GetData
    
    mem.Rotation.Angle = 0.5
    mem.Rotation.Type = RSTAB8.Angle
   
    iModData.PrepareModification
    iMem.SetData mem
    iModData.FinishModification

Keywords

COM Rotation Member IMember Change Modify

Downloads

Contact us

Did you find your question?
If not, contact us via our free e-mail, chat, or forum support, or send us your question via the online form.

+49 9673 9203 0

info@dlubal.com

RFEM Main Program
RFEM 5.xx

Main Program

Structural engineering software for finite element analysis (FEA) of planar and spatial structural systems consisting of plates, walls, shells, members (beams), solids and contact elements

Price of First License
3,540.00 USD
RSTAB Main Program
RSTAB 8.xx

Main Program

The structural engineering software for design of frame, beam and truss structures, performing linear and nonlinear calculations of internal forces, deformations, and support reactions

Price of First License
2,550.00 USD
RFEM Other
RF-COM 5.xx

Add-on Module

Programmable interface (API) based on the COM technology

Price of First License
580.00 USD
RSTAB Other
RS-COM 8.xx

Add-on Module

Programmable interface (API) based on the COM technology

Price of First License
580.00 USD