Search FAQ

Further Information

In addition to personal support, we offer resources 24/7 through our website.

Receive information including news, useful tips, scheduled events, special offers, and vouchers on a regular basis.

1 - 10 of 46

Sort by:

Items:

• ### How can I create a member eccentricity using the COM interface?

New

005026

In order to be able to assign an eccentricity to a member, it is usually necessary to create it before setting the member.

Another approach is shown in the following example. First, the eccentricity is created and then assigned to an existing member via its interface:

'---------------------Sub SetEccentricity()'---------------------Dim model As RFEM5.modelSet model = GetObject(, "RFEM5.Model")model.GetApplication.LockLicenseOn Error GoTo eDim iModData As RFEM5.iModelDataSet iModData = model.GetModelData'   create eccentricityDim eccens(0 To 0) As RFEM5.MemberEccentricityeccens(0).No = 1eccens(0).Comment = "test eccentricity"eccens(0).ReferenceSystem = LocalSystemTypeeccens(0).Start.X = 0eccens(0).Start.Y = 0eccens(0).Start.Z = 0eccens(0).End.X = 0eccens(0).End.Y = 0eccens(0).End.Z = 0eccens(0).HingeAtEndNode = Falseeccens(0).HingeAtStartNode = Falseeccens(0).HorizontalAlignment = Middleeccens(0).VerticalAlignment = Bottomeccens(0).TransverseOffset = Trueeccens(0).ReferenceObjectNo = 2eccens(0).ReferenceObjectType = MemberObjecteccens(0).HorizontalAxisOffset = Middleeccens(0).VerticalAxisOffset = Topeccens(0).StartAdjoiningMembersOffset = Falseeccens(0).EndAdjoiningMembersOffset = FalseiModData.PrepareModificationiModData.SetMemberEccentricities eccensiModData.FinishModification'   add eccentricity to memberDim iMem As RFEM5.IMemberSet iMem = iModData.GetMember(1, AtNo)Dim mem As RFEM5.Membermem = iMem.GetDatamem.EccentricityNo = 1iModData.PrepareModificationiMem.SetData memiModData.FinishModificatione:      If Err.Number <> 0 Then MsgBox Err.Description, , Err.Sourcemodel.GetApplication.UnlockLicenseEnd Sub

Member eccentricities can only be transferred as a field; for this purpose, a field with only one element has been created. In the attached image, the individual elements are itemized with reference to the graphical elements.

• ### How can I create a nodal support with a nonlinearity diagram via the COM interface?

The following VBA macro shows the creation of a nodal support with a nonlinearity diagram. The source code can be found under Downloads.

'--------------------------------------------------------------------------------------------------
Sub SetNSupports()
'--------------------------------------------------------------------------------------------------
Dim model As RFEM5.model
Dim data As IModelData
Dim support(0) As RFEM5.NodalSupport
Dim ISup As RFEM5.INodalSupport
Dim ISupDia As RFEM5.INonlinearityDiagram
Dim nlDiag As NonlinearityDiagram
Dim zone(2, 1) As Double

Set model = GetObject(, "RFEM5.Model")

On Error GoTo e

Set data = model.GetModelData

support(0).No = 1
support(0).nodelist = "1"
support(0).SupportNonlinearityX = WorkingDiagramType
support(0).SupportConstantY = -1
support(0).SupportConstantZ = -1
support(0).RestraintConstantX = -1
support(0).RestraintConstantY = -1
support(0).RestraintConstantZ = -1

data.PrepareModification
data.SetNodalSupports support
data.FinishModification

Set ISup = data.GetNodalSupport(1, AtNo)
Set ISupDia = ISup.GetNonlinearity(AlongAxisX)

zone(0, 0) = 0
zone(0, 1) = 0
zone(1, 0) = 1
zone(1, 1) = 2
zone(2, 0) = 3
zone(2, 1) = 4

nlDiag.PositiveZoneType = DiagramAfterLastStepType.StopDiagramType
nlDiag.PositiveZone = zone
nlDiag.Symmetric = True

data.PrepareModification
ISupDia.SetData nlDiag
data.FinishModification

e:  If Err.Number <> 0 Then MsgBox Err.Description, , Err.Source

Set data = Nothing
Set model = Nothing

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

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")

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

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.

• ### How can I read out the global or local deformations of members by using the COM interface?

004951

The deformations of members can be read out by using the "GetMemberDeformations()" function, for example. This function expects a number, the type of the counting method for members (member number/number in the list), and which coordinate system should be used. You can select whether the local axis system, the principal axis system, or the global coordinate system is used:

