Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page provides information about V-Ray for Revit Public APIs.

 


Overview

...

V-Ray for Revit Public API is a gRPC server application that allows clients to programmatically read and configure V-Ray for Revit's properties and export V-Ray Scenes. 


UI Button
colorblue
newWindowtrue
icondownload
titleDownload V-Ray for Revit Public Api Documentation
urlhttps://drive.google.com/uc?export=download&id=1hyIKTLYxCjbD13Y4q1IAbVjKBxbKIcxfV379jW-XJmUPvbrtH-BIDtPTaZszaTtO

UI Button
colorblue
newWindowtrue
icondownload
titleDownload Public API Client zip
urlhttps://drive.google.com/uc?export=download&id=1waIDkrazujRpD9RaRZ25waHqzXmL0e_T1F-6euSFdFr0QEUJ0ecTDLzBFcPo2Wifp

UI Button
colorblue
newWindowtrue
icondownload
titleDownload public_api.proto
urlhttps://drive.google.com/uc?export=download&id=10K5SkchcBcqWoTl4PIWf9hxr7jgli4jU

...

1CCG-ih0R9NR0QgKto9oMupUhf0M97kEv


Service Definition (public_api.proto)

...

V-Ray for Revit Public API provides the 

Highlight
color#DBDBDB

public_api.proto

 file, which represents the service definition and protocol format. Alongside the .proto file, two auto-generated C# files are provided - 

Highlight
color#DBDBDB

PublicApi.cs

 and 

Highlight
color#DBDBDB

PublicApiGrpc.cs

. These two files contain the C# classes for all requests, responses, messages, and enums. The public_api.proto can be used to generate a binding in a language different from C# and develop a client in any of the supported languages. 


Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

serviceApiServer{

  rpcGetProjectName(GetProjectNameRequest)returns(GetProjectNameResponse);

  rpcGetProjectChangedNotificationStream(GetProjectChangedNotificationStreamRequest)returns(streamProjectChangedNotification);

  rpcGetViews(GetViewsRequest)returns(GetViewsResponse);

  rpcSelectView(SelectViewRequest)returns(SelectViewResponse);

  rpcSetBatchRenderView(SetBatchRenderViewRequest)returns(SetBatchRenderViewResponse);

  rpcGetProperties(GetPropertiesRequest)returns(GetPropertiesResponse);

  rpcGetProperty(GetPropertyRequest)returns(GetPropertyResponse);

  rpcSetProperty(SetPropertyRequest)returns(SetPropertyResponse);

  rpcExportVRScene(ExportVRSceneRequest)returns(ExportVRSceneResponse);

  rpcGetVRayMaterials(GetVRayMaterialsRequest)returns(GetVRayMaterialsResponse);

  rpcSaveVRayMaterialToFile(SaveVRayMaterialToFileRequest)returns(SaveVRayMaterialToFileResponse);

}

...


GetProjectName

...

Highlight
color#DBDBDB

GetProjectName

 is a unary RPC that sends a single 

Highlight
color#DBDBDB

GetProjectNameRequest

 to the server and gets a single 

Highlight
color#DBDBDB

GetProjectNameResponse

 back. It is used to obtain the name of the currently active project in Revit.

...

  • GetProjectNameRequest has no properties.

...


GetProjectNameResponse

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message GetProjectNameResponse {

bool success_status = 1;
string message = 2;
string project_name = 3;

}

  • success_status: A boolean indicating whether the RPC succeeded.
  • message: A string containing an error message in case the RPC failed for some reason.
  • project_name: The name of the project that is currently active in Revit.

...


GetProjectChangedNotificationStream

...

Highlight
color#DBDBDB

GetProjectChangedNotificationStream

 is a server streaming RPCs where the client sends a 

Highlight
color#DBDBDB

GetProjectChangedNotificationStreamRequest

 to the server and gets a stream to read a sequence of 

Highlight
color#DBDBDB

ProjectChangedNotification

 messages back. It is used to receive a notification each time the active project in Revit changes.

 


GetProjectChangedNotificationStreamRequest

...

  • GetProjectChangedNotificationStreamRequest has no properties.

 


ProjectChangedNotification

...

  • project_name: A string containing the name of the project that is currently active in Revit.

 


GetViews

...

Highlight
color#DBDBDB

GetViews

 is a unary RPC that sends a single 

Highlight
color#DBDBDB

GetViewsRequest

 to the server and gets a single 

Highlight
color#DBDBDB

GetViewsResponse

 back. It is used to obtain the names and unique ids of all 3D Views in the project. This information is later used when selecting a view for export.

...

  • GetViewsRequest has no properties.

...


GetViewsResponse

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message GetViewsResponse {

bool success_status = 1;
string message = 2;
ViewMap view_map = 3;

}

  • success_status: A boolean indicating whether the RPC succeeded.
  • message: A string containing an error message in case the RPC failed for some reason.
  • view_map:

    Highlight
    color#DBDBDB

    ViewMap

     containing information about all 3D Views in the active project.

 


ViewMap

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message ViewMap {

map<string, View> values = 1;

}

  • values: A map containing all views, where the key is the unique id of the 

    Highlight
    color#DBDBDB

    View

    , and the value is the 

    Highlight
    color#DBDBDB

    View

     itself.


View

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message View {

string unique_id = 1;
string name = 2;
bool batch_render = 3;

}

  • unique_id: A string in GUID format that represents the unique id of the view.
  • name: A string containing the name of the view, i.e. what the user sees in Revit.
  • batch_render: A boolean specifying whether this view will be rendered as part of Batch Render.


SelectView

...

Highlight
color#DBDBDB

