function idText=linkid(m,object,type)
%LINKID returns a DocBook link ID
%   ID=LINKID(ZSLMETHODS,OBJECTHANDLE);
%   ID=LINKID(ZSLMETHODS,OBJECTHANDLE,OBJECTTYPE);
%
%   return unique stateflow object identifier (rgTag)
%
%   OBJECTHANDLE is the handle to a model, system, block, or signal
%   OBJECTTYPE is 'mdl','sys','blk',or 'sig' respectively

%   Copyright (c) 1997-2000 by The MathWorks, Inc.
%   $Revision: 1.3 $  $Date: 2000/06/30 14:23:04 $

if iscell(object)
   object=object{1};
end

% if id was not assigned, rgTag is empty.
idText = sf( 'get', object, '.rgTag' );
if isempty( idText )
   % if empty, assign the tag and return it.
   rgsf( 'assign_rg_tag', object );
   idText = sf( 'get', object, '.rgTag' );
end