function pfcblock_callbackModelType(blk)
% Callback function of the model type radio button in the Path Following
% Control System block dialog. The model type is either "Use vehicle
% parameters" (default) or "Use vehicle model". 

%   Author: Meng Xia, Rong Chen
%   Copyright 2017-2018 The MathWorks, Inc.

% this parameter is not tunable.
maskObj = Simulink.Mask.get(blk);
ModelType = get_param(blk,'ModelType'); % do not use "object.Value'
objectModel = maskObj.getDialogControl('UseModel');
objectParam = maskObj.getDialogControl('UseParam');
if strcmp(ModelType,slsvInternal('slsvGetEnStringFromCatalog','MPC:adasblocks:promptPFCUseVehicleModel'))
    objectModel.Visible = 'on';
    objectParam.Visible = 'off';
else
    objectModel.Visible = 'off';
    objectParam.Visible = 'on';
end
