Illustrator automatically apply styles to layers
#1
Posted 31 August 2010 - 06:26 AM
I work with maps which invariably have around 30/40 layers.
I import Autocad .dxf/.dwg files intoIllustrator and then manually apply styles from the Graphic Styles which I have created.
My query is this: Is there an way that I can apply a script or an action or some other way that will automatically apply a style to each layer? And how do I do it?
#2
Posted 31 August 2010 - 02:37 PM
I use Adobe Illustrator Cs3&Cs4 and I need to automatically apply styles to layers.
I work with maps which invariably have around 30/40 layers.
I import Autocad .dxf/.dwg files intoIllustrator and then manually apply styles from the Graphic Styles which I have created.
My query is this: Is there an way that I can apply a script or an action or some other way that will automatically apply a style to each layer? And how do I do it?
I accidentally did this just the other day. By using the "Target" button on the layers pallet I believe you can assign a style to the layer as opposed to just the art in that layer. Following that, any compatible art moved or copied to that layer will be restyled.
But lets see what the real Illy gurus have to say.
GIS Reference and Instruction Specialist, Stanford Geospatial Center.
www.mapbliss.com
#3
Posted 31 August 2010 - 05:51 PM
I accidentally did this just the other day. By using the "Target" button on the layers pallet I believe you can assign a style to the layer as opposed to just the art in that layer. Following that, any compatible art moved or copied to that layer will be restyled.
But lets see what the real Illy gurus have to say.
You're quite right David. By selecting the target button on the layers palette (that is the button to the right of the layer name), everything on the layer is selected. This is often a quick way to "Select All" on a layer, but it does have one difference. If you apply a graphic style to the selected features it will also apply this style to any new features added to the layer. When you apply the graphic style to the layer the target dot now appears as a gradient. To disable, click and drag the target to the trash can at the bottom of the layers palette.
I often use this feature when I want to create arrows. In this way you don't have to stylise every arrow you draw, just draw a line and the arrowhead appears. In that way you keep your artwork consistent as well.
Hope this helps.
Craig
Spatial Vision
www.spatialvision.com.au
www.svmaps.com.au
craig.molyneux@spatialvision.com.au
#4
Posted 01 September 2010 - 02:36 AM
There`s a bit of work in the setup but it does the trick.
I created a blank template replicating all the layers that I was importing from the .dxf file.
I applied a graphic style to each layer by highlighting the target button as suggested.
I saved the file. I then opened the dxf file in Illustrator and selected all the layers content and then
pasted the layers into the prepared template and bingo! I saved the file with a new name to preserve
the integrity of the new template.
It is important to note here that the Paste Remembers Layers option is activated.
Many thanks again
Paul
#5
Posted 01 September 2010 - 03:07 AM
Sorry if the above explanation was not that clear... See attached image, that explains it more clearly:
Clipboard01.png 10.21K
38 downloads
#6
Posted 01 September 2010 - 10:23 AM
One thing to keep in mind there though, is that sometimes you want the style to be applied to each individual item, and not a group. This makes a difference for some effects... I am not sure I can think up a good example, but it matters mostly when features overlap. If you have e.g. the drop shadow effect applied to a group, it sees all the individual features/paths as one, so the overlap won't be visible.
Sorry if the above explanation was not that clear... See attached image, that explains it more clearly:Clipboard01.png 10.21K 38 downloads
I haven't played with this much but I'm wondering if you are saying the layer styles treats everything on the layer as a group or are you just talking about objects that are actually grouped before being styled?
GIS Reference and Instruction Specialist, Stanford Geospatial Center.
www.mapbliss.com
#7
Posted 01 September 2010 - 11:43 AM
I haven't played with this much but I'm wondering if you are saying the layer styles treats everything on the layer as a group or are you just talking about objects that are actually grouped before being styled?
Since layers are actually groups under the hood, I believe for the purposes of styles applied to layers that it treats all objects like they're in one big group (which they are, actually
This can be quite useful for things like applying line case styles, since when its applied to a layer it will actually properly handle intersections of cased lines (or whatever the term is -- I'm not a cartographer!).
Lead Software Architect
Avenza Systems Inc.
email: andrew@avenza.com
phone: 416.487.5116
#8
Posted 02 September 2010 - 03:18 AM
#9
Posted 02 September 2010 - 05:04 AM
Unless, of course, you want all road fills to appear above all road casings and have different classification of roadsI haven't played with this much but I'm wondering if you are saying the layer styles treats everything on the layer as a group or are you just talking about objects that are actually grouped before being styled?
Since layers are actually groups under the hood, I believe for the purposes of styles applied to layers that it treats all objects like they're in one big group (which they are, actually).
This can be quite useful for things like applying line case styles, since when its applied to a layer it will actually properly handle intersections of cased lines (or whatever the term is -- I'm not a cartographer!).
road_casing.jpg 610.55K
36 downloadsLeft is with styles applied to layers; right is with styles applied to objects with duplicate layers for road fill placed above the layers for road casing
#10
Posted 02 September 2010 - 08:43 AM
road_casing.png 24.34K
55 downloads
Software Development Manager
Avenza Systems Inc.
#11
Posted 02 September 2010 - 09:34 AM
Yes - that works if the roads are the same style and on the same layer. But we have different road classifications that we put on different layers; as a result, the casings will cross over each over, not merge.Rudy, I get different results. The road casings do not intersect for me when I do a layer style.
road_casing.png 24.34K 55 downloads
#12
Posted 02 September 2010 - 09:55 AM
I'll have to add a feature request for a 'Road Casing' tool, if we can find some time for Andrew, I am sure he could come up with something.
Software Development Manager
Avenza Systems Inc.
#13
Posted 09 September 2010 - 12:45 AM
You can also do this by using subfolders:
Layer "combine" includes the common fill
sublayer 1 has the red casing
sublayer 2 has the gray casing
The result is a joined casing between the two sublayers.
It does get a bit more confusing when you are trying to combine 3-line and 2-line symbols with intersecting casing...
Also, be warned that raster effects like drop shadow can take an UNBELIEVABLY long time to process when they are applied to a layer containing number of objects across an entire decent-sized map. Way longer than just applying them to each object.It can also make it almost impossible to edit text in that layer. I speak from bitter experience. Of course, you can just create a graphic style for the effect, clear the layer appearance in order to edit it, and then apply it again when you're ready to output.
Head of Production, Hedberg Maps, Minneapolis, MN USA
maphead.blogspot.com
"Life's too short for bad maps"
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users


Sign In
Create Account
Ireland
Back to top
United States
Australia
Sweden
Canada









