Weight Calculation Macro

I am looking for a macro that will calculate the weight of a sheet metal part. The SW Mass property subtracts any hole cutouts I have from the overall weight. I need to calculate the weight of the piece before any cutouts happen. Basically a (length x width) x lbs/ft in- the-flat calculation. This will give me the weight of the actual material consumed, rather than the weight of the finished product. Is there anything out there that can do this?

Thanks in advance. Mark

Reply to
msweeney
Loading thread data ...

Use mass properties before you make any cutouts then again after. if you ned

2 drawings so be it.

Bob

Reply to
sycochkn

I'm looking for something more automated than this. If one of our engineers forgot to get the weight in the beginning, he'd have to suppress all of his cutouts, get the mass then unsuppress everything again. It would be nice to just push a button at any time in the creation process and get the total material usage, put it into a custom property which can then be exported into DBWorks and finally our MRP system. But if I can't get something like this, then your idea is probably the simplest route.

Thanks

Reply to
msweeney

I have not tried this, but how about always naming the initial sheet width, length & thickness dimensions, then using them in a macro to calculate the mass, and return it as a custom propertry.

As long as the dims are named correctly, then the macro should work for all parts.

As I say, I've not tried to do this, so not sure if it is possible.

Reply to
greyhound

When making the sheet metal part I'd say make a config pre-cutouts (do this after making all bends and before you start making cutouts). Then add all the cutouts under the 2nd config. Then just switch to the one config and do the mass prop, or...

You could also then have that massprop config in your drawing (hidden) with a note linked to that hidden view calling for the PRP$"SW-mass" prop (or whatever it is). That way you can automate the info into your sheet with minimal additions to your part, and it will auto update on any part changes.

Through a macro it'd be a lot trickier, when you can do the same thing just as easily by just adding a config at your split point of adding cutouts/holes.

You can use a macro to auto add the new config, and do a call of all features (feature numbers), then call the names for each number

Similar to the below, just for feature names/count, and instead of setting a property, supress under the new config:

*********************** OptionCompare Text 'sets string compare to be case insensitive CustomCount =3D CurrentDoc.GetCustomInfoCount2("") CustomNames =3D CurrentDoc.GetCustomInfoNames2("")

For j =3D 0 To CustomCount - 1 CustomName =3D CustomNames(j) If StrComp(CustomNames(j), "DateCompleted") =3D 0 Then CurrentDoc.CustomInfo2("", CustomNames(j)) =3D Properties(0)

***************************

Hope that gets you in the right direction. Check the API help file for the suppress/add config calls.

-James

Reply to
James Spisich

Reply to
James Spisich

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.