Ответ:
Следующий макрос VBA показывает создание узловой опоры с нелинейностью «Частичная активность». Исходный код затем находится в разделе Загрузки.
- code.en#
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 как RFEM5.IPartialActivity
Dim nlPA как частичная активность
- Set model = GetObject(, "RFEM5.Model")
- model.GetApplication.LockLicense
- On Error GoTo e
- Set data = model.GetModelData
- support(0).No = 1
- поддержка (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)
- Установите 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
- /код#