function tf = isVisionBlock(obj)
%isVisionBlock Returns true for a block from a vision library
%  cvstIsVisionBlock(obj) returns false if the block is linked to a vip
%  library (old library in CVST). It returns true if the block is linked to
%  a vision library or any library other than vip library. The input, obj,
%  is a DDG object, i.e., "this" in the DDG functions.

blkHandle = obj.Block.Handle;

libname = strtok(get_param(blkHandle,'ReferenceBlock'), '/');
if isempty(libname) % must be inside the library
    libname = get_param(blkHandle,'Parent');
end

tf = ~strncmp(libname, 'vip', 3);
