function result = model_reference_rtw_target(relevantMachineName)
   if ~strcmpi(get_param(relevantMachineName,'BlockDiagramType'),'library')
      mdlTarget = get_param(relevantMachineName,'ModelReferenceTargetType');
      result = strcmpi(mdlTarget, 'RTW');
   else
      result = 0;
   end
       
       
