# IRiRecorder Interface Reference

Inherits IDispatch, and IDispatch.

List of all members.

## Public Member Functions
HRESULT | Start ([in] BSTR bszRecSpace)
HRESULT | Stop (void)
HRESULT | Play ([in] RtUlong ulDelayTime)
HRESULT | Save ([in] BSTR bszRecFileName)
HRESULT | Load ([in] BSTR bszRecFileName)
HRESULT | PlayBack ([in] RtUlong ulDelayTime)
HRESULT | Pause (void)
HRESULT | Clear (void)
HRESULT | SetFrame ([in] RtUlong ulFrame)
HRESULT | CreateRecPreview (void)
HRESULT | AttachPreviewFile ([in] BSTR bszRecPreviwFileName)
HRESULT | AttachPreview (void)
HRESULT | OpenRecPreferences (void)
HRESULT | Start ([in] BSTR bszRecSpace)
HRESULT | Stop (void)
HRESULT | Play ([in] RtUlong ulDelayTime)
HRESULT | Save ([in] BSTR bszRecFileName)
HRESULT | Load ([in] BSTR bszRecFileName)
HRESULT | PlayBack ([in] RtUlong ulDelayTime)
HRESULT | Pause (void)
HRESULT | Clear (void)
HRESULT | SetFrame ([in] RtUlong ulFrame)
HRESULT | CreateRecPreview (void)
HRESULT | AttachPreviewFile ([in] BSTR bszRecPreviwFileName)
HRESULT | AttachPreview (void)
HRESULT | OpenRecPreferences (void)
## Properties
VARIANT_BOOL * | IsReplaying`[get]`
RtUlong * | CurrFrame`[get]`
RtUlong * | FrameCount`[get]`
RtUlong * | PreviewOffsetTime`[get, set]`
RtUlong | PreviewOffsetTime`[set]`
VARIANT_BOOL * | IsReplaying`[get]`
RtUlong * | CurrFrame`[get]`
RtUlong * | FrameCount`[get]`
RtUlong * | PreviewOffsetTime`[get]`

## Detailed Description

The IRiRecorder interface provides basic methods that enable an application to control 3D recording.

- Everything in the 3d Encapsulator is recorded. By default this would be Space3d and anything within it.
- It includes methods for recording, running, pausing, and stopping.
- 3D record is content-based recording. Unlike the script recording, which processes actions, 3D record works only with the content of recorded space.
- This technique allows detecting all changes in the content caused by user action, activity or simulation and then replay them even in reversed order.
  Root-level name in the scripting engine's name space: RsRec

## Member Function Documentation

HRESULT IRiRecorder::Start | ( | [in] BSTR | bszRecSpace | ) |

Starts recording in the space.

- First, the current state of recorded space is saved.
- All subsequent changes in content made by user, activities or simulations are recorded.
- Recording continues until the stop command is called.

Parameters:

  | bszRecSpace | [in] Full name identification of recorded space.

Use following syntax if you want to record all changes in current scene:

     RsRec.Start(Space.CurrentScene())

HRESULT IRiRecorder::Stop | ( | void |  | ) |

Stops recording or playing the record.

- When replaying it resets the position to the beginning of the record.

        RsRec.Stop();

HRESULT IRiRecorder::Play | ( | [in] RtUlong | ulDelayTime | ) |

Starts replaying of recorded or imported events.

- The speed of replaying can be controlled in record preferences.

Parameters:

  | ulDelayTime | [in] Default base delay in milliseconds when applying event.

        RsRec.Play(5);

HRESULT IRiRecorder::Save | ( | [in] BSTR | bszRecFileName | ) |

Exports recorded or imported events to the specified file.

Parameters:

  | bszRecFileName | [in] Name of the file.

        RsRec.Save('recordTest.RsRcd');

HRESULT IRiRecorder::Load | ( | [in] BSTR | bszRecFileName | ) |

Imports recorded events from specified file.

- When loaded, it replaces the current scene with initial state of recorded space.
- It also opens a control for attached media if available.

Parameters:

  | bszRecFileName | [in] Name of the file.

        RsRec.Load('D:\\trueSpace76\\tS\\Textures\\recordTest.RsRcd');

