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
An imperfection is considered load and is transferred via the interface of the load case. Provided that the interface to the model has already been fetched, the interface to the loads (ILoads) is retrieved, followed by the interface to load case 1 (ILoadCase), if it has already been created:'set loadcasesDim iLoads As iLoadsSet iLoads = model.GetLoads'get load case.'Dim 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 imperfection'iLc1.PrepareModificationiLc1.SetImperfection imperfiLc1.FinishModification
The data of the imperfection is then filled out first, here for member 1, and then transferred within a Prepare-/FinishModification block of the load case Interfaces.
To modify an existing element, you have to get the interface to the corresponding element, here 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 must already be created. Then, you can use the .GetData () method of the interface to get the member data.
If you want to modify data (such as the member rotation here), you can subsequently transfer it to the program within a 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 demonstrates how to specify a 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_optsIn the annex, there is an EXCEL macro to download.
AnswerFirst, a result beam is created exactly like 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, the interface IMember has to be taken from the corresponding member, and the GetExtraData method is used to get the interface to IResultMember. This interface can now be used to read or write the ResultMember data. Please note that a 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 represents a non-linearity and can therefore only be modified via the interface to the member end release hinge.
For this purpose, the member end release must be created first, if not already available. Then, the IMemberHinge interface is brought to the member end release and then to the non-linearity (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 end release. In the concrete 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 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 in the download area below.
This check can be queried automatically via
- "IApplication.LockLicense ()"
- "bool isLicensed = IApplication.IsComLicensed ()"
- "IApplication.UnlockLicense ()"
Yes, it is possible to create nodal releases via the COM interface. Here is an example:Sub nodal_release ()Dim iApp As RFEM5.ApplicationDim iModel As RFEM5.modelOn Error GoTo eSet iApp = GetObject (, "RFEM5.Application")iApp.LockLicensetest = iApp.GetModelCountSet iModel = iApp.GetModel (0)Dim iModeldata As RFEM5.iModeldataSet iModeldata = iModel.GetModelData' for setting a nodal release a member hinge is needed' the object for the axis system could not be the same with the released oneDim nodRel As NodalReleasenodRel.Location = OriginalLocationTypenodRel.AxisSystem = LocalFromLinenodRel.AxisSystemFromObjectNo = 2nodRel.Comment = "test nodal release"nodRel.MemberHingeNo = 1nodRel.NodeNo = 1nodRel.ReleasedMembers = 1iModeldata.PrepareModificationiModeldata.SetNodalRelease nodReliModeldata.FinishModificatione: If Err.Number <> 0 Then MsgBox Err.description,, Err.SourceiApp.UnlockLicense
Please note that the local axis system may not refer to the same elements as the ones that are released.
To transfer several elements, you first have to create a field (array) in VBA:
Dim nodes (0 to 2) as RFEM5.Node
Then, you can transfer all nodes at once to the field (here three elements 0,1,2) with the method IModelData.SetNodes ().
These methods are also available e.g. for the following structural elements:
AnswerThe main object is not a line object but an object of the type NurbSpline.Here is a short example for creating a NURBS (Non-Uniform Rational B-Spline):'------------------------------------------------- -------------------------------------------------Sub nurbs_test ()'------------------------------------------------- -------------------------------------------------Dim model As RFEM5.modelSet model = GetObject (, "RFEM5.Model")model.GetApplication.LockLicenseOn Error GoTo eDim data As IModelDataSet data = model.GetModelData'define array of nodesDim nodes (0 To 2) As RFEM5.Nodenodes (0) .No = 1nodes (0) .Type = Defaultnodes (0) .CS = Cartesiannodes (0) .X = 1nodes (0) .Y = 1nodes (0) .Z = 0nodes (1) .No = 2nodes (1) .Type = Defaultnodes (1) .CS = Cartesiannodes (1) .X = 2nodes (1) .Y = 1nodes (1) .Z = -1nodes (2) .No = 3nodes (2) .Type = Defaultnodes (2) .CS = Cartesiannodes (2) .RefObjectNo = 2nodes (2) .X = 0nodes (2) .Y = 1nodes (2) .Z = 0Dim darr1 (0 To 5) As Doubledarr1 (0) = 1darr1 (1) = 2darr1 (2) = 3darr1 (3) = 4darr1 (4) = 5darr1 (5) = 6Dim darr2 (0 To 2) As Doubledarr2 (0) = 1darr2 (1) = 1darr2 (2) = 1Dim ns As NurbSplinens.General.No = 2ns.General.Type = NurbSplineTypens.General.NodeList = "1,2,3"ns.General.Comment = "line 2"ns.Knots = darr1ns.Order = 3ns.Weights = darr2data.PrepareModificationdata.SetNodes nodesdata.SetNurbSpline nse: data.FinishModificationIf Err.Number <> 0 Then MsgBox Err.Description,, Err.SourceSet data = Nothingmodel.GetApplication.UnlockLicenseSet model = NothingEnd Sub
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.
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.”