Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Passing a Femap.Set to a function or another sub

Solution Partner Experimenter Solution Partner Experimenter
Solution Partner Experimenter

Hi,

 

  Is it possible to pass a femap.Set (App.feSet) to a funtion or a different sub?

 

Function/SUB Test(SurfaceSet as femap.Set)

 

Thanks

 

Frédéric

2 REPLIES 2

Re: Passing a Femap.Set to a function or another sub

Phenom
Phenom

Hi,

Yes:

 

Sub Main
    Dim App As femap.model
    Set App = feFemap()

    Dim set1 As femap.Set
    Set set1 = App.feSet
    set1.Add(66) : set1.Add(123)

    test(set1)
End Sub

Sub test(feset As femap.Set)
    feset.Debug
End Sub

Re: Passing a Femap.Set to a function or another sub

Siemens Phenom Siemens Phenom
Siemens Phenom

Here's just another option that might work for you,

The HTML Clipboard

Dim App As femap.model
Dim eSet As femap.Set
Sub Main

    Set App = feFemap()

    Set eSet = App.feSet

    eSet.AddAll(FT_ELEM)

    Call list()
    
End Sub

Private Sub list()

    App.feAppMessage(FCM_ERROR, "There are" + Str$(eSet.Count) + " elements in the model")

End Sub