Sheet Metal Flat Pattern Boundry for all configs?

ResidentAtLarge
Posts: 35
Joined: Wed Jun 02, 2021 4:31 pm
Answers: 0
x 31
x 30

Sheet Metal Flat Pattern Boundry for all configs?

Unread post by ResidentAtLarge »

I have recently been creating a single file of about 200+ configurations of a sheet metal part.
My company plans to upgrade to solidworks 2020 in a month or two and am trying to get ahead on figuring this out.

I need to include the blank size of my part in a custom property. There are two givens for my blank size that I can get easily(gauge and length) and I need the third that tells me what the width is when it is flattened.
Is there a way to get this dimension with perhaps using the bounding box? I would like to automate this process if possible instead of manually going through each 200+ configurations and figuring out the details.
I am on 2017 currently and the bounding box is available for 2018 and up.
Austin Schukar
Posts: 98
Joined: Thu Mar 18, 2021 11:19 am
Answers: 1
Location: St. Louis, MO
x 288
x 56

Re: Sheet Metal Flat Pattern Boundry for all configs?

Unread post by Austin Schukar »

I'm assuming you'd want each of these properties to update dynamically as well? I know that manually doing this 200 times is tedious, but you could just create a new custom property and link it to:

"SW-Bounding Box Width@@@Cut-List-ItemX@PartX.SLDPRT"
Austin
ResidentAtLarge
Posts: 35
Joined: Wed Jun 02, 2021 4:31 pm
Answers: 0
x 31
x 30

Re: Sheet Metal Flat Pattern Boundry for all configs?

Unread post by ResidentAtLarge »

Austin Schukar wrote: Mon Jan 31, 2022 12:54 pm I'm assuming you'd want each of these properties to update dynamically as well? I know that manually doing this 200 times is tedious, but you could just create a new custom property and link it to:

"SW-Bounding Box Width@@@Cut-List-ItemX@PartX.SLDPRT"
I was looking into this "@@@" format and it seems like this is a cutlist property callout?
This doesn't work for my 2017 version at the moment and will need to wait another month or two before I can upgrade and apply this.
Tera
Posts: 225
Joined: Fri Mar 19, 2021 4:58 am
Answers: 2
x 483
x 91

Re: Sheet Metal Flat Pattern Boundry for all configs?

Unread post by Tera »

Austin Schukar wrote: Mon Jan 31, 2022 12:54 pm but you could just create a new custom property and link it to:

"SW-Bounding Box Width@@@Cut-List-ItemX@PartX.SLDPRT"
How can I do it in a template. Because the template has no cut list or part name yet.
Thank you.
Austin Schukar
Posts: 98
Joined: Thu Mar 18, 2021 11:19 am
Answers: 1
Location: St. Louis, MO
x 288
x 56

Re: Sheet Metal Flat Pattern Boundry for all configs?

Unread post by Austin Schukar »

ResidentAtLarge wrote: Thu Feb 03, 2022 9:56 am I was looking into this "@@@" format and it seems like this is a cutlist property callout?
This doesn't work for my 2017 version at the moment and will need to wait another month or two before I can upgrade and apply this.
That format does seem to be specific to cutlist property callouts, though I'm not certain...sorry, I can't be more sure.
Austin
Austin Schukar
Posts: 98
Joined: Thu Mar 18, 2021 11:19 am
Answers: 1
Location: St. Louis, MO
x 288
x 56

Re: Sheet Metal Flat Pattern Boundry for all configs?

Unread post by Austin Schukar »

Tera wrote: Thu Feb 03, 2022 4:20 pm How can I do it in a template. Because the template has no cut list or part name yet.
Thank you.
Unfortunately you'll have to manually add these properties after you know the cutlist and part names, unless you invoke some sort of API, but that wouldn't be trivial
Austin
Tera
Posts: 225
Joined: Fri Mar 19, 2021 4:58 am
Answers: 2
x 483
x 91

Re: Sheet Metal Flat Pattern Boundry for all configs?

