Viewer
    Preparing search index...

    Variable createSessionConst

    createSession: (properties: SessionCreationDefinition) => Promise<ISessionApi>

    Create and initialize a session with a model hosted on a Geometry Backend, using the provided ticket/guid and modelViewUrl. Returns a session api object allowing to control the session.

    A JWT can be specified for authorizing the API calls to the Geometry Backend. The model's settings on the Geometry Backend might require a JWT to be provided.

    By default the outputs of the model for its default parameter values will be loaded.

    An optional identifier for the session can be provided. This identifier can be used to retrieve the api object from sessions. In case no identifier is provided, a unique one will be generated.

    Type Declaration

      • (properties: SessionCreationDefinition): Promise<ISessionApi>
      • Parameters

        • properties: SessionCreationDefinition
          • modelViewUrl: string

            The modelViewUrl of the Geometry Backend hosting the model.

          • OptionalallowOutputLoading?: boolean

            Option to allow the outputs to be loaded, or to prevent them from being loaded. (default: true)

          • OptionalexcludeViewports?: string[]

            Option to exclude some viewports from the start. Can be accessed via ISession.excludeViewports.

          • Optionalguid?: string

            The geometry backend model id (guid). This identifies the model on the Geometry Backend. A jwtToken is needed for authentication. If no guid was provided, a ticket has to be provided instead.

          • Optionalid?: string

            The unique identifier of the session that was specified or automatically chosen on creation of the session.

          • OptionalignoreUnknownParams?: boolean

            Option to allow relaxed validation of parameter identifiers. When set to true, unrecognized parameters will be ignored rather than causing an error. (default: false)

          • OptionalinitialParameterValues?: { [key: string]: string }

            The initial set of parameter values to use. Map from parameter id to parameter value. The default value will be used for any parameter not specified.

          • OptionaljwtToken?: string

            The JWT used for authorizing API calls to the Geometry Backend.

          • OptionalloadOutputs?: boolean

            Option to load the outputs, or not load them until the first call of ISession.customize. (default: true)

          • OptionalloadSdtf?: boolean

            Option to load the SDTF data. The data is not loaded by default as it can be quite large. (default: false)

          • OptionalmodelStateId?: string

            The optional model state id to use for the session. If not provided, no model state will be loaded.

          • OptionalmodelStateValidationMode?: string

            The optional model state validation mode to use for the session. If not provided, the default validation mode of the Geometry SDK will be used.

          • OptionalthrowOnCustomizationError?: boolean

            Option to throw an error if parts of a customization failed. (default: false)

          • Optionalticket?: string

            The ticket for direct embedding of the model represented by the session. This identifies the model on the Geometry Backend. If no ticket was provided, a guid has to be provided instead.

          • OptionalwaitForOutputs?: boolean

            Option to wait for the outputs to be loaded, or return immediately after creation of the session. (default: true)

        Returns Promise<ISessionApi>