Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Plugin and Companion App SDK
Viewing all articles
Browse latest Browse all 54282

vb.net (or c#) to photoshop batch

$
0
0
Trying to automate Photoshop from .Net application. Works fine with documents, layers, but getting error on batch method:

Dim appRef As Photoshop.Application
appRef = New ApplicationClass
Dim batchOpt As New BatchOptions
batchOpt.Destination = PsBatchDestinationType.psFolder
batchOpt.DestinationFolder = "c:\0\1\"
batchOpt.OverrideOpen = True
batchOpt.OverrideSave = True
batchOpt.SuppressOpen = True
batchOpt.ErrorFile = "c:\mylog.txt"
Dim flNaming(0) As PsFileNamingType
flNaming(0) = PsFileNamingType.psDocumentNameMixed
batchOpt.FileNaming = flNaming
Dim inputFiles(0) As String
inputFiles(0) = "c:\0\myImage.jpg"
appRef.Batch(inputFiles, "AutoLevelsContrast", "Default Actions", batchOpt)

Here "AutoLevelsContrast" is my action.
On batch operation getting exception:
"Illegal argument - argument 1. -Unsupported Variant type"

Viewing all articles
Browse latest Browse all 54282

Trending Articles