1029x
004967
2021-04-08

节点支座与非线性图(通过 COM)

如何通过COM接口创建带有非线性图的节点支座?


回复:

下面的 VBA 宏显示了如何创建带有非线性图的节点支座。 Der Quellcode kann unter den Downloads heruntergeladen werden.

'--------------------------------------------------------------------------------------------------
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")
    model.GetApplication.LockLicense

    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
    model.GetApplication.UnlockLicense
    Set model = Nothing

End Sub

作者

von Bloh 女士为我们的客户提供技术支持,负责 SHAPE-THIN 软件的开发,以及钢结构和铝合金结构的开发。

下载


;