1093x
004951
2021-02-22

Spostamenti generalizzati delle aste tramite COM

Come posso utilizzare l'interfaccia COM per leggere le deformazioni globali o locali delle aste?


Risposta:

Gli spostamenti generalizzati delle aste possono essere letti utilizzando, ad esempio, la funzione "GetMemberDeformations()". Diese Funktion erwartet eine Nummer, die Art der Zählweise für Stäbe (Stabnummer/Nummer in der Liste) und welches Koordinatensystem verwendet werden soll. Es kann dabei ausgewählt werden, ob das lokale Achsensystem, das Hauptachsensystem oder das globale Koordinatensystem verwendet wird:

Sub test_results_member_axis()

Dim iApp As RFEM5.Application
Set iApp = GetObject(, "RFEM5.Application")

iApp.LockLicense

Dim iMod As RFEM5.IModel3
Set iMod = iApp.GetActiveModel


On Error GoTo e

'get interface for calculation
Dim iCalc As RFEM5.ICalculation2
Set iCalc = iMod.GetCalculation

'get interface for results
Dim iRes As RFEM5.IResults2
Set iRes = iCalc.GetResultsInFeNodes(LoadCaseType, 1)

'get deformations in local coordinate system
Dim memDefs_L() As RFEM5.MemberDeformations
memDefs_L = iRes.GetMemberDeformations(1, AtNo, LocalMemberAxes)

'get deformations in global coordinate system
Dim memDefs_G() As RFEM5.MemberDeformations
memDefs_G = iRes.GetMemberDeformations(1, AtNo, GlobalAxes)

'get deformations in principal coordinate system
Dim memDefs_P() As RFEM5.MemberDeformations
memDefs_P = iRes.GetMemberDeformations(1, AtNo, LocalPrincipalAxes)


e:

If Err.Number <> 0 Then MsgBox Err.description, vbCritical, Err.Source

iMod.GetApplication.UnlockLicense
Set iMod = Nothing

End Sub

Das kleine Programm liest für einen Stab die lokalen Verformungen (memDefs_L) in den Stabachsen und den Hauptachsen (memDefs_P) und die globalen Verformungen in den Stabachsen (memDefs_G) aus.


Autore

Il signor Günthel fornisce supporto tecnico per i clienti di Dlubal Software e si prende cura delle loro richieste.

Link
Download


;