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.

Register Log in

relation functions


Anyone know of where I can find a list of what each function means in part relations (WF2). What I'm trying to do is to convert imperial dimension to a metric dim which Ive made a parameter and applied the floor function, so relation looks like Metric-Dim(param) = floor (d13*25.4)+0.5. 0.5 added to ensure always next round number or half. What I want is to get it to round down to the nearest 1 decimal place and also want to set the number of decimal places for the parameter. Any ideas?



the proper way.

edit-> setup -> units -> MM, newtons, seconds.

then its convert or interpret.

convert means if its 2" then its converted to 50.8mm

interpret means if its 2" then its interpreted to 2mm (same numbers)

u could create a map-keym if your doing this often.

as for your rounding. In your drawing file you can set it the amount of decimal places.Or in your config.pro put

THIS ISNT really rounding but rather trimming off the end digits.

"default_dec_places 2"

if someone can do proper rounding plz let me know to :)

the dodgy crappy way is simply to use


then either put 25.4 or 1/25.4 depending on which way you want to convert.

hope this helps.

hope everyone had a great and safe holiday :p


New member
Hi puppet

I didn't know you could set the unit system after the fact. In which case it seems like the best way to do it. How do you get it to convert rather than interpret?


New member

To convert units of a model it is best to use edit, setup, units however to answer your question about rounding the first decimal place in a relation, do this. Multiply the dim by 10, add .5, take the floor function, then divide by 10. For 2 decimal places multiply by 100 and divide by 100.

Example: Metric-Dim(param) = floor (10*d13*25.4+0.5)/10

For 2 dec plcs: Metric-Dim(param) = floor (100*d13*25.4+0.5)/100

Edited by: Mildfire


Thanks for all the replies. I think to start with there was some confusion. I only want to change one or two dims in a model to metric as we work primarily in imperial so we came up with the relation converting it to a parameter. I've since found a way of limiting the dec places in the note for the param, you simply put [.1] straight after the param for 1 decimal place .2 for 2 etc. ie the note would read as follows :- 1 hole &METRIC-DIM[.2]