Cancel
Showing results for 
Search instead for 
Did you mean: 

FEMAP API Solid hide action

Creator
Creator

Hello everyone,
I am working on script that will hide solids based on volume. However, I can not find method, or property that responsible for doing this action.
I found a method in aplication object - .feEntitiyVisabilty2, but it is not clear to me how to use it.
May be someone can give me an example or tip how to do it in other way?
I work in FEMAP 11.4.2
Thanks in advance)))

4 REPLIES 4

Re: FEMAP API Solid hide action

Siemens Phenom Siemens Phenom
Siemens Phenom

Here's an example for hiding solids under a user specified volume. It used the Draw/Erase Object. It loops through all solids hides the solids over specified value. In FEMAP Version 12 there is a new method for sets, .AddBySize that will make this faster. 

 

The HTML Clipboard

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

    Dim solSet As femap.Set
    Set solSet = App.feSet

    Dim solHide As femap.Set
    Set solHide = App.feSet

    Dim sol As femap.Solid
    Set sol = App.feSolid

    Dim DE As femap.DrawErase
    Set DE = App.feDrawErase

    Dim vol As Double
    Dim sID As Long
    Dim Ar As Double
    Dim sVol As Double
    Dim cg As Variant
    Dim iSol As Variant

    App.feGetReal("Specify Volume Limit", 0.0, 10000000.0, vol)

    solSet.AddAll(FT_SOLID)

    While solSet.Next
        sID = solSet.CurrentID
        sol.Get(sID)
        sol.MassProp(Ar, sVol, cg, iSol)

        If sVol > vol Then
            solHide.Add(sID)
        End If


    Wend

    DE.EraseSet(FT_SOLID, solHide.ID, True, True, True)
    
End Sub

Re: FEMAP API Solid hide action

Siemens Phenom Siemens Phenom
Siemens Phenom

How about feEntitySetVisibility( ) or feEntitySetVisibility2( ) on the application object?

Re: FEMAP API Solid hide action

Creator
Creator

Thank you for your answer. 
Your script is totaly well, and solve my problem. 

Re: FEMAP API Solid hide action

Creator
Creator

I wanted to use it but it is not clear to me how it works. 
Could you please provide me an example of code tiwh this method?