function has = isProfileImportedIntoFMU(profile, modelName)
            % Whether or not the specified profile is already imported into
            % the fmu
            has = false;
            zcModel = systemcomposer.architecture.model.SystemComposerModel.findFMUSystemComposerModel(modelName);
            if isempty(zcModel)
                return;
            end
            rootArch = zcModel.getRootArchitecture;
            profiles = rootArch.p_Model.getProfiles();
            names = arrayfun(@(x)x.getName, profiles, 'uniformoutput', false);
            has = any(strcmp(profile.getName(), names));
        end