0x
003570
2019-09-10

通过 COM 接口创建节点释放

是否可以通过 COM 接口创建节点释放?


回复:

是的,节点释放可以通过 COM 接口创建。 Hier ein Beispiel:

Sub nodal_release()

    Dim iApp As RFEM5.Application
    Dim iModel As RFEM5.model
    
    On Error GoTo e
    
        Set iApp = GetObject(, "RFEM5.Application")
        iApp.LockLicense
        
        test = iApp.GetModelCount
        Set iModel = iApp.GetModel(0)
        
        Dim iModeldata As RFEM5.iModeldata
        Set 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 one
        Dim nodRel As NodalRelease
        nodRel.Location = OriginalLocationType
        nodRel.AxisSystem = LocalFromLine
        nodRel.AxisSystemFromObjectNo = 2
        nodRel.Comment = "test nodal release"
        nodRel.MemberHingeNo = 1
        nodRel.NodeNo = 1
        nodRel.ReleasedMembers = 1
        
        iModeldata.PrepareModification
        iModeldata.SetNodalRelease nodRel
        iModeldata.FinishModification
        
        
e:      If Err.Number <> 0 Then MsgBox Err.description, , Err.Source
    
    iApp.UnlockLicense


End Sub

Es ist noch zu beachten, dass das lokale Achsensystem sich nicht auf die gleichen Elemente beziehen darf wie die, die freigegeben werden.


作者

Thomas在客户支持部门处理与软件相关的技术咨询。他能够可靠地熟悉不同主题,并制定合适的解决方案。

下载


;