Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Insert BOM into Drawing with API???

Status
Not open for further replies.

DohPee

Computer
Jun 25, 2002
12
0
0
ZA
I have written a Small VB App that Creates a drawing From an Open Model and works quite well But I want to create a Bill Of Material And I cannot Find the API hook to do this! I have recorded a macro in SW and looked at the code there and it uses a command - part.InsertBOM ...but nothing like that exists in the VB API and the Macro Code does not work in VB (complains about the InsertBOM command)...Please help!

I also have another problem in connection with getting the PRP value from a drawing but saw a reference in another thread will comment there.

Thanks Guys..
 
Replies continue below

Recommended for you

The InsertBomTable method is only accessible from the View object. You can obtain the View object from the DrawingDoc object.
Code:
retval = View.InsertBomTable (Template, Xloc, Yloc, Errors)
DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
 
DohPee,
What version of SW are you running. I do not beleave that you can insert a BOM through the API in versions prior to 2001+. I am almost certain you can not in 2000. BBJT CSWP
 
I keep forgetting to ask the version...
BBJT, I believe that you are correct. DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
 
Thanx Guys .. Im using SW2001 SP14 ..and your right No Insert BOM For Now...
What I want to try is Run a Macro From my VB app and sendkeys is not really an option as there are two many factors that can influence something going wrong (Namely our design team play with to much s*&t they WILL cause an error.) :)
 
Status
Not open for further replies.
Back
Top