How do I select layers by name in Visual Basic?
So I'm aware of java's
itemByName(String);
but eh,,,
Unfortunately I started the project with VB in Visual studio
so I feel compelled to end it in VB
Basically I'm asking for a vb function that finds a layer by name
Here's the code if it helps.
(Syntax highlighting isn't a thing for VB in this forum apparently)
Imports Photoshop
Public Class MapGen
Dim PhotoshopApp As Application
Dim PhotoshopDoc As Document
Dim CurrentState As ArtLayer
Private Sub StartBtn_Click(sender As Object, e As EventArgs) Handles StartBtn.Click
PhotoshopApp = New ApplicationClass
Dim X As String = "no val"
Dim Y As Long = 0
Dim FileReader = My.Computer.FileSystem.OpenTextFileReader("F:\Processed.txt")
FileDialog.ShowDialog()
For Each Line In My.Computer.FileSystem.ReadAllText("F:\Processed.txt")
X = FileReader.ReadLine()
If X = Nothing Then
Else
MsgBox(X)
End If
Next
PhotoshopDoc = PhotoshopApp.Open(FileDialog.FileName)
PhotoshopDoc.Layers.Item()
End Sub
End Class
