DCs in metric?
-
I am moderately versed in DC authoring, but I am trying some authoring in metric for the first time and am having issues.
I think I have narrowed the problem down to a current() function. First off, I have my default units set to metric (which starts the Comp. Attributes in cm) I have my LenX snapping to increments of 100 (cm) with this formula:
=largest(100,round(current("LenX")/100)*100)
The largest function is being used to keep the value from hitting zero and causing other issues.
With this function, I was getting unexpected results when scaling. I created a custom attribute called "currenttest" and set this in its field:
=current("LenX")
Surprisingly, when the formula in LenX resulted in a value like 100, the value for currenttest would equal the inch equivalent, which in this case is 39.37. If that is the case I can see why my scaling is getting erratic.
So my questions are: Is this a bug isolated to the current() function? Do all functions result in inch equivalent? I'll do some testing on that myself. And finally, has anyone else had issues authoring DCs in metric?
For the time being, I guess I will just add a cm multiplier to apply to the current() function and any others I happen to have metric/imperial issues with.
Matt
-
Good questions Matt, I'm sure someone here will know more, but I do remember that metric support was added rather late in the game. But I am pretty sure that you should not have to be running everything through a conversion filter yourself. I think that the DC's are supposed to have the figured out.
Did you set the DC itself to metric by clicking on the ruler icon?
Chris
-
@chris fullmer said:
Did you set the DC itself to metric by clicking on the ruler icon?
Hi Chris, yeah did that. I thought the issue might have had something do do with starting with inches and then switching over or possibly having some other nested piece that was in inches... but ruled those out as well by starting from scratch with all the metric in place. If any Googlers are reading this, I tested this in 7.0.10248 for Mac and 10247 on PC.
-
I found out from the source that the issue is by design. It has to do for when there are imperial and metric components mixed together under one parent shell. It had to be one or the other, and imperial won.
So to answer my question and anyone else who stumbles across this...
If your DC is in metric and you want to use this common trick to snap to increments
=largest(100,round(current("LenX")/100)*100)
You will need to apply an "inch to cm" multiplier of 2.54 to the current() function to avoid general screwiness when scaling.
=largest(100,round((current("LenX")*2.54)/100)*100)
Advertisement