Main Content


View static specifications of actor

Since R2022a


    Use an ActorModel object to view the static specifications of an actor in a scenario simulation.


    Every ActorSimulation object has one corresponding ActorModel object that contains static actor properties such as PaintColor. Retrieve the ActorModel object of an actor by using the get function of its corresponding ActorSimulation object.

    Object Functions

    getAttribute Return static attribute of actor


    collapse all

    Create scenarioSim, a ScenarioSimulation object.

    rrApp = roadrunner('C:\Project\TestRoute')
    scenarioSim = createSimulation(rrApp);

    Start the simulation.

    set(scenarioSim, 'SimulationCommand', 'Start');

    Pause the simulation.

    set(scenarioSim, 'SimulationCommand', 'Pause');

    Get all the actors from the scenario.

    actorSim = get(scenarioSim, 'ActorSimulation');

    Select a specific actor from the returned actors.

    actorOne = actorSim(1);

    Retrieve ActorModel object of the selected actor.

    actorModel = get(actorOne, 'ActorModel');

    Version History

    Introduced in R2022a