Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations JAE on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

BOM manipulation

Status
Not open for further replies.

dogarila

Mechanical
Joined
Oct 28, 2001
Messages
594
Location
CA
I have a macro that starts from an Excel file, connects to SW, finds and opens an Excel-based BOM, reads the information, then goes back to Excel and populates the file with the content of the BOM. Obviously this macro doesn't work with the new built in BOM. Is there a way I could achieve the same with this new BOM type? What should I use instead of:

retval = View.GetBomTable ( )


to get the same result?
 
I've has that problem also, inserting templates and they change. I turned it in to my VAR and SW 2 weeks ago, still no reply.

Chris
Sr. Mechanical Designer, CAD
SolidWorks 05 SP0.1 / PDMWorks 05
ctopher's home site
 
We are still using the Excel based BOM because its smaller. The wide columns are my biggest beef with the SW based BOM. Drawing space is hard to come by on 11x17 paper so the smaller the BOM the better.

I'm sort of bummed out with the new SW2005 release though because the Excel BOM don't seem to update custom property columns. We are having to delete the existing Excel BOM and replace it new to get it to update.
 
Based on Regg response in this thread559-119636 I inserted these lines (in blue) in the code:

Code:
 Do While Not swView Is Nothing
        Set swTable = swView.GetFirstTableAnnotation
        Do While Not swTable Is Nothing
 [b][COLOR=blue]         If swTable.Type = 2 Then[/color][/b]
            ProcessTable swApp, swModel, swTable
[b][COLOR=blue]          End If[/color][/b]
            Set swTable = swTable.GetNext
        Loop
             Set swView = swView.GetNextView
    Loop

Now my macro processes only BOMs and ignores other type of tables.
 
MrMiller,
I do not know if this will help, but we had the same problem with our Excel BOM not updating. What I had to do was turn on our main view, that was off the sheet, we used to create our BOM. We would put a configuration on the face of the drawing and the full default view hidden off the sheet to create the Excel BOM and fill in the title block.


Bradley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top