Custom Sheet Metal Properties

Hi all

I regularly design mechanically welded assemblies from which I retrieve the lists of welded parts to integrate them into my drawings.

In these lists of welded parts, I retrieve, through a custom property named "Description" (see pj) the geometric characteristics of my profiles, which I rename according to these characteristics. For example, for a 100x3 square tube with a length of 1544 mm, the body will be called TC100x3... 1544.

On the other hand, it gets complicated when my body is a sheet of metal... I would like to be able to recover the thickness (e.g. 3mm), the length (400 mm) and the width (100 mm) of the unfolded sheet metal to name my body as follows: Sheet metal ep.3... 400x100 .

The body does have the properties Sheet Metal Thickness, Sheet Metal Sidewall Length and Sheet Metal Sidewall Width, but how do I integrate them into the "Description" property?

Thank you in advance for your help.


2019-02-25_10h50_10.png

See this tutorial

http://www.lynkoa.com/tutos/3d/la-concatenation-de-proprietes-dans-solidworks-aout-2014

@+

2 Likes

Thank you for the @gt22 tutorial of our beautiful province.

Zz

Do you have the mycadtools utilities?

2 Likes

Yes, be careful, we're talking about multi-body here...
I don't think $PRP:nom_prp works?

With SMARTPROPERTIES, no worries:


smartproperties.jpg
1 Like

Here is the concatenation made in smartproperties:


smartproperties_exemple.jpg
1 Like

@gt22: I had seen this tutorial, but strangely the concatenation with $PRP: thing doesn't work at all for me...

@max59: Are you on the right track:)

In pj I put you a picture of what I would need. All 3 properties are available but how to integrate them into the "Description" property ?

I have tried several expressions including concatenation, but none of them have worked so far...

 


2019-02-25_19h00_13.png

Recently for a customer (one-off use), we had a similar need: in a mechanically welded part (in the SW sense), displayed long x width in a body property.
We just got the content used to have the length and width and pasted everything in the box we were interested in.

In this case, it would be:
"SW-Length of the flank of tôle@@@... " x "SW-Width of the flank of tôle@@@... " x etc.

1 Like

Hello

I'm a bit late but I've been using the same thing as Stefbeno for a long time, copying the formulas of the desired variables, putting them in a row interspersed with the desired text, it works perfectly
And the values change when copying, copying trees and renaming configs, or I don't see any problem with doing it like that!

@+

stefbeno and Michael yes, except that you have to do the manual handling for each sheet metal...

There must be an expression that allows you to retrieve these values automatically, in the presence of a "Sheet" body, right?

It must be provided for in the document template or in the welded parts list template, for the next parts...

1 Like

All that remains is to copy/paste in the summary of properties:
Example: 
Laser "SW-Sidewall Length of tôle@@@Tole<2>@Pièce1.SLDPRT"x"SW-Sidewall Width of tôle@@@Tole<1>@Pièce1.SLDPRT" ep"SW-Thickness of tôlerie@@@Tole<2>@Pièce1.SLDPRT"

Hello
To be put in the default template.

For existing parts you will have to go through a macro, I made this one personally, for a similar problem:

 


Option Explicit
    Dim swApp               As SldWorks.SldWorks
    Dim swModel             As SldWorks.ModelDoc2
    Dim swFeat              As SldWorks.Feature
    Dim swCustPropMgr       As SldWorks.CustomPropertyManager
    Dim NF                  As String
    Dim Liste               As String
    Dim Final               As String
    Dim st                  As String
    Dim swBodyFolder        As SldWorks.BodyFolder
    Dim swBody               As Body2
    Dim vBody                As Variant
    Dim i           As Integer
Sub main()
  
    On Error Resume Next
  
  
    Set swApp = Application.SldWorks
    Set swModel = swApp.ActiveDoc
    Set swCustPropMgr = swModel.Extension.CustomPropertyManager("")
    
    
    NF = swModel.GetTitle() & ".SLDPRT"
    st = """"
      
    Set swFeat = swModel.FirstFeature
        Do While Not swFeat Is Nothing
            If swFeat.GetTypeName() = "CutListFolder" Then
            Liste = swFeat.Name
            Set swBodyFolder = swFeat.GetSpecificFeature2
            swBodyFolder.UpdateCutList
            Final = st & "SW-Longueur du flanc de tôle@@@" & Liste & "@" & NF & st & "x" & st & "SW-Largeur du flanc de tôle@@@" & Liste & "@" & NF & st
                    
                    Set swCustPropMgr = swFeat.CustomPropertyManager
                       swCustPropMgr.Add3 "Dimension", swCustomInfoText, Final, 1

            End If
        Set swFeat = swFeat.GetNextFeature
        Loop
  
  
End Sub


All you have to do is adapt this line: 

Final = st & "SW " " tôle@@@ Flank Length & "@" & "NF & st & "x" & "SW " " & "SW " " Sidewall Width tôle@@@& " " & "@" & "NF & st
NF being a concatenator of:  part name + . SLDPRT
st being the quotation mark character (")

Then you can do what you want as a formula, add text, that's the advantage of macros!
 

1 Like

Thank you Michael!
On the other hand, I don't see how to put this body property in the default model:
Laser "SW-Flank Length of tôle@@@""x"SW-Sidewall Width of tôle@@@"" ep"SW-Thickness of tôlerie@@@@@@""

Thank you Michael for the macro, but I shouldn't need it since I only make unitary designs, new each time.

As for max59's method, to put the expression in the default model, ok but I think it only works in the case where the part contains only one body...

 

Hello

For the default model, my advice is to just create a mechanically soldered function in the default model to add your variable that is fine.
Normally, from the creation of bodies, they will take on the appropriate value.

You can also make a normal part model and a welded mechanic if the fact that you have the mechanically welded function on all the parts bothers you


test.jpg
1 Like

"Normally, from the creation of bodies, they will take on the appropriate value."

Yes I know that, it works for mechanically welded parts but not for sheet metal bodies unfortunately.
Thank you anyway for all this information!

The problem with sheet metal bodies is that the "Description" property automatically  takes the value "Sheet" when the sheet metal is created.

Under SW2019, in Option => Document Properties => Welded Constructions, there is the possibility to change this default value (see pj). But what expression should I write instead of Sheet to get my famous Sheet Metal.# ... ### x ###?


2019-02-27_14h33_20.png
1 Like

It is impossible to enter special characters in this box...
​​​​​​

Hello

I made a tutorial on the subject some time ago

https://www.lynkoa.com/contenu/comment-concatener-un-texte-dans-la-liste-de-piece-mecano-soudee-0

May the force be with you

1 Like