- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
As the title suggests, I'm wondering if it's possible to build a macro that would read a list of parts from a document of some variety (spreadsheet or text, I could probably work with either) and automatically start an assembly with those parts included. I've done some searching online and managed to find a couple of pieces of code that are close to what I'm going for, but there is a bit of a snag on them.
My ideal setup would be to have a simple list of part numbers/assemblies in either spreadsheet or text format like below:
123455
SubAssembly4
196745
Part1
Part7
The goal would be to write a macro that would read in that list of parts, search for them in Vault, then import them into an assembly if they are found/exist. The main issue I have with the code I've found so far is that most snippets want the full path to the part in the text/spreadsheet, so instead of just being Part1, they want it to be "C:\CAD Models\Project5\Part1.ipt". This is an issue for a couple of reasons. The first is that I'm trying to use our ERP software to output a BOM from a sales order, and it knows nothing about the files, just the part numbers. The second is that I would prefer to open them from Vault anyway. Our vault is also structured in such a way that we have different folders for a range of part numbers, they aren't all collectively in a single folder (so part xyz might be in Vault folder "Parts T-Z" and part abc might be in folder "Parts A-F" for instance, so I need to search all the subfolders in Vault for the part number in the list.
In my head this seems like a very straightforward thing (read in a list of parts and auto-generate an assembly from it), but in practice I'm having a hard time figuring out where to start and if it's even possible with the setup currently in use at my company. Any advice or ideas regarding this one?
Solved! Go to Solution.