function [Keys,Vals] = getBuildArgs(h, varargin)
%GETBUILDARGS - returns 2 cell arrays of build args.  this function is called
% like this:
% 
% options = getBuildArgs(includeGroupIDs, excludeGroupIDs)
%
%
%    includeGroupIDs    This is a cell array of Group IDs.  Only Options that
%                       have GroupID in this set will be returned.  If this
%                       is empty, the all Options are included
%
%    excludeGroupIDs    This is a cell array of Group IDs. Any Options that
%                       have one of these Group ID's will be excluded.
%
% includeGroupIDs and excludeGroupIDs are optional

% Copyright 2005-2019 The MathWorks, Inc.
[varargin{:}] = convertStringsToChars(varargin{:});

incGroups = {};
excGroups = {};

if (nargin >1)
    incGroups = varargin{1};
    if isempty(incGroups)
        incGroups = {};
    end
    if ~iscell(incGroups)
        incGroups = {incGroups};
    end
end

if (nargin >2)
    excGroups = varargin{2};
    if isempty(excGroups)
        excGroups = {};
    end
    if ~iscell(excGroups)
        excGroups = {excGroups};
    end
end

[Keys, Vals] = h.getKeyValuePair('type',         'BuildArgs',...
                                 'regexpSearch', false,...
                                 'incGroups',    incGroups,...
                                 'excGroups',    excGroups);

