AnsweredAssumed Answered

How to get a StructuralMember name by choosing the face on the screen?

Question asked by Sanya Shmidt on Jul 1, 2016
Latest reply on Jul 8, 2016 by Sanya Shmidt

Hello Guys!

Can someone help me here .


I need to get a Structural Member Name, what I have so far gives me a name if I choose it on the feature tree, if I choose the face in the model it doesnt work.

I guess I need to find a parent of the selected face/feature. Any ideas?


Dim swApp As Object

Dim Part As Object

Dim swSelMgr As SldWorks.SelectionMgr

Dim swFeat As SldWorks.Feature

Dim boolstatus As Boolean



Sub main()

Set swApp = Application.SldWorks

Set Part = swApp.ActiveDoc

Set swSelMgr = Part.SelectionManager

Set swFeat = swSelMgr.GetSelectedObject6(1, -1)



MsgBox (swFeat.Name)