Select to view content in your preferred language

How to add AGV Video in ArcEngine?

2223
2
Jump to solution
08-30-2014 08:07 AM
xiaoGL
by
Deactivated User

I want to add .agv file as VideoLayer in  ArcEngine, but I don't know how to add .agv file !

0 Kudos
1 Solution

Accepted Solutions
xiaoGL
by
Deactivated User

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);

View solution in original post

0 Kudos
2 Replies
xiaoGL
by
Deactivated User

I use IFileName and ILayerFactoryHelper to add .agv file, but this interfaces don't running ! Who known achieve this? thanks!

0 Kudos
xiaoGL
by
Deactivated User

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);

0 Kudos