Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

Need help with vbscript and Adobe Illustrator plug-in

$
0
0
Pleading help from someone who is into Vbscript and Adobe Illustrator with regards to using script to access a custom preset in Illustrator. What I am trying do is a take an Tiff image and trace it with a custom trace I have created.

I've created a few VBscripts with Illustrator successfully but this has stumped me after weeks of testing. Apparently, it can be done. I have API documentation, Java and VBA examples but this is over my head.
Any takers?

Here is what I have so far (one of many renditions):

Code:

Set App = CreateObject("Illustrator.Application")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set SourceFolder = FSO.GetFolder("S:\SOCAL\Section_31\Land Cover")


Dim FileRef
For Each FileRef In SourceFolder.Files
       
        Set AutoCADOpenOptions = App.Preferences.AutoCADFileOptions
                AutoCADOpenOptions.MergeLayers = false
                CurrentInteractionLevel = App.UserInteractionLevel
                App.UserInteractionLevel = -1 ' aiDontDisplayAlerts
                Set myDoc = App.Open(FileRef.Path,2)
                App.UserInteractionLevel = CurrentInteractionLevel
               
                ubound(App.TracingPresetsList)
                ' The line below loads tiff file into Illustrator ready for a custom trace
                App.DoScript "LandCover-1", "Land Cover Auto"
               
                ' From thi point on I am having no success. Need help building this out.
                Dim idoc    : idoc    = App.ActiveLayer
                Dim iplaced : iplaced = App.PlacedItem
                Dim itraced : itraced = App.ActiveLayer
                Dim iFile  : iFile  = FileRef.PlacedItems.Trace
               
                iFile.tracing.tracingOptions.loadFromPreset(tracingPresets[3])
               
Next


Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>