What is the best way in VBA to retrieve the name of only the LAST "Model" component in a assembly tree.
Dim swApp As SldWorks.SldWorks
Dim Part As SldWorks.ModelDoc2
Dim theFeature As SldWorks.Feature
Dim featCount As Long
Dim i As Long
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
featCount = Part.GetFeatureCount
For i = featCount To 1 Step -1
Set theFeature = Part.FeatureByPositionReverse(featCount - i)
If Not theFeature Is Nothing Then
If "Reference" = theFeature.GetTypeName2 Then
2016 SOLIDWORKS API Help - FeatureByPositionReverse Method (IModelDoc2)
i saw that, how to i retrieve Just the last model name...don't really need to populate a whole array for just one model...or is that the only way?
Retrieving data ...