Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

repeat region

vlad1979

New member
What relation should I enter in a repeat region to calculate the total mass of the parts ?


I have an assy with 2 parts which are the same and 3 parts that are diferrent.


Something like below:


View attachment 2754


I created a relation in all parts: weight=mp_mass("").


I can show this parameter in the repeat region like asm.mbr.weight, but don't know how to write a relation that will multiply qty with mass.


I thought making a relation in repeat region like total_weight=asm_mbr_weight*rpt_qty, thenadd this parameter in the repeat region like rpt.rel.total_weight,but it doesn't work.


Please advice.


Thanks.
 
You don't need to calculate total weight of the items in BOM, Pro/E does it for you. You just put the WEIGHT parameter in a repeat region (as asm.mbr.weight) and Pro/E looks for the number of equal parts in assembly and calculates total mass of all the instances of the same part.


Unless you are trying to cheat with user parameters for QTY and want to show customized quantity of parts in assembly, the procedure above should work.
 
thanks. I'll try again, I know I tried like you said and didn't worked. I'm caught with something else right now but when I'll get to this I'll let everybody know how I did it.


thanks again.
 
I forgot about this
smiley2.gif
but here it is how:


Write this in repeat region relations:


if rpt_qty==1
total_we=asm_mbr_weight
else
total_we=rpt_qty*asm_mbr_weight
endif



total_we is total weight. You don't have to create this parameter, just write the relations and it will be created automatically.


Then put &rpt.rel.total_we in your BOM


For some reason just those relations that I initially wrotedon't work, don't know why they should work. So I made them with a IF statement and it's working just fine.
 
ok, will test that

Another thing though ...

I display the mass by the parameter &weight which is defined by the relation weight=mp_mass("")

sometimes, the displayed mass is equal to zero and I don't understand why because it only happens SOMETIMES.
The calculated mass is different from zero altough I do generate the report by edit > setup > mass prop like I should.

I also had to change the units from mmNs to mmKs and I noticed that the problem appeared mainly when I didn't change the unit system before calculating & displaying the mass (but I don't know if it is exclusively in this case)

Any idea ?
Thanks
Edited by: ronfya
 
You have 0 shown if you didn't set a material file or if you didn't set the density at mass prop.


If you change the units you should do a regenerate model, because weight is calculated thru relations so just in case the relations don't update, do a regenerate.


But if you did set the above then just do a regenerate in model and a table / repeat regions/ update tables and a update all sheets in drawing and the mass should be updated.
 

Sponsor

Articles From 3DCAD World

Back
Top