寻求代码转换vb——》delphi (关于ARCSCENE开发)(200分)

  • 主题发起人 主题发起人 snapper
  • 开始时间 开始时间
S

snapper

Unregistered / Unconfirmed
GUEST, unregistred user!
Private Sub Command1_Click()
'添加数据
Dim pgxdialog As IGxDialog
Dim pEnumGxobject As IEnumGxObject
Dim pFilter As IGxObjectFilter
Set pFilter = New GxFilterFeatureDatasetsAndFeatureClasses
Set pgxdialog = New GxDialog
'Dim pgxobject As IGxObject
pgxdialog.AllowMultiSelect = True
pgxdialog.StartingLocation = "f:"
pgxdialog.Title = "select files for input"
pgxdialog.ButtonCaption = "go!"
Set pgxdialog.ObjectFilter = pFilter
pgxdialog.DoModalOpen Form1.hWnd, pEnumGxobject
If pEnumGxobject Is Nothing then
Exit Sub

Dim pGxObject As IGxDataset

Dim pFLayer As IFeatureLayer
Set pFLayer = New FeatureLayer
Set pGxObject = pEnumGxobject.Next

If pGxObject Is Nothing then
Exit Sub
While Not pGxObject Is Nothing
'If TypeOf pGxObject.Dataset Is IFeatureClass then

Set pFLayer.FeatureClass = pGxObject.Dataset
pFLayer.Name = pGxObject.Dataset.Name
SceneViewerCtrl1.SceneGraph.Scene.AddLayer pFLayer
Set pGxObject = pEnumGxobject.Next
Wend


End Sub
 
[purple][/purple]up
 
后退
顶部