Hi,
I think you have to set the right spatial reference after setting the point coordinates and then project it to the reference of the scene.
pt.SpatialReference = layer.SpatialReference;
pt.Project(m_sceneHookHelper.Scene.SpatialReference);
hi,Thanks for your answer ,i noticed that the spatialreference property in Ilayer and IFeaturelayer is writeonly,
Public RasterLayer As IRasterLayer
Public lyr As ILayer
lyr = GetLayer(m_pDEMname)
RasterLayer = CType(lyr, IRasterLayer)
Private Function GetLayer(ByVal name As String) As ILayer
'Dim layer As ILayer
For i As Integer = 0 To m_pScene.LayerCount - 1
If m_pScene.Layer(i).Name = name Then
Return m_pScene.Layer(i)
End If
Next
Return Nothing
End Function
when i use lyr.spatialrefere or rasterlayer.spatialreference,all can't assign to pt.spatialreference,cause it's write only, so I write the code like that Dim pBasicmap As IBasicMap
'Dim ilayer As ILayer
'ilayer = CType(m_pScenecontrol.CustomProperty, ILayer)
pBasicmap = CType(m_pScenecontrol.Scene, IBasicMap)
'pBasicmap.DeleteLayer(ilayer)
pt.SpatialReference = pBasicmap.SpatialReference
pt.Project(m_pScenecontrol.Scene.SpatialReference)
but the result still don't change. cause i am a newcomer ,and people around me can't do this either ,so i have to turn to you.please... with all due respect, could tell me your e-mail ,i have so many questions ...Really appreciate!