Main Content

getAPIPort

Retrieve RoadRunner API server port number in MATLAB

Since R2022b

    Description

    portNum = getAPIPort(rrApp) retrieves the API server port number for RoadRunner.

    example

    Examples

    collapse all

    This example assumes that RoadRunner is installed in its default location.

    Specify the location in which to create a RoadRunner project. For example, this code shows the path to a project, on a Windows® machine, located at C:\RR\MyProject.

    Create a roadrunner object and open RoadRunner by specifying your project as the location where you want to create a scene. The roadrunner function returns an object, rrApp, that provides functions for performing basic workflow tasks such as opening, closing, and saving scenes and projects.

    projectFolder = "C:\RR\MyProject";
    rrApp = roadrunner(projectFolder); 

    Retrieve the RoadRunner port number, for this instance of RoadRunner, by using the getAPIPort function.

    portNum = getAPIPort(rrApp);

    Input Arguments

    collapse all

    RoadRunner application associated with a project, specified as a roadrunner object. This object provides functions for performing common workflow tasks such as opening, closing, and saving scenes and projects. rrApp provides functions that support importing data from files and exporting scenes to other formats from RoadRunner.

    Output Arguments

    collapse all

    RoadRunner API port number, returned as a positive integer.

    Version History

    Introduced in R2022b