Sub test_results_member_axis()Dim iApp As RFEM5.ApplicationSet iApp = GetObject(, "RFEM5.Application")iApp.LockLicenseDim iMod As RFEM5.IModel3Set iMod = iApp.GetActiveModelOn Error GoTo e'get interface for calculationDim iCalc As RFEM5.ICalculation2Set iCalc = iMod.GetCalculation'get interface for resultsDim iRes As RFEM5.IResults2Set iRes = iCalc.GetResultsInFeNodes(LoadCaseType, 1)'get deformations in local coordinate systemDim memDefs_L() As RFEM5.MemberDeformationsmemDefs_L = iRes.GetMemberDeformations(1, AtNo, LocalMemberAxes)'get deformations in global coordinate systemDim memDefs_G() As RFEM5.MemberDeformationsmemDefs_G = iRes.GetMemberDeformations(1, AtNo, GlobalAxes)'get deformations in principal coordinate systemDim memDefs_P() As RFEM5.MemberDeformationsmemDefs_P = iRes.GetMemberDeformations(1, AtNo, LocalPrincipalAxes)e:If Err.Number <> 0 Then MsgBox Err.description, vbCritical, Err.SourceiMod.GetApplication.UnlockLicenseSet iMod = NothingEnd Sub

The small program reads out the local deformations (memDefs_L) in the member axes and the principal axes (memDefs_P) and the global deformations in the member axes (memDefs_G).

• ### How can I edit the list of parameters by using the COM interface?

The parameters of a model can be modified by using the IModel interface (as of IModel3):

Sub test_parameter()Dim iApp As RFEM5.ApplicationSet iApp = GetObject(, "RFEM5.Application")iApp.LockLicenseDim j As Integerj = iApp.GetModelCountDim iMod As RFEM5.IModel3Set iMod = iApp.GetActiveModelOn Error GoTo eDim formParams() As RFEM5.FormulaParameter'   get all formula parametersformParams = iMod.GetFormulaParameters'   delete all formula parametersiMod.CleanFormulaParameters'   set list of formula parametersReDim Preserve formParams(0 To UBound(formParams, 1) + 1)formParams(UBound(formParams, 1)).Name = "p"formParams(UBound(formParams, 1)).Unit = "m"formParams(UBound(formParams, 1)).UnitType = LengthUnitTypeformParams(UBound(formParams, 1)).Value = 0formParams(UBound(formParams, 1)).ValueType = DoubleTypeformParams(UBound(formParams, 1)).Comment = "new parameter"formParams(UBound(formParams, 1)).Formula = "b/3"formParams(UBound(formParams, 1)).RangeOfValues = "(3;5.5>"iMod.SetFormulaParameters formParamse:If Err.Number <> 0 Then MsgBox Err.description, vbCritical, Err.SourceiMod.GetApplication.UnlockLicenseSet iMod = NothingEnd Sub

It is only possible to read out all parameters by using the GetFormulaParameters() function. The modified or new parameters can then be transferred again as a list with the SetFormulaParameters() function. Thus, no individual parameters can be read out or written.

It should be noted that the "Value" related to its type (ValueTyp) and its unit (Unit) must be within the defined limits (RangeOfValues), otherwise an error message appears. If the value is calculated, as in the example, it is irrelevant and the value calculated with the formula (Formula) must be within the limits, if the limits are defined.

• ### How can I use the "Connect Lines or Members" function via the COM interface?

The "Connect Lines/Members" option can be implemented with the "ConnectLines()" and "ConnectMembers()" functions. Both functions expect a string with the numbers of the lines or members:

Sub test_connect()Dim iMod As RFEM5.modelSet iMod = GetObject(, "RFEM5.Model")iMod.GetApplication.LockLicenseOn Error GoTo eDim iModData As RFEM5.IModelData2Set iModData = iMod.GetModelData()iModData.PrepareModificationiModData.ConnectLines ("3,4")iModData.ConnectMembers ("1,2")iModData.FinishModificatione:If Err.Number <> 0 Then MsgBox Err.description, vbCritical, Err.SourceiMod.GetApplication.UnlockLicenseSet iMod = NothingEnd Sub

In this example, Line 1 and Line 2 are connected and a node is created at the intersection point. The same applies to Member 1 and Member 2, where a new node is also created at the intersection point.

• ### How can I read out the resultant of a section via the COM interface?

004869

Just like all other results, the resultant of a section can be read out via IModel3 → ICalculation2 → IResults2. The interface to the results is provided by the GetResultant function, which then returns the ResultantForce structure when specifying the section number and the type of the result distribution. This structure includes, among other things, the forces and moments as vectors:

Sub GetResultantSection()
Dim iApp As RFEM5.Application
Dim iModel As RFEM5.model
Set iModel = GetObject(, "RFEM5.Model")

On Error GoTo e

'   get interface from model
Set iApp = iModel.GetApplication

'   get interface from calculation
Dim iCalc As RFEM5.ICalculation2
Set iCalc = iModel.GetCalculation

'   get interface from results from loadcase 1
Dim iRes As RFEM5.IResults2

'   get Resultant
Dim section_resultant As ResultantForce
section_resultant = iRes.GetResultant(1, AtNo, ConstantDistributionOnElements)

