function [designObject, replacementSid] = getExtractedObject(testcomp, object)
%

%   Copyright 2014-2016 The MathWorks, Inc.

    % If no extraction is performed, then return the corresponding design
    % object
    
    if ~isempty(testcomp.analysisInfo.extractedModelH) && ...
        ishandle(testcomp.analysisInfo.extractedModelH)
        [designObject, replacementSid] = Sldv.DataUtils.mapReplacementObject(object, testcomp.analysisInfo.extractedModelH, testcomp);
    else
        [designObject, replacementSid] = Sldv.DataUtils.mapReplacementObject(object, testcomp.analysisInfo.designModelH, testcomp);
    end
end