×
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

Insert Component Patern Feature Driven

Insert Component Patern Feature Driven

Insert Component Patern Feature Driven

(OP)
I have been using feature driven patterns in my assembly for many repeat hardware components with great success. But then I download another component from Mcmaster, inserted it and mate it, then I do Insert Component Patern / Feature Driven, and it misaligns to the feature pattern. In this case the component is a spring pin and the features are 10-32 tapped holes put in with the hole wizard.

Maybe feature driven components don't like hole wizard tapped holes!!

any thoughts

Tom Malinski
Sr Design Engineer
OKay Industries
New Britain CT

RE: Insert Component Patern Feature Driven

How is it mis-aligning?

Are you mating the seed component to the seed Hole Wizard hole?

cheers

RE: Insert Component Patern Feature Driven

(OP)
I figured out a fix, apparently the inserted component must be in the seed position of the feature. then they all aligned properly. This sounds like a quirk thiugh because I have never paid attention to this and never had a problem

Tom

Tom Malinski
Sr Design Engineer
OKay Industries
New Britain CT

RE: Insert Component Patern Feature Driven

(OP)
thanks CBL, I just figured this out

Tom Malinski
Sr Design Engineer
OKay Industries
New Britain CT

RE: Insert Component Patern Feature Driven

Yes.  For a hole wizard to drive a feature-driven component pattern the seed component must be mated to the first hole of the hole wizard feature.  The "first hole" is the first sketch point placed in the hole location sketch.  There's really no way to tell which hole is the first one (unless you remember which one it was) until you do the feature-based pattern.  If you find that you've placed the component in the wrong hole, just re-mate it to the correct hole.  If you use feature-based patterns on hole wizard holes often, give this macro a try.  I posted it once a long time ago, but I can't remember where.  If you select a hole wizard feature of a part in an assembly and run the macro it will highlight the first hole in the feature.  You can then mate your seed component to it.  Selection can either be the surface of a hole or you can find the hole wizard feature in the design tree and pick it there.  Hole surface is much easier, though.  smile

CODE

Sub FindFirstHole()
Dim swApp As SldWorks.SldWorks
Dim SelMgr As SldWorks.SelectionMgr
Dim swDoc As SldWorks.ModelDoc2
Dim SelType As SwConst.swSelectType_e
Dim sMsg As String
Dim i As Long
Dim fSelFeature As SldWorks.Feature
Dim myHwFeature As SldWorks.Feature
Dim FaceArray As Variant
Dim EdgeArray As Variant

Const MINSELECTIONS = 1

Set swApp = Application.SldWorks
Set swDoc = swApp.ActiveDoc
Set SelMgr = swDoc.SelectionManager

If SelMgr.GetSelectedObjectCount2(-1) > 1 Then
    MsgBox "Please select one Wizard hole"
    swDoc.ClearSelection2 True
End If

If SelMgr.GetSelectedObjectCount2(-1) < 1 Then
    While SelMgr.GetSelectedObjectCount2(-1) < 1
        DoEvents 'Wait
    Wend
End If

If SelMgr.GetSelectedObjectType3(1, -1) = swSelBODYFEATURES Then
    Set fSelFeature = SelMgr.GetSelectedObject6(1, -1)
ElseIf SelMgr.GetSelectedObjectType3(1, -1) = swSelFACES Then
    Set fSelFeature = SelMgr.GetSelectedObject6(1, -1).GetFeature
Else
    MsgBox "Select a hole wizard feature to use this function"
    Exit Sub
End If

If fSelFeature.GetTypeName <> "HoleWzd" Then
    MsgBox "Feature is not hole wizard"
    Exit Sub
End If

FaceArray = fSelFeature.GetFaces

'select the first face in the array.  It's probably the first hole.
FaceArray(0).Select False

EdgeArray = FaceArray(0).GetEdges
For i = 0 To UBound(EdgeArray)
    EdgeArray(i).Select True
Next i

'swDoc.ViewZoomToSelection

End Sub

RE: Insert Component Patern Feature Driven

(OP)
thanks Handleman, nice of you to post this. I'll give it a try

Tom Malinski
Sr Design Engineer
OKay Industries
New Britain CT

RE: Insert Component Patern Feature Driven

It is very easy to figure out which is the first seed hole of a hole wizard feature.

Just double click on the hole wizard feature in the feature tree.  The hole location that has all the dimensions that define the hole feature is your seed hole.

I use the hole wizard a lot for the tools we design.  I am in the habit now of placing the first hole wizard point in the upper left corner of my sketch, then adding points from there.  That way when I go to add the feature driven patterns I know where to generally look for the seed hole.

Regards,

Anna Wood
SW07 SP2.1, WinXP
Dell Precision 380, Pentium D940, 4 Gigs RAM, FX3450
WD Raptors, 1 Gb network connection
http://designsmarter.typepad.com/solidmuse

RE: Insert Component Patern Feature Driven

By gum, yer right!  Coulda saved myself some coding if I'd noticed that before!  Have a star.

RE: Insert Component Patern Feature Driven

There's still value to handlemans method if you want to assign this function to a shortcut.

Matt
CAD Engineer/ECN Analyst
Silicon Valley, CA
http://sw.fcsuper.com/index.php

RE: Insert Component Patern Feature Driven

Well, not particularly.  You can double-click on any surface of the hole wizard hole.  That's quicker (or just as quick) as selecting the surface and hitting a keyboard shortcut.

RE: Insert Component Patern Feature Driven

Honestly, I'm trying both methods right now.  The double click method is fine, but not clean.  Dimensions are all over the place, and I have to sift through to find the depth and OD.  Your code provides simple clean highlight, along with error handling to tell me when I'm not selecting a hole pattern (like when I have a linear pattern referencing a hold pattern).  Mind if I host of copy of this macro on my website?

Matt
CAD Engineer/ECN Analyst
Silicon Valley, CA
http://sw.fcsuper.com/index.php

RE: Insert Component Patern Feature Driven

That's true.  I'll probably keep using the macro myself since it's what I'm used to.  OHDH.

Consider this an open invitation to put any code I've posted here on your website.  Just include a plug for Eng-Tips!

RE: Insert Component Patern Feature Driven

Thanks handleman.... smile, The macro is pretty cool too.

fcsuper, I have never had to much trouble distinguishing the seed hole when I clicked on the hole wizard feature.  Granted I may not be able to read the depth and OD dimensions.  Don't need to.... I am just looking for the hole with the more dimensions then all the rest.

Just what I have gotten used to over the last few years.... smile

Regards,

Anna Wood
SW07 SP2.1, WinXP
Dell Precision 380, Pentium D940, 4 Gigs RAM, FX3450
WD Raptors, 1 Gb network connection
http://designsmarter.typepad.com/solidmuse

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