HRESULT IRiRecorder::PlayBack | ( | [in] RtUlong | ulDelayTime | ) |

Starts replying of recorded or imported events in reverse order.

- Available only when streaming is disabled.

Parameters:

  | ulDelayTime | [in] Default base delay in milliseconds when applying event.

        RsRec.PlayBack(5);

HRESULT IRiRecorder::Pause | ( | void |  | ) |

Interrupts replaying of the record.

- Unlike the stop command, this allows you to continue the replay, from the last event which was sent.
- Pause command has no effect when recording.
- See also:
    Stop()

          RsRec.Pause();

HRESULT IRiRecorder::Clear | ( | void |  | ) |

Erases the current record from the record manager.

        RsRec.Clear();

HRESULT IRiRecorder::SetFrame | ( | [in] RtUlong | ulFrame | ) |

Set frame for record.

Parameters:

  | ulFrame | [in] 32bit Integer value. Unsigned.

        RsREc.SetFrame(10);

HRESULT IRiRecorder::CreateRecPreview | ( | void |  | ) |

Opens control for attached media preview file.

- Record manager allows synchronized replaying of record and media files.
- Because 3d record does not process UI changes, the media preview file provides a convenient way to include this type of information in the recording.

        RsRec.CreateRecPreview();

HRESULT IRiRecorder::AttachPreviewFile | ( | [in] BSTR | bszRecPreviwFileName | ) |

This command opens media file and compiles it with the current record into one file.

Parameters:

  | bszRecFileName | [in] Name of the file.

Use following syntax if your media file test.avi is located in main C:\ directory.

- Note the double slash to include the escape.

        RsRec.AttachPreviewFile('c:\\test.avi');

HRESULT IRiRecorder::AttachPreview | ( | void |  | ) |

AttachPreview.

        RsRec.AttachPreview();

HRESULT IRiRecorder::OpenRecPreferences | ( | void |  | ) |

Opens the record preferences panel.

        RsRec.OpenRecPreferences();

HRESULT IRiRecorder::Start | ( | [in] BSTR | bszRecSpace | ) |

Starts recording in the space.

- First, the current state of recorded space is saved.
- All subsequent changes in content made by user, activities or simulations are recorded.
- Recording continues until the stop command is called.

Parameters:

  | bszRecSpace | [in] Full name identification of recorded space.

Use following syntax if you want to record all changes in current scene:

     RsRec.Start(Space.CurrentScene())

HRESULT IRiRecorder::Stop | ( | void |  | ) |

Stops recording or playing the record.

- When replaying it resets the position to the beginning of the record.

        RsRec.Stop();

HRESULT IRiRecorder::Play | ( | [in] RtUlong | ulDelayTime | ) |

Starts replaying of recorded or imported events.

- The speed of replaying can be controlled in record preferences.

Parameters:

  | ulDelayTime | [in] Default base delay in milliseconds when applying event.

        RsRec.Play(5);

HRESULT IRiRecorder::Save | ( | [in] BSTR | bszRecFileName | ) |

Exports recorded or imported events to the specified file.

Parameters:

  | bszRecFileName | [in] Name of the file.

        RsRec.Save('recordTest.RsRcd');

HRESULT IRiRecorder::Load | ( | [in] BSTR | bszRecFileName | ) |

Imports recorded events from specified file.

- When loaded, it replaces the current scene with initial state of recorded space.
- It also opens a control for attached media if available.

Parameters:

  | bszRecFileName | [in] Name of the file.

        RsRec.Load('D:\\trueSpace76\\tS\\Textures\\recordTest.RsRcd');

HRESULT IRiRecorder::PlayBack | ( | [in] RtUlong | ulDelayTime | ) |

Starts replying of recorded or imported events in reverse order.

- Available only when streaming is disabled.

Parameters:

  | ulDelayTime | [in] Default base delay in milliseconds when applying event.

        RsRec.PlayBack(5);

HRESULT IRiRecorder::Pause | ( | void |  | ) |

Interrupts replaying of the record.

- Unlike the stop command, this allows you to continue the replay, from the last event which was sent.
- Pause command has no effect when recording.
- See also:
    Stop()

          RsRec.Pause();

