×
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 select all edges connected edge and fillet them all

Macro to select all edges connected edge and fillet them all

Macro to select all edges connected edge and fillet them all

(OP)
Hi all,

I have been experimenting with writing a macro to do the following. I want be able to select and edge within solidworks, then play a macro which will then automatically select all connecting edges to my preselected edge and apply a fillet to them all. (The reason is i cannot quickly use the the filletxpert feature, as i have 100's of such junctions to fillet per model.)

If i record a macro while doing this manually, it just records the specific edges based on the endpoints (i think), and records the nodal co-ordinates within the macro, which is no good to me becuase the nodal co-ordinates will be different each time. So, I want it to search for the connecting edges within the macro and then add them edges to the list.

Below is what i have so far created so far and works as follows: If an edge is pre-selected, and play this macro, it will apply a 0.3mm rad fillet to it.

Can anyone help me to expand the code to automatically add all connected edges to what is to be filleted?

Kind regards

Noel


 ******************************************************************************
Dim swApp As Object

Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long

Sub main()

Set swApp = _
Application.SldWorks

Set Part = swApp.ActiveDoc
Dim currHiddenEdgeSelectionInHLR As Long
currHiddenEdgeSelectionInHLR = swApp.GetUserPreferenceToggle(swUserPreferenceToggle_e.swEdgesHiddenEdgeSelectionInHLR)
swApp.SetUserPreferenceToggle swUserPreferenceToggle_e.swEdgesHiddenEdgeSelectionInHLR, True
swApp.SetUserPreferenceToggle swUserPreferenceToggle_e.swEdgesHiddenEdgeSelectionInHLR, currHiddenEdgeSelectionInHLR
Dim radiiArray23 As Variant
Dim radiis23() As Double
ReDim radiis23(0 To 0) As Double
Dim setBackArray23 As Variant
Dim setBacks23 As Double
Dim pointArray23 As Variant
Dim points23 As Double
radiiArray23 = radiis23
setBackArray23 = setBacks23
pointArray23 = points23
Dim myFeature As Object
Set myFeature = Part.FeatureManager.FeatureFillet(198, 0.0003, 0, 0, (radiiArray23), (setBackArray23), (pointArray23))
End Sub
 

RE: Macro to select all edges connected edge and fillet them all

Correct me if I'm wrong, but isn't this exactly what the filletxpert was created for?

Jeff Mirisola, CSWP
Design Manager/Senior Designer
M9 Defense
My Blog

RE: Macro to select all edges connected edge and fillet them all

(OP)
Hi Jeff,

yes it is, and the filletxpert can select all connected edges, just like i want, but like i said above, the issue i have is that that is too impractical on the large lattice-like models i have where only certain intersections out of the lattice (about 800 out of 3000) are to be filleted. I would have to at each intersection select an edge and then go into the filletexpert, and wait for the floating toolbar to appear and then the "connected" icon to light up, and only then proceed (screen flashes for some time during this) Its not a ridiculous amount of time, but a macro would definetly help.

cheers

Noel

RE: Macro to select all edges connected edge and fillet them all

(OP)
...the problem i have is i havent been able to check for CONNECTING EDGES? Does anyone know how to do this in a macro?....

kind regards

Noel

RE: Macro to select all edges connected edge and fillet them all

Have you tried selecting faces instead of edges for fillets?  Sounds like you don't care much about the end conditions.

James Spisich
Design Engineer, CSWP

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