In addition to our technical support (e.g. via chat), you’ll find resources on our website that may help you with your design using Dlubal Software.
Frequently Asked Questions (FAQ)
Customer Support 24/7
The stresses of a surface can be read out via the COM interface. First, you need the interface to the model (IModel) and then the interface for the calculation (ICalculation2). Using this interface, you can get the interface for the results (IResults2):Sub stresses_surfaces_example ()Dim iApp As RFEM5.ApplicationDim iModel As RFEM5.modelSet iModel = GetObject (, "RFEM5.Model")On Error GoTo EIf Not iModel Is Nothing Then'get interface from modelSet iApp = iModel.GetApplicationiApp.LockLicense'get interface from calculationDim iCalc As RFEM5.ICalculation2Set iCalc = iModel.GetCalculation'get interface from results from loadcase 1Dim iRes As RFEM5.IResults2Set iRes = iCalc.GetResultsInFeNodes(LoadCaseType, 1)'get equivalent stressesDim str_equ () As RFEM5.SurfaceEquivalentStressesstr_equ = iRes.GetSurfaceEquivalentStresses (1, AtNo, VonMisesHypothesis)End IfE:If Err.Number <> 0 ThenMsgBox Err.Number & "" & Err.descriptionEnd IfIf Not iApp Is Nothing TheniApp.UnlockLicenseEnd If
The GetSurfaceEquivalentStresses function requires the calculation hypothesis to be specified. In the above case, the results of the Von Mises stress are read out. Please note that the COM interface uses SI units so that the stress is transferred in N/m².
The *.dll and *.tlb files were probably not updated correctly on your computer. Please proceed as follows:
1. Rename the following folders in Dlubal.bak:
C:\Program Files (x86)\Common Files\Dlubal
C:\Program Files\Common Files\Dlubal
2. Reinstall RFEM or RSTAB.
3. Move the files from the newly created Dlubal folders to the respective Dlubal.bak folders (overwrite all).
4. Rename the Dlubal.bak folder to Dlubal.
AnswerIn principle, a section is an element, such as a member, and is also created in the same way. First, the interface to the objects is required. For a member, this would be IModelData, and for sections, it would be ISections. This interface can be found in IModel3:Sub test_section()' get interface from the opened model and lock the licence/programDim iModel As RFEM5.IModel3Set iModel = GetObject(, "RFEM5.Model")iModel.GetApplication.LockLicenseOn Error GoTo EDim iSecs As RFEM5.ISectionsSet iSecs = iModel.GetSections()All sections created previously are deleted first, and then two new sections are created.The first section should be a solid section with a visible sectional area (see Figure 01). The data are entered in a similar way as in RFEM. As a type, "SectionOnSectionalArea" is selected, the corner points of the section are set by using "EdgePoint," and a "Vector" defines the direction of the section:' first delete all sectionsiSecs.PrepareModificationiSecs.DeleteObjects ("All")iSecs.FinishModification' set section on solidDim sec As RFEM5.Sectionsec.EdgePointA.X = 2sec.EdgePointA.Y = 5sec.EdgePointA.Z = 0sec.EdgePointB.X = 2sec.EdgePointB.Y = 8sec.EdgePointB.Z = 0sec.no = 1sec.Name = "solid section"sec.Plane = GlobalPlaneInPositiveXsec.ShowValuesInIsolines = Falsesec.Type = SectionOnSolidSectionLinesec.ObjectList = "1"iSecs.PrepareModificationiSecs.SetSection seciSecs.FinishModificationAs already known from other elements, the new section is finally transferred in a Prepare-/FinishModification block. As the second section, a surface section is to be created (see Figure 02). For this, it is necessary to use the "SectionViaSurfacePlane" type. In addition to the vector of the section direction, you have to select the display plane of the results for the surface section. In the following example, the xy plane is selected by setting "GlobalPlaneInPositiveX."' set section on surfacesec.EdgePointA.X = 2sec.EdgePointA.Y = 0sec.EdgePointA.Z = 0sec.EdgePointB.X = 2sec.EdgePointB.Y = 3sec.EdgePointB.Z = 0sec.no = 2sec.Name = "surface section"sec.Plane = GlobalPlaneInPositiveXsec.ShowValuesInIsolines = Truesec.Type = SectionViaSurfacePlanesec.ObjectList = "1"sec.Vector.X = 0sec.Vector.Y = 0sec.Vector.Z = 1iSecs.PrepareModificationiSecs.SetSection seciSecs.FinishModificationIt is also possible to get the results of a section by using the separate method "GetResultsInSection" of the "IResults2" interface. In the following, the shear forces on the surface section are obtained. The distribution of the internal forces is set to "Continuous within Surfaces" by means of "ContinuousDistributionWithinObjects":' get resultsDim iCalc As ICalculation2Set iCalc = iModel.GetCalculationDim iRes As IResults2Set iRes = iCalc.GetResultsInFeNodes(LoadCaseType, 1)Dim secRes() As RFEM5.SectionResultsecRes = iRes.GetResultsInSection(2, AtNo,ShearForceVy,ContinuousDistributionWithinObjects, False)Under Downloads, you can find the Excel macro and the test file to comprehend the program.
In order to only calculate specific load cases, load combinations, or result combinations in the same way as the "To Calculate..." command (see Figure 01), you can use the CalculateBatch method of the ICalculation interface. For the transfer, the method expects a field with the load type of Loading. This Loading includes the number of the load, and the type (for example, a load combination):Sub batch_test()' get interface from the opened model and lock the licence/programDim iModel As RFEM5.IModel3Set iModel = GetObject(, "RFEM5.Model")iModel.GetApplication.LockLicenseOn Error GoTo e' get interface for calculationDim iCalc As ICalculation2Set iCalc = iModel.GetCalculation' create array with loading typesDim loadings(3) As Loadingloadings(0).no = 1loadings(0).Type = LoadCaseTypeloadings(1).no = 4loadings(1).Type = LoadCaseTypeloadings(2).no = 4loadings(2).Type = LoadCombinationType' calculate all loadings from the array at onceiCalc.CalculateBatch loadingse: If Err.Number <> 0 Then MsgBox Err.description, , Err.SourceSet iModelData = NothingiModel.GetApplication.UnlockLicenseSet iModel = NothingEnd Sub
An imperfection is considered as a load and is transferred via the interface of the load case. Provided that the interface to the model has already been imported, the interface to the loads (ILoads) followed by the interface to Load Case 1 (ILoadCase) will subsequently be imported, if it has already been created before:' set loadcasesDim iLoads As iLoadsSet iLoads = model.GetLoads' get load caseDim iLc1 As ILoadCaseSet iLc1 = iLoads.GetLoadCase(1, AtNo)' define imperfectionDim imperf As Imperfectionimperf.Comment = "test"imperf.Direction = LocalZTypeimperf.Inclination = 200imperf.no = 1imperf.ObjectList = 1imperf.Precamber = 300imperf.PrecamberActivity = ActivityAccording_EN_1993_1_1' set imperfectioniLc1.PrepareModificationiLc1.SetImperfection imperfiLc1.FinishModification
The data of the imperfection is then filled out first, here for Member 1, and then transferred within the Prepare-/FinishModification block of the Interfaces load case.
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.modelSet iModel = GetObject(, "RSTAB8.Model")iModel.GetApplication.LockLicenseDim iModData As IModelDataSet iModData = iModel.GetModelDataDim iMem As RSTAB8.IMemberSet 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.Membermem = iMem.GetDatamem.Rotation.Angle = 0.5mem.Rotation.Type = RSTAB8.AngleiModData.PrepareModificationiMem.SetData memiModData.FinishModification
AnswerThe following code shows how to get different calculation parameters via the COM interface. It also shows how to specify the setting for deactivating shear stiffness:' get model interfaceSet iApp = iModel.GetApplication()iApp.LockLicense' get calculation interfaceDim iCalc As RFEM5.ICalculation2Set iCalc = iModel.GetCalculation' get surface bending theoryDim calc_bend As RFEM5.BendingTheoryTypecalc_bend = iCalc.GetBendingTheory' get settings for nonlinearitiesDim calc_nl As RFEM5.CalculationNonlinearitiescalc_nl = iCalc.GetNonlinearities' get precision and tolerance settingsDim calc_prec As RFEM5.PrecisionAndTolerancecalc_prec = iCalc.GetPrecisionAndTolerance' get calculation settingsDim calc_sets As RFEM5.CalculationSettingscalc_sets = iCalc.GetSettings'get calculate optionsDim calc_opts As RFEM5.CalculationOptionscalc_opts = iCalc.GetOptions' set ShearStiffness to falsecalc_opts.ShearStiffness = FalseiCalc.SetOptions calc_optsUnder Downloads, you can find the EXCEL macro.
AnswerFirst, a result beam is created as in the case of a normal member:Dim model As RFEM5.modelSet model = GetObject(, "RFEM5.Model")model.GetApplication.LockLicenseOn Error GoTo eDim data As IModelDataSet data = model.GetModelDataDim members(0) As RFEM5.Membermembers(0).No = 3members(0).LineNo = 12members(0).Type = ResultBeamTypemembers(0).StartCrossSectionNo = 1members(0).EndCrossSectionNo = 1members(0).Comment = "result beam 1"data.PrepareModificationdata.SetMembers membersdata.FinishModificationThen, it is necessary to take the IMember interface from the corresponding member, and use the GetExtraData method to get the interface to IResultMember. Now, this interface can be used to read or write the ResultMember data. Please note that the Prepare-/Finishmodification block is required when writing:Dim iMem As IMemberSet iMem = data.GetMember(3, AtNo)Dim iRMem As IResultBeamSet iRMem = iMem.GetExtraDataDim RMem As ResultBeamRMem = iRMem.GetDataRMem.IncludeSurfaces = "1"RMem.IncludeSolids = "all"RMem.Integrate = WithinCuboidGeneralDim params(0 To 3) As DoubleRMem.Parameters = paramsRMem.Parameters(0) = 0.5RMem.Parameters(1) = 0.5RMem.Parameters(2) = 0.1RMem.Parameters(3) = 0.1data.PrepareModificationiRMem.SetData RMemdata.FinishModificationThe completed EXCEL macro and the corresponding test file are attached.
Friction is a nonlinearity and can therefore only be modified via the interface to the member hinge.
For this, it is first necessary to create the member hinge, if not already available. Then, the IMemberHinge interface is brought to the member hinge and then to the nonlinearity (here IFriction). Then, you can use the methods GetData and SetData to modify the data (here Friction):Sub SetMemberHingeFriction ()Dim model As RFEM5.modelSet model = GetObject(, "RFEM5.Model")model.GetApplication.LockLicenseOn Error GoTo eDim data As IModelDataSet data = model.GetModelDataDim hinge(0 To 0) As RFEM5.MemberHingehinge(0).No = 1hinge(0).RotationalConstantX = 1hinge(0).RotationalConstantY = 2hinge(0).RotationalConstantZ = 3hinge(0).TranslationalConstantX = 4hinge(0).TranslationalConstantY = 5hinge(0).TranslationalConstantZ = 6hinge(0).Comment = "Member Hinge 1"hinge(0).TranslationalNonlinearityX = FrictionATypedata.PrepareModificationdata.SetMemberHinges hingedata.FinishModification' get interface for member hingeDim imemhing As IMemberHingeSet imemhing = data.GetMemberHinge(1, AtNo)' get interface for nonlinearity 'friction'Dim iFric As IFrictionSet iFric = imemhing.GetNonlinearity(AlongAxisX)' get friction dataDim fric As Frictionfric = iFric.GetDatafric.Coefficient1 = 0.3' set friction datadata.PrepareModificationiFric.SetData fricdata.FinishModificatione: If Err.Number <> 0 Then MsgBox Err.Description, , Err.SourceSet data = Nothingmodel.GetApplication.UnlockLicenseSet model = NothingEnd Sub
In the case of the friction Vy + Vz, the Coefficient2 is used to set the second coefficient. The spring constant in the Friction dialog box is controlled by the translational spring of the member hinge. In this particular case, this is TranslationalConstantX for the X‑direction (see Figure 01).
AnswerThe asynchronous calculation is used if a self-created program should only open or continue operating RFEM or RSTAB. When the calculation is complete, the event is transferred via a delegate. You can find a C# example in a Visual Studio project under Downloads below.
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.
Wind Simulation & Wind Load Generation
With the stand-alone program RWIND Simulation, wind flows around simple or complex structures can be simulated by means of a digital wind tunnel.
The generated wind loads acting on these objects can be imported to RFEM or RSTAB.
“Thank you for the valuable information.
I would like to pay a compliment to your support team. I am always impressed how quickly and professionally the questions are answered. I have used a lot of software with a support contract in the field of structural analysis, but your support is by far the best. ”