Unread post by Tera »

Austin Schukar wrote: Fri Feb 04, 2022 10:40 am Unfortunately you'll have to manually add these properties after you know the cutlist and part names, unless you invoke some sort of API, but that wouldn't be trivial
Thank you.
User avatar
Tapani Sjöman
Posts: 42
Joined: Mon May 03, 2021 9:53 am
Answers: 0
x 33
x 14

Re: Sheet Metal Flat Pattern Boundry for all configs?

Unread post by Tapani Sjöman »

Can anybody upload a part, where this works? Can't get it working and don't know how to link Bounding Box -dims to properties in sheet metal parts. I'm using SW 2022.
User avatar
gupta9665
Posts: 407
Joined: Thu Mar 11, 2021 10:20 am
Answers: 25
Location: India
x 431
x 447

Re: Sheet Metal Flat Pattern Boundry for all configs?

Unread post by gupta9665 »

Tapani Sjöman wrote: Tue Sep 13, 2022 2:41 am Can anybody upload a part, where this works? Can't get it working and don't know how to link Bounding Box -dims to properties in sheet metal parts. I'm using SW 2022.
You will have to type the property and it would link.
image.png

You can also look at this macro https://www.codestack.net/solidworks-ap ... eet-metal/
Deepak Gupta
SOLIDWORKS Consultant/Blogger
User avatar
Tapani Sjöman
Posts: 42
Joined: Mon May 03, 2021 9:53 am
Answers: 0
x 33
x 14

Re: Sheet Metal Flat Pattern Boundry for all configs?

Unread post by Tapani Sjöman »

Thanks, Deepak!

Macros are always interesting! Need some time to study this one. It looks running, but must modify to our needs if this is the way to go.

Did not understand Sheet<1> in your property -input. So manual property input did not work.
User avatar
Tapani Sjöman
Posts: 42
Joined: Mon May 03, 2021 9:53 am
Answers: 0
x 33
x 14

Re: Sheet Metal Flat Pattern Boundry for all configs?

Unread post by Tapani Sjöman »

Added some rows to the macro and looks better now:

Code: Select all

Sub Init(Optional dummy As Variant = Empty)
    
    Set Map = New Collection
  
    Map.Add CreateMapValue("T1", "Sheet Metal Thickness", "")
    Map.Add CreateMapValue("W1", "Bounding Box Width", "")
    Map.Add CreateMapValue("L1", "Bounding Box Length", "")
        
End Sub
To the end of main sub:

Code: Select all

    Dim newVal2 As String
    newVal2 = "PL$PRP:" & """T1""" & " .. $PRP:" & """W1""" & " x $PRP:" & """L1"""
    
    swTargetCustPrpMgr.Add2 "Dim2", swCustomInfoType_e.swCustomInfoText, newVal2
    swTargetCustPrpMgr.Set "Dim2", newVal2
Remember upgrade custom properties from old documents (possible with SW2022 ->).
Attachments
011_Update.png
User avatar
gupta9665
Posts: 407
Joined: Thu Mar 11, 2021 10:20 am
Answers: 25
Location: India
x 431
x 447

Re: Sheet Metal Flat Pattern Boundry for all configs?

Unread post by gupta9665 »

Tapani Sjöman wrote: Wed Sep 14, 2022 10:33 am Thanks, Deepak!

Macros are always interesting! Need some time to study this one. It looks running, but must modify to our needs if this is the way to go.

Did not understand Sheet<1> in your property -input. So manual property input did not work.
Sheet<1> is the cut list item name.
image.png
I've also attached the 2022 part file for your reference.
Deepak Gupta
SOLIDWORKS Consultant/Blogger
User avatar
Tapani Sjöman
Posts: 42
Joined: Mon May 03, 2021 9:53 am
Answers: 0
x 33
x 14

Re: Sheet Metal Flat Pattern Boundry for all configs?

Unread post by Tapani Sjöman »

Thanks, Deepak! All clear now! :)
Post Reply