Answer:
In order to be able to assign an eccentricity to a member, it is usually necessary to create it before setting the member.
Another approach is shown in the following example. First, the eccentricity is created and then assigned to an existing member via its interface:
'---------------------
Sub SetEccentricity()
'---------------------
Dim model As RFEM5.model
Set model = GetObject(, "RFEM5.Model")
model.GetApplication.LockLicense
On Error GoTo e
Dim iModData As RFEM5.iModelData
Set iModData = model.GetModelData
' create eccentricity
Dim eccens(0 To 0) As RFEM5.MemberEccentricity
eccens(0).No = 1
eccens(0).Comment = "test eccentricity"
eccens(0).ReferenceSystem = LocalSystemType
eccens(0).Start.X = 0
eccens(0).Start.Y = 0
eccens(0).Start.Z = 0
eccens(0).End.X = 0
eccens(0).End.Y = 0
eccens(0).End.Z = 0
eccens(0).HingeAtEndNode = False
eccens(0).HingeAtStartNode = False
eccens(0).HorizontalAlignment = Middle
eccens(0).VerticalAlignment = Bottom
eccens(0).TransverseOffset = True
eccens(0).ReferenceObjectNo = 2
eccens(0).ReferenceObjectType = MemberObject
eccens(0).HorizontalAxisOffset = Middle
eccens(0).VerticalAxisOffset = Top
eccens(0).StartAdjoiningMembersOffset = False
eccens(0).EndAdjoiningMembersOffset = False
iModData.PrepareModification
iModData.SetMemberEccentricities eccens
iModData.FinishModification
' add eccentricity to member
Dim iMem As RFEM5.IMember
Set iMem = iModData.GetMember(1, AtNo)
Dim mem As RFEM5.Member
mem = iMem.GetData
mem.EccentricityNo = 1
iModData.PrepareModification
iMem.SetData mem
iModData.FinishModification
e: If Err.Number <> 0 Then MsgBox Err.Description, , Err.Source
model.GetApplication.UnlockLicense
End Sub
Member eccentricities can only be transferred as a field; for this purpose, a field with only one element has been created. In the attached image, the individual elements are itemized with reference to the graphical elements.