Cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically Delete Unused Properties

Valued Contributor
Valued Contributor

Is there anyway FEMAP can automatically delete properties in the database which have no elements referenced?

 

I'm thinking this may be an API task. 

 

thanks

 

Stresmman

5 REPLIES

Re: Automatically Delete Unused Properties

Siemens Phenom Siemens Phenom
Siemens Phenom

Delete - Property, Select All, unless they're being used as reference on geometry somewhere in the model, any used properties will be deleted, and anything being used will be skipped.

Re: Automatically Delete Unused Properties

Valued Contributor
Valued Contributor

Thank you, and while we are on the topic:

 

Would I follow the same methodology to delete unused nodes?

 

Delete > Nodes > select all?

 

 

Re: Automatically Delete Unused Properties

Valued Contributor
Valued Contributor

Is there a way for FEMAP to tell me which node IDs were deleted when performing the delete > nodes > select all?

 

Currently it just states the number of nodes deleted and no IDs.

Re: Automatically Delete Unused Properties

Siemens Phenom Siemens Phenom
Siemens Phenom

Here's an API you can add to your Custom Tools that will do it -

 

The HTML Clipboard

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

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

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

    rc = ndSet1.AddAll( FT_NODE )
    rc = App.feDelete( FT_NODE, ndSet1.ID )
    rc = ndSet2.AddAll( FT_NODE )

    rc = ndSet1.RemoveSet( ndSet2.ID )

    Dim ndID As Long

    rc = ndSet1.Reset
    ndID = ndSet1.First
    While ndID > 0
        Msg = "Node" + Str$( ndID ) + " deleted..."
        rc = App.feAppMessage( FCM_NORMAL, Msg )
        ndID = ndSet1.Next

    Wend
End Sub

Re: Automatically Delete Unused Properties

Valued Contributor
Valued Contributor

Thanks masherman

 

I really need to learn the API.

 

I'm somewhat familiar programming in C++

 

Could you provide any good resources to get started with learning the API/VBA?