Feature index in SW Feature tree ?

Feature index in SW Feature tree ?

Post by aditya.utt » Tue, 04 Apr 2006 21:43:20


I am novice user of SolidWorks.

Is there a way to obtain the number / index of a given feature in the
SW feature tree ?
e.g. If I have a big part having 20 extrudes and for
discussion-purpose, I need to focus on the 13th extrusion of these 20.
I can't ask people to count the 13th extrusion from top, and so would
like to know if there is provision of uniquely identifying the feature
with an index.

It is possible to identify features from their names, but this is not
applicable for some of my models which are created in a different
language. In that case, the feature-name is seen as "sss-ss-sss" [where
s represents a square]

One decent way I could think of is to identify the feature-index of a
given feature in the SW feature tree. So while talking about that
feature in my communication to others, i can say 'feature with
index-no. 54' . But is there something of this kind ? Any suggestions
will help.


Feature index in SW Feature tree ?

Post by Jeff Miris » Tue, 04 Apr 2006 22:03:40

The features are already identified (Extrude1, Extrude2, etc.). If that
doesn't work, you can rename your features but that can be time


Feature index in SW Feature tree ?

Post by aditya.utt » Wed, 05 Apr 2006 00:13:21

Hi Jeff,

I dont want to [rather am not allowed to] edit the model.
Also, the indexing gets goofed up if there has been any redoing,
feature swapping.
And most importantly, the foreign lang. strings which are not
decipherable at all.

Feature index in SW Feature tree ?

Post by TOP » Wed, 05 Apr 2006 02:19:38


Please read Aditya's post more carefully. The features may or may not
be labeled in a language the CAD operator and operating system can
understand. We have this problem with drawings from China where the
Chinese characters come across as gobbledy-gook. So what may be Extrude
1 to you would be n7 to his people.

Unfortunately SW does not provide user accessible numbering of features
and in fact when you obtain an array of features there is no guarantee
that the order will be the same from one time to the next. Naming the
feautures is the only way, but he is not allowed to modify the file. I
think this problem exists because of the nature of the way objects are
stored and retrieved.

Consider for example what happens if you create an extrude. The first
time you create it it will be Extrude 1. If you delete it and recreate
it it will be Extrude 2 and so on. You can also roll back and create
Extrude 3 prior to Extrude 2 in the feature tree.

The only sure fire way I have ever seen to positively identify features
was written by Phillipe G. as part of his Assygator software from the
now defunct Dynabits company.

Feature index in SW Feature tree ?

Post by Bo » Wed, 05 Apr 2006 02:45:49

Select the Part Name at the top of the Feature Tree & Right Click

Go down to the Tree Display/Show Feature Descriptions & make sure it is


Feature index in SW Feature tree ?

Post by aditya.utt » Wed, 05 Apr 2006 14:22:59

Hi Bo,

This is a decent way of distinctly marking the feature, but I guess it
will help only if part-editing is allowed.
Even otherwise, could you tell if SW offers a 'find-feature' kind of
provision or a way to zoom-in to the feature that has a given name/
I deal with parts having 200+ features some times. Even if I rename or
add description to a feature saying 'Distinct_feature', how do I
quickly zoom-in to this feature the next time I open the part ?


Feature index in SW Feature tree ?

Post by TOP » Wed, 05 Apr 2006 18:30:40

Right click on the topmost icon in the feature tree and look for GoTo.
GoTo is the SW search function.

Feature index in SW Feature tree ?

Post by Bo » Wed, 05 Apr 2006 23:11:03

I don't quite understand your note of "distinctly marking the
feature". One section of the Preference for each feature is a name you
can assign, which you noted is in a foreign language. The Second is
the name that is ASSIGNED BY SolidWorks so IT can keep internal track
of Features.

When a Feature is selected in the Feature Manager, that part of the
model is highlighted, and is generally fairly easy to see on most
models, but I realize that is a generalization that doesn't always
work, so the "GoTo" can work better in that case.


Feature index in SW Feature tree ?

Post by aditya.utt » Thu, 06 Apr 2006 01:17:16

Hi TOP/Bo,

Thanks for suggesting 'Go To ...'. That helps.

Coming back to my original problem of finding a way of uniquely
identifying a feature in SW feature-tree without editing the model, I
guess writing a macro may serve the purpose. Through the macro, i hope
it is possible to skim through the feature tree from top to bottom
while maintaining the feature-count [ i guess a sketch is also a
feature in this context]. When the selected feature is encountered, the
feature-count is popped as a message saying 'Index of the selected
feature is xy' (say 23)

The person on the other side [to whom the index is conveyed] can also
make use of this macro and locate the feature with index 23 on the same

Going a step ahead, i guess, it will be possible to get index of
extrude-features, fillet features in a given part.


Feature index in SW Feature tree ?

Post by Bo » Thu, 06 Apr 2006 02:59:37

Sometimes as a new user somethings are not obvious.

If you click on the first Feature in the part in the Feature Manager
tree, then click down the list, you can cycle through all the features
one at a time and watch the feature highlight on the screen so you can
identify features, whether in wireframe or shaded mode.

If a person missuses the feature name, they can combine their given
feature name with the assigned name, and then they are one and the
same. I've made that mistake when I first used SolidWorks. In that
case, you really need to work with the model creator to separate the
"Name" (user assigned) from the Description (Solidworks default) in the
Feature's "Feature Properties" (right click on Feature).


Feature index in SW Feature tree ?

Post by TOP » Thu, 06 Apr 2006 09:53:54

The API will give a feature count in a model. And you can loop through
an array of features. But you are not guaranteed that the same feature
will always be in the same place. I was playing with a macro that makes
the description a sequential number. It also puts a time stamp on the
feature. Once you do this you can tell when something is moved and
something of the original history of the part. Subsequent operations
can change the order of the features so that the original numbering is
lost. There is also a way to invisibly attach data to a feature such
that the user would not be able to see it without a special program.
This is what greenhex does in swCP.