Posts Tagged ‘illustrator’

Send Colors from InDesign and Illustrator to Flash (Ajar Productions)

Tuesday, September 1st, 2009

send-script-to-flash_cs4-ai-img

[Editor's note: This handy JSX based script for Illustrator and InDesign from Ajar Productions will transfer spot and process color swatches of all varieties (RGB, CMYK, LAB, HSB) to RGB in Flash using Adobe's built-in color conversion routines to preserve color fidelity. Requires CS3 or CS4 (works best with CS4).]

Republished from Ajar Productions. Dec. 5, 2009

Following the merge text extensions for Flash, Illustrator, and InDesign, Keith Gilbert wrote me wondering about getting swatch information from InDesign to Flash via XFL or by way of importing an Adobe Swatch Exchange (ASE) file into the Flash swatches panel. There are several stumbling blocks in the way of such an extension. First, finding a way for extendscript or JSFL to read the contents of an ASE file (which is not open source and not plaintext) proves to be quite difficult. Second, JSFL (the Flash scripting language) doesn’t have any access (currently) to the swatches panel.


BREAKING NEWS (12/6/08): I noticed that the new Kuler extension for Flash CS4 has an “add to swatches” button, and it actually adds swatches to the swatches panel. After some decompiling and a lot of detective work, I found an undocumented JSFL call that was added to CS4. The feature is undocumented for a reason: it sends encoded XML data, and if the data is faulty, it crashes Flash. I have a few test cases working and I’m confident that I can add it to this extension, so the swatches will go right in the Flash swatches panel, rather than onto the stage, though it will only work in CS4. Be on the lookout for an update in the next few days.

UPDATE (12/7/08): Updated to version 1.1.0. If you have Flash CS4, the swatches will now go right into your Flash Swatches panel. Hooray!

There does seem to be a lot usefulness to such an extension, since XFL creates a new workflow between InDesign and Flash, and the Illustrator importer for Flash is fantastic, but neither one loads any of the swatches from the original document. I’ve certainly spent my fair share of time opening up the swatch properties, making sure the swatch is RGB or hex and copying all three fields one at a time.

So, I decided to plow ahead and see what I could come up with. The results are below. This extension takes the swatches from your current InDesign or Illustrator document and sends them to a new layer on the Flash stage. You can then use the eyedropper to pick up the colors, or you can add them to your swatches panel individually (similar to this demo of the Kuler panel).
UPDATE (12/7/08): If you have Flash CS4, you can skip the step above. Version 1.1.0 of this extension will send the Illustrator or InDesign swatches right to your swatches panel in Flash.

This extension will transfer spot and process colors of all varieties (RGB, CMYK, LAB, HSB). Rather than converting the CMYK with my own function, I used the applications themselves to convert the colors to RGB for Flash, so the transfer fidelity is quite good. It will ignore gradients, tints, patterns and fancy stuff like that. If you want to get your gradients into Flash see the bonus tip below.

Continue reading at Ajar Productions and download files . . .

Using Live Paint to Build Polygons Out of Line Segments in Adobe Illustrator (Kelso)

Wednesday, August 5th, 2009

I remember spending hours in my introduction to computer cartography lab class at Humboldt State University “building polygons” in the Adobe Illustrator design software package. We started with state “lines” and, one by one, duplicated and joined them into polygons by painstakingly selecting matching endpoints and cursing the Illustrator error dialogs that kept coming up. Fast forward 5 software versions and 10 years and we can now accomplish the same workflow in seconds using the new “Live Paint” feature available in version CS2 and newer. Maybe this is old news, but it’s sure makes things easier on the Natural Earth Vector project!

Download native Illustrator CS3 file and follow along with sample linework.

Step 1: Start with lines for 1st order, country, and hydro coast, rivers on separate layers (like you’d normally layer your map file).

live_paint_step1

Step 2: Duplicate all related lines onto one “building” layer (the next step would group originals if you don’t do here).

live_paint_step2

Step 3: Select all those duplicated “building” lines (interior state boundaries, exterior country boundary, and exterior shorelines for that country, the more linework, the slower it goes), choose the live paint tool livepainticon and click on the selection. It will turn into a “live paint group”. If  you are viewing the bounding box, it will appear slightly differently than normal handles (see below).

live_paint_step3

Step 4: Make sure the toolbox fill is a color like yellow (the default is set to no fill, so you won’t get the tool to work unless you change it). Click and drag the live paint tool over all implied polygons between lines. Watch them turn into filled polys!!!! If you don’t get an implied polygon to fill, try adjusting the gap tolerance at Object > Live Paint > Gap Options. The default settings worked fine for me, though. Not shown here are the reddish thick highlight around target polygons as the Live Paint tool is dragged acros the artwork.

live_paint_step4

