Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Hi @supriya_chaugule . Here's a code example to get a list of faces.

Sub main()
	Dim oDoc As PartDocument = ThisApplication.ActiveDocument
	Dim oFace As Face = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartFaceFilter, "Pick the face")
	If oFace Is Nothing Then Exit Sub
	Dim listFaces As New List(Of Face)
	listFaces.AddRange(GetAdjacentFaces(oFace))
End Sub

Private Function GetAdjacentFaces(oFace As Face) As List(Of Face)
	Dim listFaces As New List(Of Face)
	For Each oEdge As Edge In oFace.Edges
		For Each oEdgFace As Face In oEdge.Faces
			If Not oEdgFace Is oFace Then listFaces.Add(oEdgFace)
		Next
	Next
	Return listFaces
End Function

 

Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor

LinkedIn | My free Inventor Addin | My Repositories

Did you find this reply helpful ? If so please use the Accept as Solution/Like.

EESignature