Cant get needed information from FeatureManager Design Tree

Hello

I'm trying to get the following information from feature manager design tree: weld lenght, weld bead size, holes (amount, volume), cut extrude/revolve (volume, amount of those features in total), Chamfer (volume, lenght), Fillet (volume, lenghts) & bends.

Problem is that I cant get subFeature working (subFeature = feature.GetFirstSubFeature();), it does list all features from assembly, but doesnt list subfeatures from those parts (which are included in assembly and names of those parts do get listed in subfeatures).

Using this fuction to get sub features:

public void GetSubFeature(Feature feature, int syv)

{

Feature NextFeature;

Feature subFeature = default(Feature);

if (feature != null)

{

  subFeature = feature.GetFirstSubFeature();

  Debug.Print(Indent(syv) + " Feature name: " + feature.Name + " --- Feature type name: " + feature.GetTypeName());

  while (subFeature != null)

  {

   GetSubFeature(subFeature, syv + 1);

   NextFeature = (Feature)subFeature.GetNextFeature();

   subFeature = null;

   subFeature = NextFeature;

   NextFeature = null;

  }

}

}

public static string Indent(int count)

{

return "".PadLeft(count*3);

}

I'm making an add-in which would tell you how much making something would cost (based on prices which come from database). It would be my (software)engineering final year project.

What I have got working so far:

I can get parts from assembly file and read information from those (velocity, mass, surface area).

I'm able to get hole (and other) information using DimXpert, but it seems to give loads of extra information for me. Not going to be very easy to calculate that information which I need and it would be hard to check that that add-in is calculating it correctly.

I short: How can I get weldment information from assembly file ? Is DimXpert the best option for getting those hole/other features out and then try to figure out how to calculate volume from those?

Sorry for a bit long post (might be confusing too). If it lacks something important or is too confusing, please say what you need to know.

Thanks,

Tomi

SolidworksApi macros