VRMLExporter usage pattern

1074
0
09-07-2016 11:02 PM
TamasBalazs
New Contributor

Hi,

I am required to export TIN data into WRL format using ArcObjects .NET SDK. So far I managed to come up with the following routine, that seems fine - but the created WRL file is empty.

My code is as follows:

ESRI.ArcGIS.Analyst3D.Scene sc = new ESRI.ArcGIS.Analyst3D.Scene();
TinLayer tl = new TinLayer();
TinClass t = new ESRI.ArcGIS.Geodatabase.TinClass();
t.Init("C:\\Data\\3DModels\\MtCoolum\\sw_508000_7061000_1k_class_l10");
tl.Dataset = t;

//some test printouts
Console.WriteLine(tl.Dataset.DataEdgeCount);  //reasonable result in console, hence TinLayer is created from Tin t object


Console.WriteLine(t.TriangleCount); //reasonable result in console
sc.AddLayer(tl);

Console.WriteLine(sc.LayerCount); //layer count is 1 - so layer is added to Scene
Console.WriteLine(sc.get_Layer(0).Visible); //layer is visible

VRMLExporter vrmlExporter = new VRMLExporter();
vrmlExporter.ExportFileName = "C:\\Data\\test.wrl";

vrmlExporter.ExportScene(sc);

Everything works fine, but the created test.wrl is an empty file. The t TinClass instance seems all good, values and parameters related to this instance are all seem correct upon checking. I could not find any further parameters I can configure on VRMLExporter instance.

Any help will be appreciated.

Tamas

0 Kudos
0 Replies