HRESULT IRiRecorder::Clear | ( | void |  | ) |

Erases the current record from the record manager.

        RsRec.Clear();

HRESULT IRiRecorder::SetFrame | ( | [in] RtUlong | ulFrame | ) |

Set frame for record.

Parameters:

  | ulFrame | [in] 32bit Integer value. Unsigned.

        RsREc.SetFrame(10);

HRESULT IRiRecorder::CreateRecPreview | ( | void |  | ) |

Opens control for attached media preview file.

- Record manager allows synchronized replaying of record and media files.
- Because 3d record does not process UI changes, the media preview file provides a convenient way to include this type of information in the recording.

        RsRec.CreateRecPreview();

HRESULT IRiRecorder::AttachPreviewFile | ( | [in] BSTR | bszRecPreviwFileName | ) |

This command opens media file and compiles it with the current record into one file.

Parameters:

  | bszRecFileName | [in] Name of the file.

Use following syntax if your media file test.avi is located in main C:\ directory.

- Note the double slash to include the escape.

        RsRec.AttachPreviewFile('c:\\test.avi');

HRESULT IRiRecorder::AttachPreview | ( | void |  | ) |

AttachPreview.

        RsRec.AttachPreview();

HRESULT IRiRecorder::OpenRecPreferences | ( | void |  | ) |

Opens the record preferences panel.

        RsRec.OpenRecPreferences();

## Property Documentation

VARIANT_BOOL* IRiRecorder::IsReplaying`[get]`

Returns boolean true/false if recording is currently replaying.

Returns:
  pVal [out,retval] Boolean true/false.

        var inform = RsRec.IsReplaying();
        System.Alert(inform);

RtUlong* IRiRecorder::CurrFrame`[get]`

Returns current frame of recording.

Returns:
  pVal [out,retval] Returns 32bit unsigned Integer.

        var inform = RsRec.CurrFrame();
        System.Alert(inform);

RtUlong* IRiRecorder::FrameCount`[get]`

Returns number of frames in the recording.

Returns:
  pVal [out,retval] Number of frames in recording.

        var inform = RsRec.FrameCount();
        System.Alert(inform);

RtUlong IRiRecorder::PreviewOffsetTime`[get, set]`

Retrieves the current offset synchronization value.

- This property is used for synchronization of media file and 3drecord.

Returns:
  pVal [out,retval] Returns an offset value in milliseconds.

Examples:

     RsRec.PreviewOffsetTime = dwDelayInMilliseconds;
     RsRec.PreviewOffsetTime = 2000;

Sets new offset parameter. This property is used for synchronization of media file and 3drecord.

Parameters:

  | newVal | [in] New offset delay value in milliseconds.

Examples:

     dwDelayInMilliseconds = RsRec.PreviewOffsetTime;

RtUlong IRiRecorder::PreviewOffsetTime`[set]`

Sets new offset parameter. This property is used for synchronization of media file and 3drecord.

Parameters:

  | newVal | [in] New offset delay value in milliseconds.

Examples:

     dwDelayInMilliseconds = RsRec.PreviewOffsetTime;

VARIANT_BOOL* IRiRecorder::IsReplaying`[get]`

Returns boolean true/false if recording is currently replaying.

Returns:
  pVal [out,retval] Boolean true/false.

        var inform = RsRec.IsReplaying();
        System.Alert(inform);

RtUlong* IRiRecorder::CurrFrame`[get]`

Returns current frame of recording.

Returns:
  pVal [out,retval] Returns 32bit unsigned Integer.

        var inform = RsRec.CurrFrame();
        System.Alert(inform);

RtUlong* IRiRecorder::FrameCount`[get]`

Returns number of frames in the recording.

Returns:
  pVal [out,retval] Number of frames in recording.

        var inform = RsRec.FrameCount();
        System.Alert(inform);

RtUlong* IRiRecorder::PreviewOffsetTime`[get]`

Retrieves the current offset synchronization value.

- This property is used for synchronization of media file and 3drecord.

Returns:
  pVal [out,retval] Returns an offset value in milliseconds.

Examples:

     RsRec.PreviewOffsetTime = dwDelayInMilliseconds;
     RsRec.PreviewOffsetTime = 2000;