Using Arc 9.3.1 & VS2008.
Having trouble with converting spatial reference to PCS on a new development system only. This worked fine on my previous development system (XP), and works fine on a production system (Win7). But on the new system the conversion to PCS below always returns a null object reference.
public override void Draw(ESRI.ArcGIS.esriSystem.esriDrawPhase drawPhase, IDisplay Display, ESRI.ArcGIS.esriSystem.ITrackCancel trackCancel)
{
if (!m_bValid || !m_visible)
return;
if (drawPhase != ESRI.ArcGIS.esriSystem.esriDrawPhase.esriDPGeography)
return;
IProjectedCoordinateSystem5 pcs5 = Display.DisplayTransformation.SpatialReference as IProjectedCoordinateSystem5;
// then the work is done which just puts markers on the map
...
}
Any ideas on why this is broken on my new development system?
Thank you if you can help!