I want to add .agv file as VideoLayer in ArcEngine, but I don't know how to add .agv file !
Solved! Go to Solution.
I finally can add .agv file in ArcEngine,code as follow:
ESRI.ArcGIS.esriSystem.IFileName pFileName = new ESRI.ArcGIS.esriSystem.FileNameClass();
pFileName.Path = agvFile;
ESRI.ArcGIS.esriSystem.IName pName = pFileName as ESRI.ArcGIS.esriSystem.IName;
IGeoVideoLayer pVideoLayer = new GeoVideoLayerClass();
IDataLayer pDataLayer = pVideoLayer as IDataLayer;
pDataLayer.DataSourceName = pName;
ESRI.ArcGIS.Carto.ILayer pLayer = pVideoLayer as ESRI.ArcGIS.Carto.ILayer;
scene.AddLayer(pLayer, true);
I use IFileName and ILayerFactoryHelper to add .agv file, but this interfaces don't running ! Who known achieve this? thanks!
I finally can add .agv file in ArcEngine,code as follow:
ESRI.ArcGIS.esriSystem.IFileName pFileName = new ESRI.ArcGIS.esriSystem.FileNameClass();
pFileName.Path = agvFile;
ESRI.ArcGIS.esriSystem.IName pName = pFileName as ESRI.ArcGIS.esriSystem.IName;
IGeoVideoLayer pVideoLayer = new GeoVideoLayerClass();
IDataLayer pDataLayer = pVideoLayer as IDataLayer;
pDataLayer.DataSourceName = pName;
ESRI.ArcGIS.Carto.ILayer pLayer = pVideoLayer as ESRI.ArcGIS.Carto.ILayer;
scene.AddLayer(pLayer, true);