×
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

Macro to count number of specific type of hole?

Macro to count number of specific type of hole?

Macro to count number of specific type of hole?

(OP)
I'm hoping that one of you could tell me that this would work...

I need to be able to count the number of instances of a specific type of hole in an assembly (in the assembly's parts).

I can use a specific name in the FeatureManager for that hole type (i.e. DOWEL HOLE) if that would help the macro to find it.

Instances of that hole feature could have several locations (i.e. more than one hole per feature).

Could it work--a macro to traverse through the parts and count all holes named "DOWEL HOLE" (or some other identification method)?  Please  let me know what you think.  Thanks!

Brian

RE: Macro to count number of specific type of hole?

Would each of the Features be a Hole Wizard or an Cut-Extrude or possibly both?

Ken

RE: Macro to count number of specific type of hole?

(OP)
Always a Hole Wizard.

RE: Macro to count number of specific type of hole?

Quote (brrian):

Could it work--a macro to traverse through the parts and count all holes named "DOWEL HOLE" (or some other identification method)?  Please  let me know what you think.  Thanks!

There is an example in the SW API Help in SW that will traverse all features in a part. Then all you have to do is pick the names that match.

www.engtran.com
www.niswug.org

RE: Macro to count number of specific type of hole?

There is an Example macro in the API help that returns the number of Sketch Points in a Hole Wizard Sketch for a given Feature Name. It is called: Get Sketch Points in Hole Wizard Feature Example (VB)

"If" you already know the Feature Names, you won't have to Traverse the Tree. But I'd guess you'll need to incorporate Traversing the Tree before you're all said and done with this.

Ken

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