Hi Mickael
If you write :
norm = norm:MTRL_XX (XX means increment)
I would say XX is the ID you get if you insert from list, (Not an Increment).
This is by the way, an ugly way to get the ID. I did not found another way to get this ID.
If the Material S_235_JR contains this parameter "NORM" you have to make sure that you use the correct ID in your relations! Each material will have a different ID, if you set a new material your relation value for "NORM" will not change. Your Relation will reflect an update only if you change the correct Material ID Parameter Value (I have tested this).
You may also in trouble if you try to overwrite/re-read from file, because your relation may not longer work, you may blocked on re-read.
If you use this way:
NORM=material_param("NORM")
with this material file data:
PARAMETERS =
{
Name = NORM
Type = String
Default = 'My Norm A'
Access = Full
},
and for a different Material
PARAMETERS =
{
Name = NORM
Type = String
Default = 'My Norm 1'
Access = Full
},
the model parameter will update if you switch between this 2 material. That means, after 'Set as Master' your parameter NORM will reflect the value form the material parameter currently defined in this 2 materials.
Note: Loading will only insert default values, you can change them at the model any time (on Full access), the material data is not automatically updating on open, you must re-open the material.
Don't forget to think about, what happens, if you use more than one body. Only the Active One will report the value. for the Model.