Sub mesh_params ()
Dim iApp As RFEM5.Application
' pobierz interfejs dla danych modelu
Dim iModel As RFEM5.model
Set iModel = GetObject(, "RFEM5.Model")
On Error GoTo e
Jeśli nie iModel jest niczym, to
' pobranie interfejsu do aplikacji i zablokowanie licencji
Ustaw iApp = iModel.GetApplication ()
iApp.LockLicense
' pobierz interfejs do danych modelu
Dim iModdata As RFEM5.IModelData2
Ustaw iModdata = iModel.GetModelData
' pobierz interfejs do obliczeń
Dim iCalc As RFEM5.ICalculation2
Ustaw iCalc = iModel.GetCalculation ()
' Pobierz interfejs do ustawień siatki
Dim iMeshSet As RFEM5.IFeMeshUstawienia
Ustaw iMeshSet = iCalc.GetFeMeshUstawienia
' uzyskać ogólne ustawienia siatki
Dim meshGen As RFEM5.FeMeshGeneralSettings
meshGen = iMeshSet.GetGeneral
meshGen.ElementLength = 0,1
' wstawić nowe ogólne ustawienia siatki
iModdata.PrepareModification
iMeshSet.Set General meshGen
iModdata.FinishModification
' uzyskać ustawienia pręta siatki
Dim meshMem As RFEM5.FeMeshMembersUstawienia
meshMem = iMeshSet.GetMembers
meshMem.DivideStraightMembers = True
meshMem.ElementLength = 0,1
siatkiMem.MinStraightMemberDivisions = 3
' wstawić nowe ustawienia pręta siatki
iModdata.PrepareModification
iMeshSet.SetMembers meshMem
iModdata.FinishModification
iApp.UnlockLicense
End If
e: Jeżeli Err.Number <>0 Wtedy
MsgBox Err.description, , Err.Source
End If
iApp.UnlockLicense
Ustaw iApp = Nic
Ustaw iModel = Nic
Zakończ sub