I have uploded an inventor file using autodesk forge (API) which have a structure of assembly, subassembly and parts. I want to count total number of part in the assembly without counting assembly and subassembly.
I am using follwing method to count totalelements = getAllLeafIdsOfParentId(viewer.model.getData().instanceTree.getRootId()) to get all the nodes in the model. But it counts assembly and subassembly also.
2nd part of question is that if I get only the parts node then I would like to push only the part nodes to an array and block the assembly and subassembly nodes. If the user select an assembly by mistake instead of the parts, it will not allow to push that assembly to percular array of objects. Hope I have put a clear question to undertand. Thank you.