VBA noob! Count parts, calculate range boxes, volumes, weights and other stuff

VBA noob! Count parts, calculate range boxes, volumes, weights and other stuff

Anonymous
Not applicable
423 Views
1 Reply
Message 1 of 2

VBA noob! Count parts, calculate range boxes, volumes, weights and other stuff

Anonymous
Not applicable

Hello to everyone!

Just to make clear, I’m very new to API and coding in general, so please try to explain to me in a way you would explain it to a schoolkid.

I want in any active assembly that I load to do the following things:

  • Count the parts, identify file names of each part but also to check cases of multiple part insertions.
  • Calculate the range box (boundary box) for each part and also of the assembly.
  • Calculate the volume and the weight of each part.
  • Now for that I don’t know if there is a way that can be done. I want to pop up a short list with 3 materials (steel, brass, aluminum) so the user can select. I want to set costs for each material (i.e. brass: 5€/kg) so I can calculate costs for each part from their weights I found previously.
  • For each of those steps I want to create reports on excel

PS. The simplest the code is, the better for me to develop it in time!

 

It will be great if there was a short explain inside the code so I can understand it and I could intervene to be helped to learn the whole philosophy of VBA.

 

Thank you in advance!

0 Likes
424 Views
1 Reply
Reply (1)
Message 2 of 2

Martin-Winkler-Consulting
Advisor
Advisor

@Anonymous

Your wish list includes many points and if you want to program this yourself in VBA you should start point by point. What you described is possible. You should first deal with the BOM list in an assembly. There is already a lot of information in there that you would like to have.
I also recommend the blog of modthemachine and inventorfaq.

Martin Winkler
CAD Developer
Did you find this post helpful? Feel free to like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature

0 Likes