FAQ 004961 EN-US

Helpful Questions & Answers

  • Frequently Asked Questions (FAQs)

This article was translated by Google Translator

View original text

How can I use the COM interface to delete all nodes or members in a model, for example?

Answer

To delete elements, there is the "DeleteObjects()" function in the model data interface. Deleting all members is then as follows:

Sub test_delete_objects()

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

iApp.LockLicense

Dim iMod As RFEM5.IModel3
Set iMod = iApp.GetActiveModel


On Error GoTo e

' get interface for model data
Dim iModData As RFEM5.IModelData2
Set iModData = iMod.GetModelData
    
' get all members
Dim mems() As RFEM5.Member
mems() = iModData.GetMembers
    
' create member list
Dim mem_list As String
Dim i As Integer
For i = 0 To UBound(mems, 1)
mem_list = mem_list & mems(i).no & ","
Next
    
' delete members
iModData.PrepareModification
iModData.DeleteObjects MemberObject, mem_list
iModData.FinishModification
    
e:

If Err.Number <> 0 Then MsgBox Err.description, vbCritical, Err.Source

iMod.GetApplication.UnlockLicense
Set iMod = Nothing

End Sub


Please note that the "DeleteObjects" function only works with the object number and not with the object index. These numbers are transferred as a string, separated by commas.

For this reason, all members had to be fetched first. Then the member field was looped through and all member numbers were entered in the string.

Keywords

COM DeleteObjects Delete Remove

Downloads

Links

Write Comment...

Write Comment...

  • Views 97x
  • Updated 04/13/2021

Contact us

Contact Dlubal

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.

(267) 702-2815

info-us@dlubal.com

Online Training | English

RFEM for Students | USA

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

Online Training | English

RFEM | Basics

Online Training 04/23/2021 8:30 AM - 12:30 PM CEST

Online Training | English

RFEM | Timber | USA

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

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 CEST

Timber structures | Part 2: design

Timber Beam and Surface Structures | Part 2: Design

Webinar 05/11/2021 2:00 PM - 2:45 PM CEST

Online Training | English

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

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

Online training | English

RFEM for Students | Part 2

Online Training 05/17/2021 2:00 PM - 4:30 PM CEST

Online training | Arabic

RFEM | Basics | Arabic

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

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 CEST

Online Training | English

RFEM | Structural dynamics and earthquake design according to EC 8

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

Online training | English

RFEM for Students | Part 3

Online Training 06/15/2021 2:00 PM - 4:30 PM CEST

Online Training | English

RFEM | Basics | USA

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

Plate and Shell Buckling Utilizing Dlubal Software

Plate and Shell Buckling Utilizing Dlubal Software

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

CSA S16:19 Steel Design in RFEM

CSA S16:19 Steel Design in RFEM

Webinar 03/10/2021 2:00 PM - 3:00 PM CDT

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 CDT

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 CDT

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 CDT

Documenting Results in the RFEM Printout Report

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

ACI 318-19 Concrete Design in RFEM

ACI 318-19 Concrete Design in RFEM

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

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