I have recently decided to begin compiling all my component and assembly drawings into one file instead of individual files. It may take slightly longer to save and load but in the long run I find its much much easier and cleaner to manage. Obviously I have a schedualed backup to USB HDD twice a day to help eliminate the risk of loosing my work.
Anyway, to the point..... I arrange my drawings with an isometric view of the complete assembly as the first page, with baloons and subsequent BOM. Previously I have gone through and added page numbers to each drawing (When using individual drawings) and then manually added the corrosponding page number to the part row in the BOM. As my latest project will consist of 150+ part drawings this will be a horrificly labour intensive process! Time I just havent got.
Considering I am now using one file with multiple sheets to house all my drawings, is there any way to add the sheet number for each part drawing to the corrosponding part in the BOM for that part assembly drawing? I presume this could be done using a macro and a for loop to carry out the following sequence:
1. Add additional column to BOM
Loop for each BOM Row:
1. Save DWG NO bom value (Custom property assigned in part model) to a variable
2. Find corrosponding sheet name (My sheet names are the DWG NO) in document
3. Save the page no for that sheet into variable.
4. Add this saved variable into the corrosponding row for that part in the BOM.
5. Move onto the next row.
6. Stop once complete.
Am I along the right sort of track here?
I have done a small amount of VBA before, but have no clue about the solidworks code side of things.
I would be greatful if someone could point me in the right direction with this.