Step 5: Once you’re done and all your implied polygons are colored in like a coloring book, expand the live paint group (Object > Live Paint > Expand, or use the Expand button on the control panel button strip). Ungroup twice (Object > Ungroup). The polys, lines, and hydro will all be on the building layer. Use select by similar to select just the filled polys you just made and move them to the First_order_admin_polys layer. Delete the left over country and hydro lines (you have originals elsewhere).

live_paint_step5

Step 6: Color code new state polygons and compound path related admin units (none in this instance). That’s it!

live_paint_step6

Problems? Try this tutorial video from Layers magazine and, separately, from Mordy Golding.

Avenza Systems Releases MAPublisher 8.1 + LabelPro

Friday, June 19th, 2009

mapublisher-header

[Editor's note: The latest update of the Illustrator plugin includes a collision-free rule based label engine, but it will cost you an extra license fee.]

Republished from Avenza.

MAPublisher 8.1 for Illustrator is powerful map production software for creating cartographic-quality maps from GIS data. Developed as a suite of plug-ins for Adobe Illustrator, MAPublisher leverages the superior graphics capabilities of this graphics design software for working with GIS data and producing high-quality maps with efficiency.

New Features of MAPublisher 8.1 for Adobe Illustrator

  • Support for the new MAPublisher LabelPro collision-free rule-based labeling system (additional license required)
  • Improved MAP Web Author Tool for automatic creation of interactive Flash maps
  • New MAPublisher Preferences options for customization of various features and functions
  • Split Layer function to move data to new layers based on attributes and expressions
  • Enhanced Expression Builder allows import of expressions from Selection Filters
  • Enhanced Plot Centroids function now has the option to copy attributes from the source area
  • New Export Attribute function for exporting the attributes table to a delimited text file
  • Enhanced Register Image function can now create a new MAP View from any referenced image
  • New Specify Anchors functionality allows world values to be entered in any co-ordinate system
  • Improved MAP View and MAP Stylesheets panels with new functionality
  • Various other user interface improvements and performance enhancements to improve usability

Continue reading about 8.1 upgrade at Avenza . . .

Features of MAPublisher LabelPro

MAPublisher® LabelPro™ offers advanced labelling capabilities beyond those available in the standard MAPublisher Feature Text Label and the MAP Tagger Tool, including a sophisticated and user-friendly rule-based and collision-free placement engine.

The MAP LabelPro engine contains sophisticated algorithms based on EZ Label technology from MapText Inc. It solves many of the most common map labelling problems such as complex conflict resolution across multiple layers, the ability to specify data as obstacles and the ability to create complex labelling conventions using user defined rules.

MAPublisher LabelPro uses map attributes, rules and styles for labelling which provides a great level of sophistication and control. Map layers may be assigned an order of priority for labelling and set as label obstacles. Labels can be placed on any defined text layers, unplaceable layers can be ignored or placed. Placement rules and styles can be saved to a file and imported or shared over a network.

Users can use the following rules and placement options to place the text on their maps.

Continue reading about LabelPro at Avenza . . .

PatchPanel: Flash Panels for Multiple CS Applications (Adobe)

Thursday, June 18th, 2009

adobedevconnection

[Editor's Note: ]

Republished from Adobe Developer Connection.

By Dr. Woohoo @ blog.drwoohoo.com.

Follow along with this tutorial to expand on what we created in the previous tutorial, PatchPanel: Integrating your ExtendScript, with the objective of using a framework that embraces running our Flash plug-in in multiple Creative Suite applications (Photoshop and Illustrator). When we are done, our Flash plug-in will work in all three CS applications using code that is appropriate for each host application― keeping in mind that this is necessary due to the differences in the DOMs of each application.

Our Flash plug-in will get the RGB values of the foreground color of the host CS4 application. You will integrate a separate ActionScript file for each host application within the Flash plug-in that you develop within a Flex Builder MXML project using the PatchPanel SWC library as the mechanism for communicating between your SWF and the host application, which will dynamically be defined in this example.

After completing this tutorial, you should be able to:

  • Add the Adobe PatchPanel SWC library, cs4.swc, to your Flex Builder Project
  • Import the host CS applications ExtendScript DOM
  • Copy your ExtendScript code from ExtendScript Toolkit to Flex Builder
  • Know what the appropriate color object structure is within the DOM of the three possible host applications
  • Install the SWF and accompanying JSX/JS file so that it is accessible from within Photoshop and Illustrator

Continue reading at Adobe Developer Connection . . .

“Size By Luminance” a.k.a. Halftones!!! (Wundes)

Tuesday, June 2nd, 2009

[Editor's note: This new script from John achieves that old fashioned halftone look found in ancient newspapers and magazines.]

Republished from John Wundes’ JS4AI blog.

Want to make halftones in illustrator?

You could go the auto trace route, or you could go with a plug-in from Phantasm. The Phantasm plug-in is powerful and gives you great control, so I do recommend using their product, but if you’re on a tight budget, you can try my new script which is easy, and free.

First off, if you don’t know about the “Mosaic Filter” in Illustrator, read this quick article. The Mosaic Filter is an amazingly under-used feature and it will do most of the heavy lifting for us today. Filter>Create>Object Mosaic

Continue reading at the JS4AI blog . . .

A Magic Wand for Selecting Text in Adobe Illustrator (KELSO)

Wednesday, May 6th, 2009

[Editor's note: The beta expired so this is purely an extension of the testing period. No new feature.]

I have been developing a plugin / script for Adobe Illustrator to make it easier to select type in Illustrator by  attributes like font family, style, size, and fill color. I hope to release this as a commercial plugin for designers and cartographers late 2009? If you would like to beta test this plugin for me, please send me an email at nathaniel@kelsocartography.com or…

Download version 11d of Find and Replace Fonts Script (1.6m). Good thru summer 2009.

More information on this script available in this March 2009 post.

Instance_setMcName Flash Script + MaPublisher = Flash Interactive Thematic Mapping (Kelso)

Wednesday, April 29th, 2009

charlestonelectionresults

[Editor's note: Making the GIS > Illustrator > Flash workflow a 30 minute process instead of a 30 hour slog. Thanks Sebastian!]

Ken Hawkins, formerly of The Post and Courier newspaper (Charleston, SC) helped me figure out how to take GIS shapefile data (point, line, and polygon) prepped in ArcMap or similar, process it in Illustrator using the Avenza MaPublisher plugin, and then copy-paste import into Flash CS3+ and apply the Instance_setMcName script. I first saw his handywork in the http://www.charleston.net/graphics/200802_primary/ map which is illustrated at the top of this post. I first learned of this technique last year but I think it is still relevant so am posting it now.

Ken had help from Len De Groot over at newsartists.orghttp://www.newsartists.org/forums/showthread.php?p=41780, registration required). I have reformatted and edited Ken and Len’s instructions below.

Requirements:
  • A shapefile,
  • Illustrator CS3,
  • MaPublisher (Illustrator plugin),
  • Flash CS3, and
  • Free command script called “Instance_setMcName”. Before you start, download the script from Adobe, registration required (alternate download, no registration required) and double click file icon to install the script into Flash. Relaunch Flash to enable the script.

Overview:

  • Shapefile prep work in ArcMap GIS as needed.
  • Import the shapefile (.shp) in Illustrator using MaPublisher. Each geographic feature imports as it’s own path object in illustrator, visible in the Layers panel when it is set to not just show top level layers.
  • Use MaPublisher to name each map object’s GIS database attribute to name itself.
  • Import the Illustrator file to Flash .
  • Run the script to take the movieclip names and apply them to instances.

Detailed Workflow:

  1. Shapefile prep work in ArcMap as needed.
  2. Open your GIS shapefile in Illustrator via the MaPublisher plugin (File > Import Map Data).
  3. Edit > Select All the imported map path objects.
  4. Open the MapAttributes panel by going to View > MaPublisher > MapAttributes.
  5. In your MapAttributes panel, use the flyout menu to select Edit Schema.
  6. Select the #Name (usually selected by default) in the list of columns.
  7. Check the box marked “Derive value from expression”
  8. Click the “…” button.
  9. In the resulting dialog’s text entry field, type in the name of the field you want to use to name the individual polygons (county, precinct, etc.). This is case sensitive.
  10. Hit OK twice.
  11. Watch as your individual path objects are named in the Layers panel then save the file.
  12. Open Flash and import the AI file to the stage (File > Import).
  13. In the Import dialog box, select all the sublayers and check the box named “Create movie clip” and hit OK. The map will be imported both onto the stage and each map object will be added to the document’s Library.
  14. In the Library panel, select all the MovieClips in the Illustrator Import sub-folder and drag them up and out of the folders to the top level.
  15. Use Edit > Select All to select all your map object symbols on the stage.
  16. Under “Commands” in the top menu, select “Instance_setMcName.”
  17. All you symbol instances will be named the same as their parent movieClip libary item. Use the Properties panel to verify this.

Both Ken and I have used this process on multiple shapefiles with hundreds of objects and it’s worked like a dream.

Caution on Numeric Names:

Some GIS shapefiles have category names that begin with numbers, which Flash doesn’t like. Flash is picky about some other characters starting off the name, too, so when in doubt, use the following solution.

You can edit the schema to add a letter in front of each name and then use actionscript to do the same to each item in your XML file. A little cloogy but better than the alternative.

  1. Click the Add button in the Edit Schema window in MaPublisher’s Illustrator panel
  2. Name the new column “a”. Make sure the Type is string and enter “a” for the value (the derive value button must be unchecked to see this option).
  3. Press enter.
  4. Select #Name column.
  5. Find the expression field in the same dialog and type out “a&PRECINCT” (where “a” is the “a” attribute column name and PRECINCT is the attribute column name). Note: the & symbol is used to concatenate (add together) the string values in each attribute column.
  6. Press enter.
  7. Verify the name changes in the Layers panel.

Seperate Stroke and Fill Workflow:

To have a seperate stroke layer on polygons so the fills can be color coded seperately from the strokes (which would always maintain the same stroke color) you’ll need to make a 2nd copy of the symbols:

  1. In Illustrator after you’ve used MaPublisher to name all your polygons appropriately, duplicate the layer and hide/lock the original layer.
  2. Give the new polygons a stoke and no fill, and rename them using Steps 3-6 except append the naming scheme with “Stroke”
  3. Import the Illustrator file to Flash. Two groups of symbols are imported.One group’s symbols will be named something like “precinct234″ and the other group’s corresponding symbols will be named “precinct234Stroke”
  4. Flash can now be instructed via ActionScript coding to independently control a symbols fill and whether or not it is “highlighted” with a stroke.

Bonus Feature!

Use MaPublisher to import other GIS layers (roads, polling locations, etc.) and they will land directly on top of the thematic symbols. I recommend doing this in the same import session, or before you rescale the maps. Best results when all GIS shapefiles are already in the same projection.

To set up your XML which is used to import your map data values (essentially an XML version of your DBF file associated with the shapefile), check out Layne’s thread.

Ortelius, new Mac GIS software?

Tuesday, March 31st, 2009

Ortelius was demonstrated at the AAG conference in Las Vegas in mid March and looks promising. It’s billed as an affordable middle-way between Adobe Illustrator + MaPublisher and ArcGIS and it works on Macs, which ArcGIS does not. It’s a graphics design package that can import shapefiles and purports knowing object topology. It also has an integrated database so you can view and edit map object attributes. Map projections are supported and the package comes with pre-loaded map files to get you started.

Ortelius is currently under development and version 1.0 will be available in the first quarter of 2009. The intention is to release standard and “pro” versions with a starting price of $79. Thanks to Martin for this tip.

Read more on the MapDiva blog about the product . . .

Great Script for Simplifying Paths in Illustrator (Kelso)

Monday, March 30th, 2009

[Editor's note: Cartographers looking for Douglas-Peucker type line simplication in Illustrator now have a solution to Illustrator's default simplify command when trying to generalize features like river oxbows. Jim started on the problem of fixing an Illustrator bug (see image above) where redundant points were created in the path outline command, and now has a more generalized solution.]

Jim Heck shared an amazing tool for Adobe Illustrator with me recently to deal with the irritating bug in versions CS3 and CS4 where redundant points (stacked on top of each other, illustrated above where the dupplicate points are pulled away from the basic shape) are created on outline or offset of a path’s stroke. The script (in Javascript) and Action set he created quickly remove these redundant points while still keeping the path shape. He does this with a bit of behind the scenes trigonometry wizardry. Please note this bug still exists in CS4 contray to rumors, though is lesser virulent form than CS3 (confirmed by me via email with Adobe engineers).

I’ve worked with Jim to refine it the last couple weeks. I think it’s ready for prime time now.

Screenshots:

Settings shown to remove redundant points for outlined path screenshot above. I used a tolerance of 12 points for the river ox bow screenshot below.

How it works:

  • Selected path points only or all document paths
  • Set distance tolerance in page units (optional)
  • Works in locked objects
  • Works in compound paths
  • Reporting, Selection, and Removal modes

Cartographic applications:

I illustrate below the result of using Jim’s generalization script on a typial river path and you can see in area 1a and 2b how the ox bow removal is light years above Illustrator’s default path simplify command which grossly distorts the shape in the pursuit of point removal. Jim’s script preserves the shape and removes the tiny, tight wiggles. It needs a little bit more programming work to fix areas 1b and 2a + 2c where the shape is loosing some fidelity for not keeping the trailing point in the series of removed points. And maybe needing to keep an intermediary point between 2a and 2c for shape since this is a longer removal?

With a little more tweaking, this tool will become popular for cartographers since we often want to simplify lines while keeping the overall geometry shape when reducing clustered points. The opposite may be achievable, too, when adding points selectively to long curves, but NOT to segments of the line that are already dense with points. But that’s for a 2.0 release ;)

Download the script and actions from Jim Heck’s site . . .

MapStudio Orienteering Templates for Illustrator

Monday, March 16th, 2009

MapStudio is a set of orienteering symbols and graphic style for Adobe Illustrator (on Mac OS and Windows) and helps you to draw high-quality orienteering maps in shorter time than ever before.