Hello,
Reviving an old thread here. Locking a shared parameter by editing the shared text file is useful to prevent user editing, but as @mark.mountain pointed out, once the 'locked' shared parameter is loaded into the family editor, no changes can be made to its value. I'd suggest a workaround that combines the best of both worlds.
1 - Create a <family types> parameter from the Types dialogue box in the normal manner. This parameter should not be shared.
2 - Associate the <family types> parameter with the correct nested family.
3 - Set the value for each <family type> using the dropdown menu. This value can differ from type to type within the parent family.
4 - Create a shared <family types> parameter with the EXACT same name as the family parameter created above.
5 - Select the original, non shared <family types> parameter and click the pencil button to edit. Change the parameter to be shared.
6 - Select the shared <family types> parameter created in step 4 to replace the parameter being edited.
7 - Finish editing the parameter. The parameter is now shared & locked, but Revit will retain all the original type values set in step 3.