Hi!
I've started to make a model in software IDRISI SELVA, I’ve installed VS2012.
I've made a model automated to realize multi maps.
For example, I’m using model ShapeIdr and I’ll developed.
First must use library Idrisi32.dll.
Then make like the following form
and copy past the following code for importing library Idrisi32.dll
Imports idrisi32Dim x As New idrisi32.IdrisiAPIServerPrivate Sub SelectFolder_Click(sender As Object, e As EventArgs) Handles SelectFolder.Click Dim WrkPath As String WrkPath = x.GetWorkingDir FolderBrowserDialog1.SelectedPath = WrkPath If FolderBrowserDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then TextBox2.Text = FolderBrowserDialog1.SelectedPath End IfEnd Subthis code for select folder name or path.
then copy this code for run procssing in IDRISI Selva
Private Sub ButtonOK_Click(sender As Object, e As EventArgs) Handles ButtonOK.Click Dim CmdStr, WrkPath As String Dim i As Integer = 0 WrkPath = x.GetWorkingDir For Each File As String In IO.Directory.GetFiles(TextBox2.Text, "*.vlx", IO.SearchOption.AllDirectories) Dim Extension As String = IO.Path.GetExtension(File) Dim Name As String = IO.Path.GetFileNameWithoutExtension(File) CmdStr = "2*1*" + TextBox3.Text + "\" + Name + ".vlx*" + TextBox3.Text + "\" + Name + ".shp" x.RunModule("ShapeIdr", CmdStr, True, "", "qual", "", "", 1) i = i + 1 Label1.Text = "Working " & i.ToString & " ..." Next Label1.Text = "Finiched " & i.ToStringEnd Subfinally you can run your application
in IDRISI SELVA
any question i'm here
أكثر...
I've started to make a model in software IDRISI SELVA, I’ve installed VS2012.
I've made a model automated to realize multi maps.
For example, I’m using model ShapeIdr and I’ll developed.
First must use library Idrisi32.dll.
Then make like the following form
and copy past the following code for importing library Idrisi32.dll
Imports idrisi32Dim x As New idrisi32.IdrisiAPIServerPrivate Sub SelectFolder_Click(sender As Object, e As EventArgs) Handles SelectFolder.Click Dim WrkPath As String WrkPath = x.GetWorkingDir FolderBrowserDialog1.SelectedPath = WrkPath If FolderBrowserDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then TextBox2.Text = FolderBrowserDialog1.SelectedPath End IfEnd Subthis code for select folder name or path.
then copy this code for run procssing in IDRISI Selva
Private Sub ButtonOK_Click(sender As Object, e As EventArgs) Handles ButtonOK.Click Dim CmdStr, WrkPath As String Dim i As Integer = 0 WrkPath = x.GetWorkingDir For Each File As String In IO.Directory.GetFiles(TextBox2.Text, "*.vlx", IO.SearchOption.AllDirectories) Dim Extension As String = IO.Path.GetExtension(File) Dim Name As String = IO.Path.GetFileNameWithoutExtension(File) CmdStr = "2*1*" + TextBox3.Text + "\" + Name + ".vlx*" + TextBox3.Text + "\" + Name + ".shp" x.RunModule("ShapeIdr", CmdStr, True, "", "qual", "", "", 1) i = i + 1 Label1.Text = "Working " & i.ToString & " ..." Next Label1.Text = "Finiched " & i.ToStringEnd Subfinally you can run your application
any question i'm here
أكثر...