SelectView

is a unary RPC that sends a single 

Highlight
color#DBDBDB

SelectViewRequest

 to the server and gets a single 

Highlight
color#DBDBDB

SelectViewResponse

 back. It is used to select a view before exporting a V-Ray Scene.

...

  • unique_id: A string in GUID format that represents the unique id of the view. This is the same string that is obtained with the 
Highlight
color#DBDBDB

GetViews

 RPC. 


SelectViewResponse

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message SelectViewResponse {

bool success_status = 1;
string message = 2;

}

  • success_status: A boolean indicating whether the RPC succeeded.
  • message: A string containing an error message in case the RPC failed for some reason.

 

...


SetBatchRenderView

Highlight
color#DBDBDB

...

SetBatchRenderView

is a unary RPC that sends a single single

Highlight
color#DBDBDB

...

SetBatchRenderViewRequest

 to the server and gets a single single

Highlight
color#DBDBDB

...

SetBatchRenderViewResponse

 backback. It is used to get all V-Ray properties for the active project.GetPropertiesRequestspecify whether the view will be rendered in a Batch Render.


SetBatchRenderViewRequest

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message GetPropertiesRequest SetBatchRenderViewRequest {

google.protobuf.Empty empty string unique_id = 1;

}

  • GetPropertiesRequest has no properties.

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message GetPropertiesResponse {


GetPropertiesResponse

bool success_status = 1;
string message = 2;
PropertyMap property_map = 3bool batch_render = 2;

}

  • successunique_status: A boolean indicating whether the RPC succeeded.
  • message: A string containing an error message in case the RPC failed for some reason.
  • property_map: A 

    Highlight
    color#DBDBDB

    PropertyMap

     containing all properties of the active project.

 

...

  • id: A string in GUID format that represents the unique id of the view. This is the same string that is obtained with the GetViews RPC.
  • batch_render: A boolean value specifying whether the view will be rendered in a Batch Render.


SetBatchRenderViewResponse

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message PropertyMap SelectViewResponse {

map<string, Property> values bool success_status = 1;
string message = 2;

}

  • valuessuccess_status: A map containing all properties, where the key is the unique name of the Property, and the value is the Property itself.

 

Property

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message Property {

string unique_name = 1;
string readable_name = 2;
string type = 3;
PropertyCategory category = 4;
PropertyValue value = 5;

}

  • unique_name: A string that contains the unique name of the property.
  • readable_name: A string that contains the human-friendly readable name of the property.
  • type: A string containing the type of the property, i.e. bool, int, string, etc.
  • category: A PropertyCategory containing the category of the property, i.e. Camera, Environment, etc.
  • value: A PropertyValue containing the value of the property.

 

PropertyCategory

  • boolean indicating whether the RPC succeeded.
  • message: A string containing an error message in case the RPC failed for some reason.


GetProperties

...

Highlight
color#DBDBDB

GetProperties

is a unary RPC that sends a single 

Highlight
color#DBDBDB

GetPropertiesRequest

 to the server and gets a single 

Highlight
color#DBDBDB

GetPropertiesResponse

 back. It is used to get all V-Ray properties for the active project.


GetPropertiesRequest

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message GetPropertiesRequest {

google.protobuf.Empty empty = 1;

}

  • GetPropertiesRequest has no properties.


GetPropertiesResponse

Panel
borderColor
Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

enum PropertyCategory message GetPropertiesResponse {

Global = 0;
Material bool success_status = 1;
Environment string message = 2;
Camera PropertyMap property_map = 3;
Local = 4;
Swarm = 5;
Channel = 6;
Proxy = 7;
VRayMaterial = 8;

};

  • PropertyCategory is enumeration that contains all possible property categories. Currently, the V-Ray for Revit Public API returns only properties from Camera, Channel, Environment, and Local categories.

 

PropertyValue

  • success_status: A boolean indicating whether the RPC succeeded.
  • message: A string containing an error message in case the RPC failed for some reason.
  • property_map: A 

    Highlight
    color#DBDBDB

    PropertyMap

     containing all properties of the active project.


PropertyMap

Panel
borderColor#DBDBDB
Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message PropertyValue {

oneof value
{

bool bool_value = 1;
int32 int_value = 2;
float float_value = 3;
string string_value = 4;
LightingAnalysisQuantity LightingAnalysisQuantity_value = 5;
LightingAnalysisScale LightingAnalysisScale_value = 6;
LightingAnalysisDisplay LightingAnalysisDisplay_value = 7;
DenoiserMode DenoiserMode_value = 8;
DenoiserEngine DenoiserEngine_value = 9;
DenoiserRadiusType DenoiserRadiusType_value = 10;
VRayRenderEngine VRayRenderEngine_value = 11;
VRayResolutionRatio VRayResolutionRatio_value = 12;
VRayResolutionDPIType VRayResolutionDPIType_value = 13;
VRayResolutionPrinterUnit VRayResolutionPrinterUnit_value = 14;
EnvironmentType EnvironmentType_value = 15;
ScreenPlacementType ScreenPlacementType_value = 16;
BackgroundType BackgroundType_value = 17;
VRaySceneQuality VRaySceneQuality_value = 18;
VRayImageSamplerType VRayImageSamplerType_value = 19;
VRayGIEngine VRayGIEngine_value = 20;
VRayLightEvaluation VRayLightEvaluation_value = 21;
VRayCameraMode VRayCameraMode_value = 22;
VRayCameraStereoLayout VRayCameraStereoLayout_value = 23;
VRayCameraFocusSource VRayCameraFocusSource_value = 24;
LightMixGroupBy LightMixGroupBy_value = 25;

AColor AColor_value = 26;
Color Color_value = 27;

}

}

  • value: Contains oneof the possible values for a property depending on its type.

 

GetProperty

Highlight
color#DBDBDB

GetProperty

 is a unary RPC that sends a single 
Highlight
color#DBDBDB

GetPropertyRequest

 to the server and gets a single 
Highlight
color#DBDBDB

GetPropertyResponse

 back. It is used to get a single V-Ray property from the active project.

...

PropertyMap {

map<string, Property> values = 1;

}

  • values: A map containing all properties, where the key is the unique name of the Property, and the value is the Property itself.


Property

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message Property {

string unique_name = 1;
string readable_name = 2;
string type = 3;
PropertyCategory category = 4;
PropertyValue value = 5;

}

  • unique_name: A string that contains the unique name of the property.
  • readable_name: A string that contains the human-friendly readable name of the property.
  • type: A string containing the type of the property, i.e. bool, int, string, etc.
  • category: A PropertyCategory containing the category of the property, i.e. Camera, Environment, etc.
  • value: A PropertyValue containing the value of the property.


PropertyCategory

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

enum PropertyCategory {

Global = 0;
Material = 1;
Environment = 2;
Camera = 3;
Local = 4;
Swarm = 5;
Channel = 6;
Proxy = 7;
VRayMaterial = 8;

};

  • PropertyCategory is enumeration that contains all possible property categories. Currently, the V-Ray for Revit Public API returns only properties from Camera, Channel, Environment, and Local categories.


PropertyValue

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message PropertyValue {

oneof value
{

bool bool_value = 1;
int32 int_value = 2;
float float_value = 3;
string string_value = 4;

LightingAnalysisQuantity LightingAnalysisQuantity_value = 5;
LightingAnalysisScale LightingAnalysisScale_value = 6;
LightingAnalysisDisplay LightingAnalysisDisplay_value = 7;
DenoiserMode DenoiserMode_value = 8;
DenoiserEngine DenoiserEngine_value = 9;
DenoiserRadiusType DenoiserRadiusType_value = 10;
VRayRenderEngine VRayRenderEngine_value = 11;
VRayResolutionRatio VRayResolutionRatio_value = 12;
VRayResolutionDPIType VRayResolutionDPIType_value = 13;
VRayResolutionPrinterUnit VRayResolutionPrinterUnit_value = 14;
EnvironmentType EnvironmentType_value = 15;
ScreenPlacementType ScreenPlacementType_value = 16;
BackgroundType BackgroundType_value = 17;
VRaySceneQuality VRaySceneQuality_value = 18;
VRayImageSamplerType VRayImageSamplerType_value = 19;
VRayGIEngine VRayGIEngine_value = 20;
VRayLightEvaluation VRayLightEvaluation_value = 21;
VRayCameraMode VRayCameraMode_value = 22;
VRayCameraStereoLayout VRayCameraStereoLayout_value = 23;
VRayCameraFocusSource VRayCameraFocusSource_value = 24;
LightMixGroupBy LightMixGroupBy_value = 25;
VRaySkyModel VRaySkyModel_value = 26;
VolumeVRayToonWidthUnits VolumeVRayToonWidthUnits_value = 27;

AColor AColor_value = 28;
Color Color_value = 29;

}

}

  • value: Contains oneof the possible values for a property depending on its type.


GetProperty

...

Highlight
color#DBDBDB

GetProperty

 is a unary RPC that sends a single 

Highlight
color#DBDBDB

GetPropertyRequest

 to the server and gets a single 

Highlight
color#DBDBDB

GetPropertyResponse

 back. It is used to get a single V-Ray property from the active project.


GetPropertyRequest

Panel
borderColor#DBDBDB
borderWidth1
language
Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message GetPropertyRequest {

string unique_name = 1;

}

  • unique_name: A string that contains the unique name of the property.

...


GetPropertyResponse

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message GetPropertyResponse {

bool success_status = 1;
string message = 2;
Property property = 3;

}

  • success_status: A boolean indicating whether the RPC succeeded.
  • message: A string containing an error message in case the RPC failed for some reason.
  • property: A Property instance representing the requested property.

 


SetProperty

...

Highlight
color#DBDBDB

SetProperty

 is a unary RPC that sends a single 

Highlight
color#DBDBDB

SetPropertyRequest

 to the server and gets a single 

Highlight
color#DBDBDB

SetPropertyResponse

 back. It is used to set a single V-Ray property in the active project.

...

  • unique_name: A string that contains the unique name of the property.
  • value: A PropertyValue containing the value to be set to the property.

 


SetPropertyResponse

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message SetPropertyResponse {

bool success_status = 1;
string message = 2;

}

  • success_status: A boolean indicating whether the RPC succeeded.
  • message: A string containing an error message in case the RPC failed for some reason.

...


ExportVRScene

...

Highlight
color#DBDBDB

ExportVRScene

 is a unary RPC that sends a single 

Highlight
color#DBDBDB

ExportVRSceneRequest

 to the server and gets a single 

Highlight
color#DBDBDB

ExportVRSceneResponse

 back. It is used to export a V-Ray Scene of the currently selected 3D View.

 


ExportVRSceneRequest

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message ExportVRSceneRequest {

string export_file_path = 1;
bool export_compressed = 2;
bool export_hex_format = 3;
bool export_as_archive = 4;

}

  • export_file_path: A string containing the absolute path where the V-Ray Scene should be exported.
  • export_compressed: A boolean indicating whehter to compress plugin property values of lists. Requires export_hex_format to be true.
  • export_hex_format: A boolean indicating whether to use hex format for arrays and transforms in the V-Ray Scene.
  • export_as_archive: A boolean indicating whether to export the V-Ray Scene as a 7-Zip archive along with all referenced assets, i.e. textures, HDRs, images, etc.

 


ExportVRSceneResponse

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message ExportVRSceneResponse {

bool success_status = 1;
string message = 2;

}

  • success_status: A boolean indicating whether the RPC succeeded.
  • message: If the RPC succeeded, this message would contain the actual path of the exported scene. If the RPC failed, this would be a string containing an error message.

...


GetVRayMaterials

...

Highlight
color#DBDBDB

GetVRayMaterials

 is a unary RPC that sends a single 

Highlight
color#DBDBDB

GetVRayMaterialsRequest

 to the server and gets a single 

Highlight
color#DBDBDB

GetVRayMaterialsResponse

 back. It is used to obtain the names of all V-Ray materials in the project. This information is later used when saving a V-Ray material to a .vrmat file.

...

  • GetVRayMaterialsRequest has no properties.

...


GetVRayMaterialsResponse

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message GetVRayMaterialsResponse {

bool success_status = 1;
string message = 2;
repeated string material_names = 3;

}

  • success_status: A boolean indicating whether the RPC succeeded.
  • message: A string containing an error message in case the RPC failed for some reason.
  • material_names: A repeated string field containing the names of all V-Ray materials in the project.

 


SaveVRayMaterialToFile

...

Highlight
color#DBDBDB

SaveVRayMaterialToFile

 is a unary RPC that sends a single 

Highlight
color#DBDBDB

SaveVRayMaterialToFileRequest

 to the server and gets a single 

Highlight
color#DBDBDB

SaveVRayMaterialToFileResponse

 back. It is used to save a V-Ray material along with all of its assets to the file system. When the material is saved, a folder named 

Highlight
color#DBDBDB

maps

 appears next to the .vrmat file. This folder contains all assets, i.e. textures, used by the material. Always keep the 

Highlight
color#DBDBDB

maps

 folder and the .vrmat file in the same folder.

...

  • material_name: A string containing the name of the V-Ray material that should be saved.
  • file_path: A string containing the absolute path where the V-Ray Material should be saved.

...


SaveVRayMaterialToFileResponse

...

  • success_status: A boolean indicating whether the RPC succeeded.
  • message: If the RPC failed, this would be a string containing an error message.

...


Enums and custom types

...


LightingAnalysisQuantity

...

  • Linear: The colors are mapped in linear scale.
  • Logarithmic: The colors are mapped in logarithmic scale.

...


LightingAnalysisDisplay

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

enum LightingAnalysisDisplay {

FalseColors = 0;
GridOverlay = 1;

}

  • FalseColors: Fills the frame with a gradient ranging from blue (low values) to red (high values). For the out of range values it uses, respectively, black and white.
  • GridOverlay: Displays the values at distinct grid points over the frame. They use the same grading colors.

...


DenoiserMode

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

enum DenoiserMode {

ReplaceRGB = 0;
DoNotCalculate = 1;
GenerateChannel = 2;

}

  • ReplaceRGB: Generates all render elements required for denoising, but does not compute a denoised version of the image, neither is the VRayDenoiser render element present.
  • DoNotCalculate: The VRayDenoiser channel is not present separately in the VFB. The effectsResult channel is generated with the denoised image.
  • GenerateChannel: The VRayDenoiser and effectsResult channels are generated.

...


DenoiserEngine

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

enum DenoiserEngine {

Default = 0;
NVIDIA = 1;

}

  • Default: Default V-Ray Denoiser
  • NVIDIA: NVidia Al Denoiser

 


DenoiserRadiusType

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

enum DenoiserRadiusType {

CustomType = 0;
Mild = 1;
Normal = 2;
Strong = 3;

}

  • CustomType: Allows the strength and radius parameters to be set to custom values.
  • Mild: Applies a subtler level of denoising than the Default preset.
  • Normal: Applies default denoising.
  • Strong: Applies a stronger level of denoising than the Default preset.

...


VRayRenderEngine

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

enum VRayRenderEngine {

CPU = 0;
GPU = 4;
RTX = 7;

}

  • CPU: CPU
  • GPU: CUDA(GPU)
  • RTX: RTX(GPU)

...


VRayResolutionRatio

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

enum VRayResolutionRatio {

Widescreen = 0;
Screen = 1;
Square = 2;
Picture = 3;
Landscape = 4;
Portrait = 5;
CropRegion = 6;
Custom = 7;

}

...

  • DPI75: 75 dpi
  • DPI96: 96 dpi
  • DPI150: 150 dpi
  • DPI300: 300 dpi
  • DPI600: 600 dpi

...


VRayResolutionPrinterUnit

...

  • Inches: Inches
  • Millimeters: Millimeters

...


EnvironmentType

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

enum EnvironmentType {

Sun = 0;
Dome = 1;
None = 2;

}

  • Sun: V-Ray Sun
  • Dome: V-Ray Dome Light
  • None: No V-Ray Lights

...


ScreenPlacementType

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

enum ScreenPlacementType {

ScreenPlacement = 0;
SphericalPlacement = 1;

}

  • ScreenPlacement: Screen Placement
  • SphericalPlacement: SphericalPlacement

...


BackgroundType

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

enum BackgroundType {

NoBackground = 0;
CustomBackground = 1;
RevitBackground = 2;

}

  • NoBackground: No Background
  • CustomBackground: Custom Background
  • RevitBackground: Revit Background

...


VRaySceneQuality

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

enum VRaySceneQuality {

Draft = 0;
Low = 1;
Medium = 2;
High = 3;
VeryHigh = 4;

}

  • Draft: Draft Quality
  • Low: Low Quality
  • Medium: Medium Quality
  • High: High Quality
  • VeryHigh: VeryHigh Quality

...


VRayImageSamplerType

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

enum VRayImageSamplerType  {

UnusedVRayImageSamplerType = 0;
Buckets = 1;
Progressive = 3;

}

  • UnusedVRayImageSamplerType: NEVER USE THIS VALUE. IT WAS INTRODUCED DUE TO PROTO SYNTAX LIMITATIONS.
  • Buckets: This sampler takes a variable number of samples per pixel based on the difference in intensity between the pixel and its neighbors.
  • Progressive: This is the default image sampler set in V-Ray for Revit. It renders the entire image progressively in passes.

...


VRayGIEngine

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

enum VRayGIEngine {

IrradianceMap = 0;
BruteForce = 2;
LightCache = 3;

}

  • IrradianceMap: Indirect Illumination is computed for a few points in a scene. The remaining points use interpolated values. It is built adaptively but is view-dependent.
  • BruteForce: The simplest approach where indirect illumination is computed individually for each shaded surface point.
  • LightCache: Traces multiple paths from the camera. It is view-dependent, but handles details and corners better.

...


VRayLightEvaluation

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

enum VRayLightEvaluation {

Full = 0;
Adaptive = 2;

}

...

  • Standard: A traditional pinhole camera.
  • Orthogonal: An orthogonal camera.
  • SphericalPanorama: Spherical camera with independent horizontal and vertical FOV selection that is useful for generating latlong images for spherical VR use.
  • Cube: A variant of the Box camera with the cube sides arranged in a single row. Unlike the Box camera output, Cube6x1 does not produce an empty space in the output image and is useful for generating cubic VR output.

...


VRayCameraStereoLayout

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

enum VRayCameraStereoLayout {

UnusedVRayCameraStereoLayout = 0;
SideBySide = 1;
TopBottom = 2;

}

...

  • FixedDistance: Fixes the camera focus to the Focus Distance value.
  • FixedPoint: The focus distance is automatically calculated before the rendering starts, and equals the distance between the camera position and the 3D point selected using the Pick Focus Point Command from the toolbar menu. If no point has been selected, the camera target is used as a default point instead.

 

...


LightMixGroupBy

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message AColor enum LightMixGroupBy {

float r FamilyType = 10;
float g IndividualLights = 21;
float b LightGroups = 32;float alpha = 4;

}

  • r: Value between 0.0 and 1.0 for the red color.
  • g: Value between 0.0 and 1.0 for the green color.
  • b: Value between 0.0 and 1.0 for the blue color.
  • alpha: Value between 0.0 and 1.0 for the alpha.

 

Color

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message Color {

float r = 1;
float g = 2;
float b = 3;

}

  • r: Value between 0.0 and 1.0 for the red color.
  • g: Value between 0.0 and 1.0 for the green color.
  • b: Value between 0.0 and 1.0 for the blue color.

 

Code Samples (C#)

 

Obtaining the Server Port

In order to connect to the Public API Server, the client needs to know which port the server is running on. When the the V-Ray for Revit Public API Server starts, it chooses a random free port to start on and writes this information in the 

Highlight
color#DBDBDB

C:\Users\%USERPROFILE%\AppData\Roaming\Chaos Group\V-Ray for Revit 20XX\config.json

, where 
Highlight
color#DBDBDB

XX

 is the Revit version. When your code is running from within a Revit Addin, use the current process id (i.e. of Revit.exe) to locate the V-Ray for Revit API Server running in the same instance of Revit.exe. When your code is running from a standalone application (console app, WPF app, etc.) and there is more than one instance of the same Revit.exe version running, it is up to you to decide to which instance of V-Ray for Revit API Server to connect to.

Here is how the 

Highlight
color#DBDBDB

apiServers

 entry might look like in config.json:

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

"apiServers": [

{

"PID": 22920,
"port": 58538

},
{

"PID": 14792,
"port": 58611

}

]

And here is how you can obtain the port, depending on whether your code is executing from within a Revit Addin or from standalone application:

...

borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

private const int RevitVersion = 2020;
private static readonly string ConfigJsonPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),

$"Chaos Group\\V-Ray for Revit {RevitVersion}", "config.json");

private static int GetServerPort()

{

var runningInRevitAddon = true;

using (var reader = new StreamReader(ConfigJsonPath))
{

var json = JObject.Parse(reader.ReadToEnd());

...

JObject apiServer;
if (runningInRevitAddon)
{

apiServer = apiServers.OfType<JObject>().SingleOrDefault(jo => (int)jo["PID"] == Process.GetCurrentProcess().Id);

}
else
{

apiServer = apiServers.OfType<JObject>().FirstOrDefault();

}

if (apiServer != null)
{

return (int)apiServer["port"];

}

}

}

return -1;

}

  • FamilyType: All instances of the same family type are put in a separate Light Select.
  • IndividualLights: Each light goes to a separate Light Select.
  • LightGroups: Separate Light Select for each group of lights.


VRaySkyModel

Panel

enum VRaySkyModel {

Preetham = 0;
CIEClear = 1;
CIEOvercast = 2;
Hosek = 3;
Improved = 4;

}

  • Preetham: V-Ray Sky procedural texture is generated based on the Preetham et al. method. (UI label: Preetham et al.)
  • CIEClear: V-Ray Sky procedural texture is generated based on the CIE method for clear sky. (UI label: CIE Clear)
  • CIEOvercast: V-Ray Sky procedural texture is generated based on the CIE method for cloudy sky. (UI label: CIE Overcast)
  • Hosek: V-Ray Sky procedural texture is generated based on the Hosek et al. method. (UI label: Hosek et al.)
  • Improved: V-Ray Sky procedural texture is generated based on the Improved method which has enhanced sunrise and sunset sky. (UI label: PRG Clear Sky)


VolumeVRayToonWidthUnits

Panel

enum VolumeVRayToonWidthUnits

Pixels = 0;
Project = 1;

}

  • Pixels: Specifies that all of the Contour parameters are considered in pixels.
  • Project: Specifies that all of the Contour parameters are considered in the project units.


AColor

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message AColor {

float r = 1;
float g = 2;
float b = 3;
float alpha = 4;

}

  • r: Value between 0.0 and 1.0 for the red color.
  • g: Value between 0.0 and 1.0 for the green color.
  • b: Value between 0.0 and 1.0 for the blue color.
  • alpha: Value between 0.0 and 1.0 for the alpha.


Color

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

message Color {

float r = 1;
float g = 2;
float b = 3;

}

  • r: Value between 0.0 and 1.0 for the red color.
  • g: Value between 0.0 and 1.0 for the green color.
  • b: Value between 0.0 and 1.0 for the blue color.


Code Samples (C#)

...


Obtaining the Server Port

In order to connect to the Public API Server, the client needs to know which port the server is running on. When the the V-Ray for Revit Public API Server starts, it chooses a random free port to start on and writes this information in the 

Highlight
color#DBDBDB

C:\Users\%USERPROFILE%\AppData\Roaming\Chaos\V-Ray for Revit 20##\config.json

, where 

Highlight
color#DBDBDB

##

 is the Revit version. When your code is running from within a Revit Addin, use the current process id (i.e. of Revit.exe) to locate the V-Ray for Revit API Server running in the same instance of Revit.exe. When your code is running from a standalone application (console app, WPF app, etc.) and there is more than one instance of the same Revit.exe version running, it is up to you to decide to which instance of V-Ray for Revit API Server to connect to.

Here is how the 

Highlight
color#DBDBDB

apiServers

 entry might look like in config.json:

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

"apiServers": [

{

"PID": 22920,
"port": 58538

},
{

"PID": 14792,
"port": 58611

}

]

And here is how you can obtain the port, depending on whether your code is executing from within a Revit Addin or from standalone application:

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

private const int RevitVersion = 2020;
private static readonly string ConfigJsonPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),

$"Chaos \\V-Ray for Revit {RevitVersion}", "config.json");

private static int GetServerPort()

{

var runningInRevitAddon = true;

using (var reader = new StreamReader(ConfigJsonPath))
{

var json = JObject.Parse(reader.ReadToEnd());

var apiServers = json["apiServers"] as JArray;

if (apiServers != null && apiServers.Count > 0)
{

JObject apiServer;
if (runningInRevitAddon)
{

apiServer = apiServers.OfType<JObject>().SingleOrDefault(jo => (int)jo["PID"] == Process.GetCurrentProcess().Id);

}
else
{

apiServer = apiServers.OfType<JObject>().FirstOrDefault();

}

if (apiServer != null)
{

return (int)apiServer["port"];

}

}

}

return -1;

}


When the Public API Server is shutdown, i.e. the user closes Revit, its entry is deleted from 

Highlight
color#DBDBDB

config.json

.

Note that the code above uses the Newtonsoft Json.NET library, but you can read the json file in any way that you prefer.


Connecting to the Server

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

public async Task<bool> ConnectAsync()

{

var serverPort = GetServerPort();
if (serverPort != -1)
{

this.channel = new Channel($"localhost:{serverPort}", ChannelCredentials.Insecure);

var deadline = DateTime.UtcNow.AddSeconds(1);
try
{

await this.channel.ConnectAsync(deadline);

return true;

}
catch (TaskCanceledException)
{

return false;

}

}
else
{

Debug.WriteLine("Public API Server has not started yet!");
return false;

}

}

Highlight
color#DBDBDB

GetServerPort

is from the previous code snippet.


Get the active project name

 

When the Public API Server is shutdown, i.e. the user closes Revit, its entry is deleted from 

Highlight
color#DBDBDB

config.json

.

Note that the code above uses the Newtonsoft Json.NET library, but you can read the json file in any way that you prefer.

 

...

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

public async Task<bool> ConnectAsyncTask<string> GetProjectNameAsync()
{

try
{

var

serverPort

client =

GetServerPort

new ApiServerClient(this.channel);

if (serverPort != -1)
{

this.channel = new Channel($"localhost:{serverPort}", ChannelCredentials.Insecure);

var deadline = DateTime.UtcNow.AddSeconds(1);
try
{

await this.channel.ConnectAsync(deadline);

return true;

var response = await client.GetProjectNameAsync(new GetProjectNameRequest());
if (response.SuccessStatus)
{

return response.ProjectName;

}
else
{

MessageBox.Show(response.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return string.Empty;

}

}
catch (

TaskCanceledException

RpcException e)
{

return false;

}

}
else
{

Debug.WriteLine("Public API Server has not started yet!"e);
return falsestring.Empty;

}

}

Highlight
color#DBDBDB

...

GetServerPort

...

 

...

ApiServerClient

Highlight
color#DBDBDB
GetProjectNameRequest

, and 

Highlight
color#DBDBDB

GetProjectNameResponse

 are all classes auto-generated by the proto-buffer compiler.


Get all 3D Views from the active project

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

public async Task<string> GetProjectNameAsyncTask<IEnumerable<View>> GetViewsAsync()
{

try
{

var client = new ApiServerClient(this.channel);
var response = await client.GetProjectNameAsyncGetViewsAsync(new GetProjectNameRequestGetViewsRequest());
if (response.SuccessStatus)
{

return response.ViewMap.Values.ProjectNameValues;

}
else
{

MessageBox.Show(response.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return stringEnumerable.EmptyEmpty<View>();

}

}
catch (RpcException e)
{

Debug.WriteLine(e);
return stringEnumerable.EmptyEmpty<View>();

}

}

Highlight
color#DBDBDB

ApiServerClient

Highlight
color#DBDBDB

...

GetViewsRequest

, and 

Highlight
color#DBDBDB

...

GetViewsResponse

 are all classes auto-generated by the proto-buffer compiler.

 

...


Select a 3D View

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

public async Task<IEnumerable<View>> GetViewsAsyncTask<bool> SelectViewAsync(string uniqueId)
{

try
{

var client = new ApiServerClient(this.channel);
var response = await client.GetViewsAsyncSelectViewAsync(new GetViewsRequestSelectViewRequest() { UniqueId = uniqueId });

if (response.SuccessStatus)
{

return response.ViewMap.Values.Valuestrue;

}
else
{

MessageBox.Show(response.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return Enumerable.Empty<View>()false;

}

}
catch (RpcException e)
{

Debug.WriteLine(e);
return Enumerable.Empty<View>();

}

}

Highlight
color#DBDBDB

ApiServerClient

...

Highlight
color#DBDBDB

GetViewsRequest

...

e);
return false;

}

}

...

Highlight
color#DBDBDB

...

GetViewsResponse

...

uniqueId

 is one of the unique ids of the views retrieved in the previous code snippet.


Set Batch Render for

 

...

a 3D View

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

public async Task<bool> SelectViewAsyncSetBatchRenderViewAsync(string uniqueId, bool batchRender)
{

try
{

var client = new ApiServerClient(this.channel);
var response = await client.SelectViewAsyncSetBatchRenderViewAsync(new SelectViewRequestSetBatchRenderViewRequest() { UniqueId = uniqueId, BatchRender = batchRender });
if (response.SuccessStatus)
{

return truereturn true;

}
else
{

MessageBox.Show(response.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return false;

}

}
catch (RpcException e)
{

Debug.WriteLine(e);
return falsereturn false;

}

}

Highlight
color#DBDBDB

uniqueId

 is is one of the unique ids of the views retrieved in the previous code snippet.retrieved in the GetViews code snippet.

Highlight
color#DBDBDB

batchRender

is a boolean value specifying whether the view will be rendered in a Batch Render. 


Get all properties

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

public async Task<IEnumerable<Property>> GetPropertiesAsync()
{

try
{

var client = new ApiServerClient(this.channel);
var response = await client.GetPropertiesAsync(new GetPropertiesRequest());
if (response.SuccessStatus)
{

return response.PropertyMap.Values.Values;

}
else
{

MessageBox.Show(response.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return Enumerable.Empty<Property>();

}

}
catch (RpcException e)
{

Debug.WriteLine(e);
return Enumerable.Empty<Property>();

}

}

Highlight
color#DBDBDB

ApiServerClient

Highlight
color#DBDBDB

GetPropertiesRequest

, and 

Highlight
color#DBDBDB

GetPropertiesResponse

 are all classes auto-generated by the proto-buffer compiler. 


Get a single property

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

public async Task<Property> GetPropertyAsync(string uniqueName)
{

try
{

var client = new ApiServerClient(this.channel);
var response = await client.GetPropertyAsync(new GetPropertyRequest() { UniqueName = uniqueName });
if (response.SuccessStatus)
{

return response.Property;

}
else
{

MessageBox.Show(response.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return null;

}

}
catch (RpcException e)
{

Debug.WriteLine(e);
return null;

}

}

Highlight
color#DBDBDB

uniqueName 

is one of the unique names of the properties retrieved in the previous code snippet.

 


Set property

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

 public async Task<bool> SetPropertyAsync(string uniqueName, PropertyValue propertyValue)
{

try
{

var client = new ApiServerClient(this.channel);

var request = new SetPropertyRequest()
{

UniqueName = uniqueName,
Value = propertyValue

};

var response = await client.SetPropertyAsync(request);

if (response.SuccessStatus)
{

return true;

}
else
{

MessageBox.Show(response.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return false;

}

}
catch (RpcException e)
{

Debug.WriteLine(e);
return false;

}

}

Highlight
color#DBDBDB

uniqueName

 is one of the unique names of the properties retrieved in the 

Highlight
color#DBDBDB

Get all properties

 code snippet. 

Highlight
color#DBDBDB

propertyValue

 is a 

Highlight
color#DBDBDB

PropertyValue

 initialized with the correct type of value, based on the property type. The 7 code snippets below use the method defined in this code snippet.

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

var uniqueName = "GlobalArtificialLightsEnabled";
var propertyValue = new PropertyValue() { BoolValue = true };
SetPropertyAsync(uniqueName, propertyValue);

...


Set int property

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

var uniqueName = "customResolutionWidth";
var propertyValue = new PropertyValue() { IntValue = 800 };
SetPropertyAsync(uniqueName, propertyValue);

...


Set float property

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

var uniqueName = "GlobalArtificialLightsIntensity";
var propertyValue = new PropertyValue() { FloatValue = 2.0f };
SetPropertyAsync(uniqueName, propertyValue);

...


Set string property

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

var uniqueName = "backgroundImagePath";
var propertyValue = new PropertyValue() { StringValue = "C:\myimage.png" };
SetPropertyAsync(uniqueName, propertyValue);

...


Set enum property

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

var uniqueName = "environmentType";
var propertyValue = new PropertyValue() { EnvironmentTypeValue = EnvironmentType.Dome };
SetPropertyAsync(uniqueName, propertyValue);

...


Set AColor property

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

var uniqueName = "EnvFogColor";
var propertyValue = new PropertyValue() { AColorValue = new AColor() { R = 0.5f, G = 0.5f, B = 0.5f, Alpha = 1.0f } };
SetPropertyAsync(uniqueName, propertyValue);

 


Set Color property

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

var uniqueName = "SunFilterColor";
var propertyValue = new PropertyValue() { ColorValue = new Color() { R = 0.5f, G = 0.5f, B = 0.5f } };
SetPropertyAsync(uniqueName, propertyValue);

...


Export V-Ray Scene

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

public async Task<Tuple<bool, string>> ExportVRSceneAsync(string exportFilePath, bool exportAsArchive, bool exportCompressed, bool exportHexFormat)

{

try
{

var client = new ApiServerClient(this.channel);
try
{

var response = await client.ExportVRSceneAsync(new ExportVRSceneRequest()
{

ExportFilePath = exportFilePath,
ExportAsArchive = exportAsArchive,
ExportCompressed = exportCompressed,
ExportHexFormat = exportHexFormat

});

// If the export was successfull, response.Message will contain the
// actual file path of the exported V-Ray Scene
return new Tuple<bool, string>(response.SuccessStatus, response.Message);

}
catch (TaskCanceledException e)
{

Debug.WriteLine(e);
return new Tuple<bool, string>(false, e.ToString());

}

}
catch (RpcException e)
{

Debug.WriteLine(e);
await this.ShutdownAsync();
return new Tuple<bool, string>(false, e.ToString());

}

}

Highlight
color#DBDBDB

ApiServerClient

Highlight
color#DBDBDB

ExportVRSceneRequest

, and

Highlight
color#DBDBDB

ExportVRSceneResponse

 are all classes auto-generated by the proto-buffer compiler.

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

public async Task<IEnumerable<string>> GetVRayMaterialsAsync()
{

try
{

var client = new ApiServerClient(this.channel);

var response = await client.GetVRayMaterialsAsync(new GetVRayMaterialsRequest());
if (response.SuccessStatus)
{

return response.MaterialNames;

}
else
{

MessageBox.Show(response.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return Enumerable.Empty<string>();

}

}
catch (RpcException e)
{

Debug.WriteLine(e);
return Enumerable.Empty<string>();

}

}

Highlight
color#DBDBDB

ApiServerClient

Highlight
color#DBDBDB

GetVRayMaterialsRequest

, and 

Highlight
color#DBDBDB

GetVRayMaterialsResponse

 are all classes auto-generated by the proto-buffer compiler.

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

public async Task<Tuple<bool, string>> SaveVRayMaterialToFileAsync(string materialName, string filePath)

{

try
{

var client = new ApiServerClient(this.channel);
try
{

var response = await client.SaveVRayMaterialToFileAsync(new SaveVRayMaterialToFileRequest()
{

MaterialName = materialName,
FilePath = filePath

});

return new Tuple<bool, string>(response.SuccessStatus, response.Message);

}
catch (TaskCanceledException e)
{

Debug.WriteLine(e);
return new Tuple<bool, string>(false, e.ToString());

}

}
catch (RpcException e)
{

Debug.WriteLine(e);
return new Tuple<bool, string>(false, e.ToString());

}

}

Highlight
color#DBDBDB

ApiServerClient

Highlight
color#DBDBDB

SaveVRayMaterialToFileRequest

, and 

Highlight
color#DBDBDB

SaveVRayMaterialToFileResponse

 are all classes auto-generated by the proto-buffer compiler.

...

Panel
borderColor#DBDBDB
borderWidth1
languagexml
themeConfluence
borderStylesolid

public async void ListenForProjectChangedAsync()
{

try
{

var client = new ApiServerClient(this.channel);

using (var call = client.GetProjectChangedNotificationStream(new GetProjectChangedNotificationStreamRequest(), null, null, this.cts.Token))
{

while (await call.ResponseStream.MoveNext())
{

var projectName = call.ResponseStream.Current.ProjectName;
Debug.WriteLine("Project has changed to " + projectName);

}

}

}
catch (RpcException e)
{

Debug.WriteLine(e);

}

}

...


Resources

...

Fancy Bullets
typecircle

...


V-Ray for Revit Public API Client Reference Implementation

...

After you install V-Ray for Revit, you can find a reference implementation of a C# client at the following location: C:\Program Files\Chaos Group\V-Ray\V-Ray for Revit\PublicAPIClient.zip. Unzip the archive somewhere on your machine and explore the Visual Studio solution. Most of the code snippets above are taken directly from this sample application. The sample application is just a reference implementation and is provided as is.

 

from this sample application. The sample application is just a reference implementation and is provided as is.

UI Text Box
typenote

For versions prior to V-Ray 7, the default location of the reference implementation of a C# client is C:\Program Files\Chaos Group\V-Ray\V-Ray for Revit\PublicAPIClient.zip.



Section
 
Column
width20%


Column
width60%

Image RemovedImage Added 

 
Column
width20%




Copyrights

...

Copyright (c) 2016-2023, Chaos Software EOOD

All rights reserved. These coded instructions, statements and computer programs contain information proprietary to Chaos Software EOOD, which is protected by the appropriate copyright laws and may not be disclosed to third parties or copied or duplicated, in whole or in part, without prior written consent of Chaos Software EOOD.