RobotStudio SDK 6.06, ControllerSimulationConfigurationCollection only has non-public members?

edited March 2018 in Developer Tools
Greetings developers!
I need some help:
According to the API
the class 
Has the public member item, but when I debug, the only thing existing is a private _list
ControllerSimulationConfiguration cfgs = station.SimulationConfgiruations.First().ControllerConfigurations;
cfgs._list.GetType() = RobotStudio.API.Core.CmList<ControllerSimulationConfiguration>

What I'm trying to do is to set the simulation entry point by accessing

Thanks in advance!

Best Answer

  • OskarHenriksson
    edited March 2018 Answer ✓

    I misunderstood how ControllerSimulationConfgiurationCollection and TaskSimulationConfigurationCollection worked.
    They are accessable by using the ctonroller and task as index (see code below).

    The following code sets the path "path" as simulation entry point:
    var s = station.SimulationConfigurations.First();
    var cfgs = s.ControllerConfigurations;
    var cfg = cfgs[controller];
    var taskCfg = cfg.TaskConfigurations[station.ActiveTask];
    taskCfg.EntryPoint = path.Name;station.ActiveTask.ActivePathProcedure = path;