Firstly, I am concentrating only on SJP (SolidWorks Job Pricing).
Currently I have not really touched assemblies I am currently concentrating fully on parts only.
I have found that there is no API function to get the mass / volume / weight of a feature within a part. Luckily the way around this is that you can exclude suppressed features from the calculation of mass. So at the product I am implementing the following algorithm;
1. Iterate through all features for a part.
2. Save material type for part when detected
3. For the first feature that is type extrude save this feature as the Blank feature.
3a. Supress the Blank feature and all of its children (ie all other cuts etc).
3b. Unsuppress the Blank itself so that it is now the only feature unsupressed.
3c. Get model mass and save this away as the "blank" weight.
4. For each subsequent feature:
4a. Unsupress feature
4b. Get model mass
4c. Feature mass = Blank mass - current model mass
FutureAll of this should be done by tomorrow - after that is:
1. the relatively easy job of associating a price with a material
2. the relatively easy job of associating a multiplier with a machining operation type (ie cut , grind etc)
3. the harder job of handling folders to deliniate operator handling.
4. the untested job of processing assemblies of parts and then assemblies of assemblies of parts.
5. working out how to actually put new buttons into SW to actually execute and display job information and what format that should take.