Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Deleting Bill Of Materials Table using VB code.

Status
Not open for further replies.

dcmoore

Mechanical
Dec 8, 2004
30
We cannot seem to figure out how to delete a bill once it is inserted in a slddrw. Anyone know how to delete a bill using VB6.0 code.
 
Replies continue below

Recommended for you

Right-click on it, delete/table

Chris
Sr. Mechanical Designer, CAD
SolidWorks 05 SP3.1 / PDMWorks 05
ctopher's home site (updated 06-21-05)
FAQ559-1100
FAQ559-716
 
So anyways, we did look at the macro but in the macro it gives u a part active thingy when you select it. Basically we need to figure out how to select the bill automatically without using ur mouse. As in code opens drawing, code searches for bill, code finds bill and code selects bill and hides it. You know what I mean?
 
Select the table (in code) and use ModelDoc2.DeleteSelection to delete it.
 
OK. but we dont know how to select the table in code is the main problem.
 
The Get Table Annotation and Contents Example in the help shows how to do this.
 
dcmoore

The example Stoker refers to will show you hold to get the Table Annotation Object. I believe you will also need to use:

BomTableAnnotation::BomFeature

BomFeature::GetFeature

Feature::Select2

to actually select the table so you can use ModelDoc2::DeleteSelection (or ModelDoc2::EditDelete).

Regards,

Regg

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor