Retrieve the Weld Length Property

Hello
In one assembly, I used the " weld seam" function.
I want to retrieve the value of the " total weld length" property in my custom properties.
But I don't know how to properly call the " LENGTH " property that is supposed to bring this value up.
Capture d’écran 2024-07-18 122628

Is there a document that explains in detail how to use the Property Manager?

Thank you in advance for your feedback!

Hello tdubedout,
Welcome to the forum, here is what I can bring you, hoping to have helped a little, Lol.


Good luck.
@+.
AR.

5 Likes

Hello, thank you for this feedback but I would like to get this info without going through a plan.
I'll continue my research!

Hello

Normally, you can also display BOMs in assemblies without going through drawing. It will be displayed in the 3D see photo in PC

1 Like

Hello tdubedout,
You can try this macro:

Option Explicit
Sub main()
    Dim swApp As SldWorks.SldWorks
    Dim swModel As SldWorks.ModelDoc2
    Dim swWeldFolder As SldWorks.CosmeticWeldBeadFolder
    Dim swFeat As SldWorks.Feature
    Dim swSubFeat As SldWorks.Feature
    Dim Msg As String
    Msg = ""
    Set swApp = Application.SldWorks
    Set swModel = swApp.ActiveDoc
    If swModel Is Nothing Then MsgBox "Ouvrir un assemblage": Exit Sub
    If swModel.GetType <> swDocumentTypes_e.swDocASSEMBLY Then MsgBox "Ouvrir un assemblage": Exit Sub
    Set swFeat = swModel.FirstFeature
    While Not swFeat Is Nothing
        If swFeat.GetTypeName2 = "CosmeticWeldCutList" Then
            Set swSubFeat = swFeat.GetFirstSubFeature
            While Not swSubFeat Is Nothing
                Set swWeldFolder = swSubFeat.GetSpecificFeature2
                Msg = Msg & swWeldFolder.TotalNumber & " cordon de longueur totale: " & Round(swWeldFolder.TotalLength) & "mm" & vbCrLf
                Set swSubFeat = swSubFeat.GetNextSubFeature
            Wend
        End If
        Set swFeat = swFeat.GetNextFeature
    Wend
    MsgBox Msg
End Sub
1 Like