Convert Entities

Use this space to ask how to do whatever you're trying to use SolidWorks to do.
User avatar
SPerman
Posts: 2068
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2246
x 1889
Contact:

Convert Entities

Unread post by SPerman »

Is it possible to have Convert Entities convert the entire face at once? I always have to run the command at least twice if there is an inner loop. (And if I do the outer loop first, I have to select the inner edges one at a time. I can't just select the face.)
by Alin » Thu Feb 10, 2022 8:49 am
So, the current solution is to run Intersection Curve instead of Convert Entities. It will capture all edges that are laying on the sketch plane.

It is also a much more robust feature than Convert Entities. If new holes are added on that face, they will be automatically captured by a rebuild operation.
Go to full post
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
Alin
Posts: 313
Joined: Sun Mar 14, 2021 9:46 am
Answers: 3
x 265
x 391

Re: Convert Entities

Unread post by Alin »

If it is a planar face, coincident to the sketch plane, use the Intersection Curve.
Alin
Posts: 313
Joined: Sun Mar 14, 2021 9:46 am
Answers: 3
x 265
x 391

Re: Convert Entities

Unread post by Alin »

Also this:

Image

Image
image.png
Attachments
image.png
image.png (15.77 KiB) Viewed 2462 times
User avatar
SPerman
Posts: 2068
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2246
x 1889
Contact:

Re: Convert Entities

Unread post by SPerman »

That gives me the inner loops, but I have to run the command again to get the outer loops. Am I doing it wrong? (click on GIF below)
convert.gif
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
Alin
Posts: 313
Joined: Sun Mar 14, 2021 9:46 am
Answers: 3
x 265
x 391

Re: Convert Entities

Unread post by Alin »

SPerman wrote: Wed Feb 09, 2022 2:01 pm That gives me the inner loops, but I have to run the command again to get the outer loops. Am I doing it wrong? (click on GIF below)

convert.gif
Try to check the box first.

Image
Attachments
image.png
image.png (16.92 KiB) Viewed 2444 times
User avatar
SPerman
Posts: 2068
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2246
x 1889
Contact:

Re: Convert Entities

Unread post by SPerman »

That still only selects the inner loop for me. (2020 SP5)
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
Alin
Posts: 313
Joined: Sun Mar 14, 2021 9:46 am
Answers: 3
x 265
x 391

Re: Convert Entities

Unread post by Alin »

SPerman wrote: Wed Feb 09, 2022 2:36 pm That still only selects the inner loop for me. (2020 SP5)
But you have only one inner loop.
Alin
Posts: 313
Joined: Sun Mar 14, 2021 9:46 am
Answers: 3
x 265
x 391

Re: Convert Entities

Unread post by Alin »

SPerman wrote: Wed Feb 09, 2022 2:36 pm That still only selects the inner loop for me. (2020 SP5)
Send me the file, please.
User avatar
SPerman
Posts: 2068
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2246
x 1889
Contact:

Re: Convert Entities

Unread post by SPerman »

I want it to select the inner and outer loops at the same time.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
Frank_Oostendorp
Posts: 223
Joined: Tue Mar 09, 2021 7:25 am
Answers: 3
Location: Netherlands
x 185
x 230

Re: Convert Entities

Unread post by Frank_Oostendorp »

Alin wrote: Wed Feb 09, 2022 2:18 pm Try to check the box first.

Image
I am curious as well, is there a way to select all loops (inner and outer) to convert their entities to a sketch, Alin?
User avatar
RonE
Posts: 32
Joined: Wed Nov 17, 2021 10:02 am
Answers: 4
Location: Germany
x 18
x 33

Re: Convert Entities

Unread post by RonE »

I think currently the UI doesn't provide a way to do it but API does. :D

Code: Select all

Option Explicit

Sub main()

    Dim swApp As SldWorks.SldWorks
    Dim swModel As ModelDoc2
    Dim swSelMgr As SelectionMgr
    Dim swFace As Face2
    Dim EdgeArr() As Edge
    Dim swSketch As Sketch
    Dim swSketchManager As SketchManager

    Set swApp = Application.SldWorks
    Set swModel = swApp.ActiveDoc
    
    If swModel Is Nothing Then Exit Sub
    
    Set swSketch = swModel.GetActiveSketch2
    Set swSketchManager = swModel.SketchManager
    Set swSelMgr = swModel.SelectionManager
    If swSelMgr.GetSelectedObjectType3(1, -1) = swSelectType_e.swSelFACES Then
        Set swFace = swSelMgr.GetSelectedObject6(1, -1)
    End If
    
    If swSketch Is Nothing Then Exit Sub
    If swFace Is Nothing Then Exit Sub

    EdgeArr = swFace.GetEdges
    If IsEmpty(EdgeArr) Then Exit Sub
    
    swModel.Extension.MultiSelect2 EdgeArr, False, Nothing
    
    swSketchManager.SketchUseEdge2 False

End Sub
User avatar
DanPihlaja
Posts: 857
Joined: Thu Mar 11, 2021 9:33 am
Answers: 25
Location: Traverse City, MI
x 814
x 986

Re: Convert Entities

Unread post by DanPihlaja »

Alin wrote: Wed Feb 09, 2022 2:37 pm But you have only one inner loop.
He is trying to grab both the inner loops and the outer loops at the same time
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
Alin
Posts: 313
Joined: Sun Mar 14, 2021 9:46 am
Answers: 3
x 265
x 391

Re: Convert Entities

Unread post by Alin »

Alin wrote: Wed Feb 09, 2022 2:18 pm Try to check the box first.

Image
I stand corrected. The Property manager reports all entities are selected, but the command converts only the inner contours. o[
Alin
Posts: 313
Joined: Sun Mar 14, 2021 9:46 am
Answers: 3
x 265
x 391

Re: Convert Entities

Unread post by Alin »

So, the current solution is to run Intersection Curve instead of Convert Entities. It will capture all edges that are laying on the sketch plane.

It is also a much more robust feature than Convert Entities. If new holes are added on that face, they will be automatically captured by a rebuild operation.
User avatar
SPerman
Posts: 2068
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2246
x 1889
Contact:

Re: Convert Entities

Unread post by SPerman »

Alin wrote: Thu Feb 10, 2022 8:49 am So, the current solution is to run Intersection Curve instead of Convert Entities. It will capture all edges that are laying on the sketch plane.

It is also a much more robust feature than Convert Entities. If new holes are added on that face, they will be automatically captured by a rebuild operation.
That's great to know. I will use that in the future.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
Post Reply