function rthosts_getRTEnvNames

% Create a new real-time host environment collection object
rthosts = simwb.rthosts
% Add a new default real-time host environment object to the collection
rthosts.add
% Create a new real-time host environment object
rthostenv = simwb.rthostenv
% Customize the real-time host environment by changing the name and IP
rthostenv.Name = 'RedHawk1'
rthostenv.RTHostNameorIP = '192.168.0.10'
% Add this custom real-time host environment to the collection
rthosts.add(rthostenv)
% Get names of real-time host environments present in the collection
rthosts.getRTEnvNames
% Remove this custom real-time host environment from the collection
rthosts.remove('RedHawk1')
% Get names of rela-time host environments present in the collection
rthosts.getRTEnvNames
rthosts = 

  simwb handle

  Properties:
    NumHosts: 0



ans = 

  simwb handle

  Properties:
    NumHosts: 1



rthostenv = 

  simwb.rthostenv handle
  Package: simwb

  Properties:
         Name: 'DefaultName'
    RTHostNameorIP: '127.0.0.1'



rthostenv = 

  simwb.rthostenv handle
  Package: simwb

  Properties:
         Name: 'RedHawk1'
    RTHostNameorIP: '127.0.0.1'



rthostenv = 

  simwb.rthostenv handle
  Package: simwb

  Properties:
         Name: 'RedHawk1'
    RTHostNameorIP: '192.168.0.10'



ans = 

  simwb handle

  Properties:
    NumHosts: 2



ans = 

    'RedHawk1'
    'SimWB_RTHost1'


ans = 

  simwb handle

  Properties:
    NumHosts: 1



ans = 

    'SimWB_RTHost1'