Jump to content

Putri Yasmin

Inactive Members
  • Content Count

    15
  • Joined

  • Last visited

Community Reputation

2 Neutral

About Putri Yasmin

  • Rank
    Instructor

Profile Information

  • Gender
    Female
  1. Thank you Mr. Bdsmolla, I succeed add raster to the ArcMap. Now, I'm confuse again how to record every single raster in the table of content to an aray so that I can call the array and process them. In the past, I recorded every single feature in table of content used the code below: But, when I want to use the similar code analogy for raster data such the code below, The code get error in : Could you help me, Please? Best Regards, Yasmin
  2. Dear all, I would like to add raster to ArcMap using the code below : but I got an error on pLayer.Name = pRLayer.RasterClass.AliasName. Is there anyone can help me to solve this problem? Best Regard,
  3. dear all, I have searched in any website about the function GP.CopyFeatures_management but I haven't found yet why my vba arcgis notices require = after GP.CopyFeatures_management(filename(1),"D:\wwtp\basemap.shp") but in any arcgis help, esriforum etc don't need it in my arcgis 9.3, VBA compiles error after after GP.CopyFeatures_management(filename(1),"D:\wwtp\basemap.shp") and it needs = but when I write = true, it is error. and once more, for replacing folder, I use : MkDir(sFullPath) was used for replacing exists directory, how about replacing file? I just found like this : but it respons nothing.. would you like to help me, please?
  4. I try to write Private Sub CommandButton1_Click() MkDir ("D:\IPAL_Location_processtest") 'spatial process Dim urbanprocess As String Dim GP As Object Set GP = CreateObject("esriGeoprocessing.GpDispatch.1") Select Case ComboBox1 'Case "Flood region" 'GP.Erase_analysis "E:\3. STUDY\3. THESIS\2. DATA SPASIAL\utm\administratif\batas pkl.shp", "E:\3. STUDY\3. THESIS\2. DATA SPASIAL\utm\banjir\80thn", "D:\IPAL_Location_process\Flood.shp" Case "Urban distance" GP.Buffer_analysis "E:\3. STUDY\3. THESIS\2. DATA SPASIAL\utm\administratif\pemukiman.shp", "D:\IPAL_Location_process\ur.shp", "150" urbanprocess = "D:\IPAL_Location_process\ur.shp" parameter1 = "urbanprocess;D:\B.shp" parameter2 = "D:\IPAL_Location_process\urban.shp" GP.Intersect_analysis parameter1, parameter2 End Select End Sub but it compile error in line 14
  5. if A.shp and B.shp are lied in different partition? can I write like this? "E:\A.shp;D:\B.shp"
  6. filename(1) = pWorkspace.PathName + "\" + pFeatureLayer.Name + ".shp" MkDir ("D:\IPAL_Location_process" + CStr(Counter)) Dim GP As Object Set GP = CreateObject("esriGeoprocessing.GpDispatch.1") GP.Intersect_analysis filename(1) ; "D:\IPAL_Location_process\ur" + CStr(Counter) + ".shp", "D:\IPAL_Location_process\urban distance" + CStr(Counter) + ".shp" but it doesn't work..
  7. Hello all, i want to overlay any files, so I need intersect_analysis..but I get error comment when I write Dim GP As Object Set GP = CreateObject("esriGeoprocessing.GpDispatch.1") GP.Intersect_analysis "E:\3. STUDY\3. THESIS\2. DATA SPASIAL\utm\administratif\pemukiman.shp", "E:\3. STUDY\3. THESIS\2. DATA SPASIAL\utm\jalan\utama.shp", "D:\intest" Could you guide me how to write intersect analsis, Please? Thank you very much
  8. If ComboBox1 = "Flood region" Then GP.Buffer_analysis FCPath, pLayer, "50000" could I use pLayer there for reffering a map opened? because it respon nothing.. thenk you before, I'm sorry if I bother you
  9. could I write something like this? 'take a map Private Sub Petadasar_Click() Dim p1MxDoc As IMxDocument Set p1MxDoc = ThisDocument Dim p1GxDialog As IGxDialog Set p1GxDialog = New GxDialog p1GxDialog.AllowMultiSelect = True p1GxDialog.Title = "Select Feature Classes to Add To Map" Dim p1GxFilter As IGxObjectFilter Set p1GxFilter = New GxFilterFeatureClasses Set p1GxDialog.ObjectFilter = p1GxFilter Dim p1GxObjects As IEnumGxObject p1GxDialog.DoModalOpen Thisdocument.Parent.hWnd, p1GxObjects If (p1GxObjects Is Nothing) Then Exit Sub p1GxObjects.Reset Dim p1Layer As IFeatureLayer Dim p1GxDataset As IGxDataset Set p1GxDataset = p1GxObjects.Next Do Until (p1GxDataset Is Nothing) Set p1Layer = New FeatureLayer Set p1Layer.FeatureClass = p1GxDataset.Dataset p1Layer.Name = p1Layer.FeatureClass.AliasName p1MxDoc.FocusMap.Addlayer p1Layer Set p1GxDataset = p1GxObjects.Next Loop p1MxDoc.ActiveView.PartialRefresh esriViewGeography, Nothing, Nothing End Sub 'determining a process Public Sub ComboBox1_DropButtonclick() With ComboBox1 .AddItem "Flood region" .AddItem "Urban distance" .AddItem "Roadway distance" .AddItem "Topograph" .AddItem "Slope" .AddItem "Environmental load" End With End Sub Private Sub CommandButton2_Click() Dim pDoc As IMxDocument Dim pLayer As IFeatureLayer Dim pFeatClass As IFeatureClass Dim GP As Object Set pDoc = ThisDocument Set pLayer = pDoc.SelectedLayer Set GP = CreateObject("esriGeoprocessing.GpDispatch.1") If ComboBox1 = "Flood region" Then GP.Buffer_analysis FCPath, pLayer, "50000" end if end sub
  10. I'm newbie in gis programming, I'm sorry if I have a lot of question about it.. first, in the code of : [quote][color=#282828][font=helvetica, arial, sans-serif]Set pDoc = ThisDocument[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]If Not pDoc.SelectedLayer Is Nothing Then[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]Set pLayer = pDoc.SelectedLayer[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] Else[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]MsgBox "No Layers Selected in TOC"[/font][/color][/quote] [quote][/quote] do you mean that if there isn't feature selected, it will show nothing?? how about it..call feature that has declared before to process it after.. in this case, i have called 2 file and show them in arcmap..the i wanna call them is other step..i don't know how to use TOC. last, but not least.. How can I use arctool such analysis tool (extract, overlayand so on)? thank you very much
  11. hello all, i wanna make a program of arcobject based vba, in my program, i've an algorithm : 1st step, choose file we need 2nd step, determine a process we want 3rd step, the file in 1st step will be process as the process chosen in 2nd step. hearby mu code: 1st step: Public Sub CommandButton1_Click() Dim pMxDoc As IMxDocument Set pMxDoc = ThisDocument Dim pGxDialog As IGxDialog Set pGxDialog = New GxDialog pGxDialog.AllowMultiSelect = True pGxDialog.Title = "Select Feature Classes to Add To Map" Dim pGxFilter As IGxObjectFilter Set pGxFilter = New GxFilterFeatureClasses Set pGxDialog.ObjectFilter = pGxFilter Dim pGxObjects As IEnumGxObject pGxDialog.DoModalOpen Thisdocument.Parent.hWnd, pGxObjects If (pGxObjects Is Nothing) Then Exit Sub pGxObjects.Reset Dim pLayer As IFeatureLayer Dim pGxDataset As IGxDataset Set pGxDataset = pGxObjects.Next Do Until (pGxDataset Is Nothing) Set pLayer = New FeatureLayer Set pLayer.FeatureClass = pGxDataset.Dataset pLayer.Name = pLayer.FeatureClass.AliasName pMxDoc.FocusMap.Addlayer pLayer Set pGxDataset = pGxObjects.Next Loop pMxDoc.ActiveView.PartialRefresh esriViewGeography, Nothing, Nothing End Sub 2nd step Public Sub ComboBox1_DropButtonclick() With ComboBox1 .AddItem "Flood region" .AddItem "Urban distance" .AddItem "Roadway distance" .AddItem "Topograph" .AddItem "Slope" .AddItem "Environmental load" End With End Sub well, in 3rd step i dont know how to recall file opened in step 1st, as usual, I think I can call it by codein vb6 that is : open pMxDocfor input as #1, but when i used it, it doesn't work.. I do really need your help
  12. hello, i'm newbie in gis programming, well, i wanna makea program usingvba in arcgis, in many algorithm, i need geoprocessing tool such overlay, extract, buffering etc. but when i search in http://edndoc.esri.com/arcobjects/9.0/Samples/Geoprocessing/RunToolWithGPDispatch.htm, and debug the script below, i getnothing..there are any error in script. actually, i have changed the directory of the script usingmy file. would you like to helpme,please? Sub RunGPTool_click() 'Create the Geoprocessor object Dim GP As Object Set GP = CreateObject("esriGeoprocessing.GpDispatch.1") 'Set the toolbox GP.Toolbox = "D:\ArcGIS\ArcToolbox\Toolboxes\Analysis Tools.tbx" 'Execute tools GP.Clip "D:\Workspace\Portland.mdb\Region\streets", _ "D:\Workspace\Portland.mdb\Region\downtown", "D:\Workspace\Portland.mdb\Region\dt_streets" GP.Buffer "D:\Workspace\Portland.mdb\Region\dt_streets", _ "D:\Workspace\Portland.mdb\Region\dt_streetsbuf", "500" End Sub saya merubah lokasi file dengan file yang akansaya clipdan buffer, tapi ketika di debug, terdapat kesalahan. dapatkah kakak membantu saya untuk permasalahan ini? maaf jikamerepotkan, terimakas
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.