' This API highlights all solid elements which do not belong to any solid. Sub Main Dim App As femap.model Set App = feFemap() ' Always in every API to connect API with Femap Dim SolidSet As femap.Set Set SolidSet = App.feSet rc = SolidSet.AddAll(FT_SOLID) ' Add all the solids into the set called SolidSet. If rc <>-1 Then Exit Sub End If ' If there are no solids, then exit the API. Dim Solid_ElSet As femap.Set Set Solid_ElSet = App.feSet rc = Solid_ElSet.AddRule(25,FGD_ELEM_BYTYPE) rc = Solid_ElSet.AddRule(26,FGD_ELEM_BYTYPE) ' Add all the linear solid elements (eg bricks) and the parabolic solid elements (eg tetrahedras) to Solid_Elset. rc=Solid_ElSet.RemoveSetRule(SolidSet.ID,FGD_ELEM_ATSOLID) ' Remove from the set all the elements which are associated with all the solids in the model. Dim El_Count As Long El_Count = Solid_ElSet.Count() ' This is the qty of unassociated elements from the set. rc = App.feViewShow( FT_ELEM, Solid_ElSet.ID ) ' Highlight all the elements in the set - these are the solid elements which are not associated with a solid. Msg = "The number of unassociated solid elements is" +Str$( El_Count ) rc = App.feAppMessage(FCM_NORMAL, Msg) ' Show in the message window how many solid elements are unassociated. rc = Solid_ElSet.Select(FT_ELEM,False, "PRESS OK to allow retrieval using PREVIOUS." ) ' THIS BRINGS UP THE ENTITY SELECTION DIALOG WITH THE LIST OF UNASSOCIATED ELEMENTS SHOWN. ' THIS IS SIMPLY SO THAT IN A SUBSEQUENT COMMAND THE ELEMENTS CAN BE IMMEDIATELY SELECTED USING THE ' PREVIOUS BUTTON IN THE SELECTION DIALOG - fOR EXAMPLE. DELETE | MODEL | MESH -> PREVIOUS End Sub