714x
005304
2022-08-26

Nodal Supports with Nonlinearity "Partial Activity"

How can I create a nodal support with the "Partial Activity" nonlinearity via the COM interface?


Answer:

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


Option Explicit

'--------------------------
Sub SetNSupports()
'--------------------------
Dim model As RFEM5.model
Dim data As IModelData
Dim support(0) As RFEM5.NodalSupport
Dim ISup As RFEM5.INodalSupport
Dim ISupPA As RFEM5.IPartialActivity
Dim nlPA As PartialActivity

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

    On Error GoTo e

    Set data = model.GetModelData
    
    support(0).No = 1
    support(0).NodeList = "1"
    support(0).SupportConstantX = -1
    support(0).SupportNonlinearityX = PartialActivityNLType
    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 ISupPA = ISup.GetNonlinearity(AlongAxisX)
    
    nlPA.PositiveZone = CompleteActivityType
    nlPA.PositiveSlippage = 0.005
    nlPA.NegativeZone = FailureActivityType


    data.PrepareModification
    ISupPA.SetData nlPA
    data.FinishModification
    
e:  If Err.Number <> 0 Then MsgBox Err.Description, , Err.Source

    Set data = Nothing
    model.GetApplication.UnlockLicense
    Set model = Nothing

End Sub

Author

Ms. von Bloh provides technical support for our customers and is responsible for the development of the SHAPE‑THIN program as well as steel and aluminum structures.

Downloads


;