Cancel
Showing results for 
Search instead for 
Did you mean: 

AddRule and AddSetRule Methods don't work with FGD_ELEM_ATSURFACE for Volume Elements (Femap API)

Legend
Legend

Hello,

 

I found, that AddRule and AddSetRule methods don't work with FGD_ELEM_ATSURFACE for Volume Elements. I wrote a small test API to testing:

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

	Dim surfaceSet As femap.Set
	Set surfaceSet =App.feSet
	Dim elemSet As femap.Set
	Set elemSet =App.feSet
	Dim nodeSet As femap.Set
	Set nodeSet =App.feSet

	rc = surfaceSet.Select( FT_SURFACE, True, "Select Surfaces")

	If rc = FE_CANCEL Or surfaceSet.Count=0 Then
		App.feAppMessage( FCM_ERROR, "Surfaces not selected - Cancelled")
		App.feViewRegenerate( 0 )
		Exit Sub
	End If

	rc=elemSet.AddSetRule( surfaceSet.ID, FGD_ELEM_ATSURFACE )
	rc=App.feViewShow(FT_ELEM, elemSet.ID)
	MsgBox(elemSet.Count & " Elements found on selected Surfaces using AddSetRule Method")

	rc=elemSet.Clear
	rc=elemSet.AddRule( surfaceSet.First, FGD_ELEM_ATSURFACE )
	rc=App.feViewShow(FT_ELEM, elemSet.ID)
	MsgBox(elemSet.Count & " Elements found on first selected Surfaces using AddRule Method")

	rc=nodeSet.AddSetRule( surfaceSet.ID, FGD_NODE_ATSURFACE )
	rc=App.feViewShow(FT_NODE, nodeSet.ID)
	MsgBox(nodeSet.Count & " Nodes found on selected Surfaces")

End Sub

This issue occurs in Femap 11.3.2 and Femap 11.4.0 too.

 

Best regards

 

Peter Kaderasz

 

 

 

2 REPLIES

Re: AddRule and AddSetRule Methods don't work with FGD_ELEM_ATSURFACE for Volume Elements (Femap API

Siemens Phenom Siemens Phenom
Siemens Phenom

FGD_ELEM_ATSURFACE is intended for 2D elements, not 3D or volume elements.

 

You should first use the nodes on the surface (FGD_Node_atSurface), then FGD_Elem_byNode.

Best Regards,
Chip Fricke
Principal Applications Engineer - Femap Product Development

Re: AddRule and AddSetRule Methods don't work with FGD_ELEM_ATSURFACE for Volume Elements (Femap API

Siemens Phenom Siemens Phenom
Siemens Phenom

Chip is correct. Volume elements are not "attached" to a surface... only to a Volume/Solid. Only Surface elements are attached to a Surface.