function [implClass,implClassFound] = getImplementationObject(this)
%   Get the implementation object from hdlblkdlg
%

%   Copyright 2023 The MathWorks, Inc.

[blkTag, ~] = hdlgetblocklibpath(this.SLBlockHandle);
hCoderObj = hdlmodeldriver(this.getModelName);
db = hCoderObj.getImplDatabase;
implList = db.getImplementationsFromBlock(blkTag);
implClass = [];
implClassFound = 0;
for ii = 1:length(implList)
    implClass = implList{ii};
    implObj = eval(implClass);
    implArchName = implObj.getArchitectureName;
    currArchName = this.getCurrentArchName;
    if strcmpi(implArchName, currArchName)
        implClassFound = 1;
        break;
    end
end
end
