Page 1 of 1
Sheet Metal Flat Pattern Boundry for all configs?
Posted: Fri Jan 28, 2022 8:14 am
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.
Re: Sheet Metal Flat Pattern Boundry for all configs?
Posted: Mon Jan 31, 2022 12:54 pm
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"
Re: Sheet Metal Flat Pattern Boundry for all configs?
Posted: Thu Feb 03, 2022 9:56 am
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.
Re: Sheet Metal Flat Pattern Boundry for all configs?
Posted: Thu Feb 03, 2022 4:20 pm
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.
Re: Sheet Metal Flat Pattern Boundry for all configs?
Posted: Fri Feb 04, 2022 10:39 am
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.
Re: Sheet Metal Flat Pattern Boundry for all configs?
Posted: Fri Feb 04, 2022 10:40 am
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
Re: Sheet Metal Flat Pattern Boundry for all configs?
Posted: Fri Feb 04, 2022 12:03 pm
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.
Re: Sheet Metal Flat Pattern Boundry for all configs?
Posted: Tue Sep 13, 2022 2:41 am
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.
Re: Sheet Metal Flat Pattern Boundry for all configs?
Posted: Wed Sep 14, 2022 1:46 am
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.
You can also look at this macro
https://www.codestack.net/solidworks-ap ... eet-metal/
Re: Sheet Metal Flat Pattern Boundry for all configs?
Posted: Wed Sep 14, 2022 10:33 am
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.
Re: Sheet Metal Flat Pattern Boundry for all configs?
Posted: Thu Sep 15, 2022 4:43 am
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 ->).
Re: Sheet Metal Flat Pattern Boundry for all configs?
Posted: Fri Sep 16, 2022 9:08 am
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.
I've also attached the 2022 part file for your reference.
Re: Sheet Metal Flat Pattern Boundry for all configs?
Posted: Mon Sep 19, 2022 2:10 am
by Tapani Sjöman
Thanks, Deepak! All clear now!