×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Deleting Bill Of Materials Table using VB code.

Deleting Bill Of Materials Table using VB code.

Deleting Bill Of Materials Table using VB code.

(OP)
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.

RE: Deleting Bill Of Materials Table using VB code.

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

RE: Deleting Bill Of Materials Table using VB code.

Record a macro of ctopher's suggestion and you may get what you are looking for.

Scott Baugh, CSWP
www.scottjbaugh.com
FAQ731-376

RE: Deleting Bill Of Materials Table using VB code.

(OP)
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?

RE: Deleting Bill Of Materials Table using VB code.

Select the table (in code) and use ModelDoc2.DeleteSelection to delete it.

RE: Deleting Bill Of Materials Table using VB code.

(OP)
OK. but we dont know how to select the table in code is the main problem.

RE: Deleting Bill Of Materials Table using VB code.

The Get Table Annotation and Contents Example in the help shows how to do this.

RE: Deleting Bill Of Materials Table using VB code.

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources