Click or drag to resize

RenderMaterialConverterToRenderMaterial Method

Converts the specified Autodesk.Revit.DB.Material to an equivalent Rhino.Render.RenderMaterial in given Rhino.RhinoDoc.

Namespace:  RhinoInside.Revit.Convert.Render
Assembly:  RhinoInside.Revit (in RhinoInside.Revit.dll) Version: 1.7.8130
Syntax
public static Rhino.Render.RenderMaterial ToRenderMaterial(
	this Autodesk.Revit.DB.Material material,
	Rhino.RhinoDoc rhinoDoc
)

Parameters

material
Type: Autodesk.Revit.DB.Material
Revit material to convert.
rhinoDoc
Type: Rhino.RhinoDoc
Rhino document to associate the resulting material with.

Return Value

Type: Rhino.Render.RenderMaterial
Rhino renderMaterial that is equivalent to the provided Revit material.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Autodesk.Revit.DB.Material. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Examples
Using ToRenderMaterial(Material, RhinoDoc) as extension method:
using Rhino;
using DB = Autodesk.Revit.DB;
using RhinoInside.Revit.Convert.Render;

RhinoDoc doc = Rhino.RhinoDoc.ActiveDoc;
RenderMaterial rhinoMaterial = revitMaterial.ToRenderMaterial(doc);
Using ToRenderMaterial(Material, RhinoDoc) as static method:
using Rhino;
using DB = Autodesk.Revit.DB;
using RhinoInside.Revit.Convert.Render;

RhinoDoc doc = Rhino.RhinoDoc.ActiveDoc;
RenderMaterial rhinoMaterial = RenderMaterialConverter.ToRenderMaterial(revitMaterial, doc);
See Also