e:
If Err.Number <> 0 Then
MsgBox Err.Number & " " & Err.description
End If

If Not iApp Is Nothing Then
End If

End Sub
• ### I am using the COM interface and Grasshopper for the calculation of complex structures. For this task, I need to create NURBS lines. Could you explain how to set NURBS? For example what kind of data should be provided for Knots?

In the FAQ downloads, you will find a sample code of how to set the NURBS surfaces. The knot vector KnotsX, KnotsY determines how the control points affect the NURBS curve. The number of knots is equal to the number of nodes plus order.

• ### How can I create a user-defined coordinate system via the COM interface and then assign it to a nodal support?

For the programming using the COM interface, a nodal support has the "ReferenceSystem" and "UserDefinedReferenceSystem" properties. "ReferenceSystem" allows you to define the type of the user-defined coordinate system (for example, "Rotated" or "Coordinate System"), and depending on which type has been selected, this type is then defined via "UserDefinedReferenceSystem."

In the following example, the "Coordinate system" was set as the type and a user-defined coordinate system was also created for it:

//  create user defined coordinate systemIGuideObjects iGuide = iModel.GetGuideObjects();//  delete cosy No 2UserCoordinateSystem[] csList = iGuide.GetCoordinateSystems();if (csList.Length > 1){    for (int i = 0; i < csList.Length; ++i)    {        if (csList[i].No == 2)        {            iGuide.PrepareModification();            iGuide.DeleteObjects(GuideObjectType.CoordinateSystemObject, "2");            iGuide.FinishModification();        }    }}//  define new cosy No 2UserCoordinateSystem uCs = new UserCoordinateSystem();uCs.Name = "test";uCs.Comment = "test";uCs.No = 2;uCs.IsValid = true;uCs.Origin.X = 1;uCs.Origin.Y = 0;uCs.Origin.Z = 1;uCs.Point1.X = 2;uCs.Point1.Y = 0;uCs.Point1.Z = 1;uCs.Point2.X = 1;uCs.Point2.Y = 1;uCs.Point2.Z = 2;//  set cosy No 2iGuide.PrepareModification();iGuide.SetCoordinateSystem(uCs);iGuide.FinishModification();//  create nodal support with user defined cosyNodalSupport ns = new NodalSupport();ns.SupportConstantX = -1;ns.SupportConstantY = -1;ns.SupportConstantZ = -1;ns.RestraintConstantX = -1;ns.RestraintConstantY = 0;ns.RestraintConstantZ = -1;ns.Comment = "user defined cosy";ns.NodeList = "1";ns.ReferenceSystem = ReferenceSystemType.UserDefinedSystemType;ns.UserDefinedReferenceSystem.ObjectNo = 2;ns.UserDefinedReferenceSystem.Type = UserDefinedAxisSystemType.DefinedCoordinateSystemType;iModData.PrepareModification();iModData.SetNodalSupport(ns);iModData.FinishModification();

To be able to create the coordinate system, the interface for the guide objects is required: 'IGuideObjects'. With the "DeleteObjects()" function, an existing coordinate system of Number 2 is first deleted and a new one is created with "SetCoordinateSystem()." Please note the "Prepare/Finish-Modification" block to be able to transfer the new element.

The nodal support is transferred via the "IModelData" interface. Again, the "Prepare/Finish-Modification" block is required.

• ### What are the StandardID and AnnexID of various National Annexes for the processing using the COM interface?

StandardID and AnnexID can be easily displayed at any time by using the following macro:

cominterfaces-en\SDK\Examples\Modules\Excel\RF-STEEL_EC3.xls

You can find this macro in the archive of the product website (see Links).

Here is an overview of the current attachments:

StandardID AnnexID Name

DIN 0 Germany

ÖNORM 1 Austria

CSN 2 Czech Republic

STN 3 Slovakia

PN 4 Poland

SIST 5 Slovenia

DK 6 Denmark

UNI 7 Italy

NEN 8 Netherlands

SFS 9 Finland

SS 10 Sweden

NF 11 France

BS 12 United Kingdom

CEN 13 European Union

BDS 14 Bulgaria

CYS 15 Cyprus

LST 16 Lithuania

SR 17 Romania

SS 18 Singapore

NBN 19 Belgium

NP 20 Portugal

UNE 21 Spain

MAL 22 Malaysia

NS 23 Norway

LU 24 Luxembourg

ELOT 25 Greece

1 - 10 of 46

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

First steps

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

Wind Simulation & Wind Load Generation

With the stand -alone program RWIND Simulation, you can simulate wind flows around simple or complex structures by means of a digital wind tunnel.

The generated wind loads acting on these objects can be imported to RFEM or RSTAB.

Your support is by far the best

“Thank you very much for the useful information.

I would like to pay a compliment to your support team. I am always impressed how quickly and professionally the questions are answered. In the industry of structural analysis, I use several software including service contract, but your support is by far the best.”