Set a given style to a given layer

Hello there,
My question touches cartography day to day problem with extract files from external cartography/ GIS programs to Adobe Illustrator format but can be seen in wider context.
Let assume I have an exported ai file (map) that containt about 30-40 layers.
Each layer keep structurized items that present given  map layer:
poligon layers - lakes, forest, urban areas (closed shapes),
line layers -  (rivers, roads, railways) etc.
Thus I get about 30-40 layers.
The name of the layers are always the same and each time I want to apply graphic style to given layer (all items in that layer) I have to manually pick up the style from graphic style library press and apply it to selected layer.
I don't have to say I have to make it one by one to each of mentioned 40 layers....
Is there any way to automate it via script ? like:
If the name of layer is "Rivers" apply graphic style to it called "rivers_style"
loop till the last layer in the defined list.
Thank you in adance for any help,
Regards
Gregory

Another option would be to create blank, template *.ai document with the same layers structure etc. where the style is assigned to the layer via "target button" on the layer pallet and then copy to that blank document with "paste remember layers" the map (ai) document I want to style and save with new proper name.
Thus any items moved or copied to that documents will be restyled.
http://www.cartotalk.com/index.php?showtopic=6019&st=0&p=33678&#entry33678
Again it's semiautomated solution. But ... so let's redifine the question?
Can anyone provide a script that in batch mode copy content of one file to another one, one by one:
1.copy content of  "Map1_raw_data_unstyled" to "BLANK, TEMPLATE"
2. save as (give an option to name it or save it with the same name "Map1_raw_data_unstyled" ),
3.copy content of  "Map2_raw_data_unstyled.ai" to "BLANK_TEMPLATE.ai"
4. save as (give an option to name it or save it with the same name "Map2_raw_data_unstyled")
Any thoughts on this ?

Similar Messages

  • Set the css style of text in a column according to the value of another col

    I'd like to set the css style of text in a column according to the value of another column. Each field may end up with a different style of text as a result, for instance.
    Any ideas? I looked thru the forums but couldn't find anything.
    Thanks,
    Linda

    Does the class=”t7Header” make it into the rendered HTML?
    ---The text "class="tHeader" does not show but the other text is rendered using the style t7Header as defined in the stylesheet! Exactly what I wanted.
    You might want to use a div or a span instead of a p.
    ---Yes -
    What's very cool is we can create a display column that is dynamically filled with the html and style wrappers based on a lookup to see what style should be applied according to the actual data value. This is critical as our tables are all dynamic so I can't depend on using the additional APEX methods to control the display of a column (as the # of columns in the view vary from instance to instance) and I did not want the display specs to muddy up my SQL queries.
    I wonder why this is not well documented. It is so easy!
    Thanks again for your help.
    Linda

  • AppleScript Pages: How to set "following paragraph style"?

    How do you set "following paragraph style" for paragraphs or paragraph styles using AppleScript?
    I've tried several approaches, and all cause a run-time gag with the netorious error -10000
    More generically, what is the syntax for changing a property of a paragraph style that was user created?
    TIA!

    JonRKibler wrote:
    How do you set "following paragraph style" for paragraphs
    Here's an example that changes the following paragraph style of the first four paragraphs :
    tell application "Pages" to tell front document
          set following paragraph style of paragraphs 1 thru 4 to paragraph style "Heading 1"
    end tell
    JonRKibler wrote:
    How do you set "following paragraph style" for paragraph styles using AppleScript?
    Here's an example that changes the following paragraph style  of the paragraph style "Heading 1" :
    tell application "Pages" to tell front document
          set following paragraph style of paragraph style "Heading 1" to paragraph style "Heading 2"
    end tell
    JonRKibler wrote:
    More generically, what is the syntax for changing a property of a paragraph style that was user created?
    If you know the name of the style, here's an example that changes the value of the space before :
    tell application "Pages" to tell front document
          set space before of paragraph style "xyz" to 14
    end tell

  • Filter Effect and Layer Style in the same layer vs separate layers

    I'm adjusting a photographic image and am using both a filter effect and a layer style in the same layer on a Smart Object.  I want to separate the two effects into two layers, so one layer has the filter effect (Nik) and one layer has the layer style (Color Overlay) (with the goal of merging/rasterizing the Nik filter effect with the Smart Object but keeping the layer style unmerged).  I can make two layers and move one effect without problem, but the visual result of each effect on a separate layer is quite different from having both effects in the same layer.   The Blend Mode for all my layers is Normal.  Within the Color Overlay panel, the blend mode is Linear Burn.
    I don't understand why the visual result is different.  I'm not an advanced user of Photoshop, so maybe I'm missing something.  This is a trial of CS6 that I'm using.
    Layer 1: a layer style and a filter effect, stacked
    looks very different from....
    Layer 2:  a layer style
    Layer 1:  a filter effect

    If you want two separate layers, then on the duplicate layer with the Color Overlay layer style you might try different layer blending modes.
    For example, below looks the same having the Color Overlay with linear burn on the second layer and changing the layers blend mode to Hue.
    You could also put the layer in a group and apply the layer style to the group.
    (i deleted the previous post because of pilot error)
    Message was edited by: R_Kelly

  • Setting the default style sheet

    I am trying to set the default style sheet to my customized css - mainstyle19-en.css. I know that I have to run this command - ant make_main_css -DCOLOR=19 but I don't have ant in my path and it is not recognizing it as a command. How do you put that in the path? Also - where are you supposed to run this command? I know somewhere on the server where the image server is located, but where exactly?
    Thanks for your help,
    Karen.

    In addition, if you are using .net, Sarah Wheeler created a simple portlet that allows the user to create a header portlet with the ability to change the stylesheet. I have modified it a little and would be happy to share my version. Take a look at this thread - http://portal.plumtree.com/portal/server.pt/gateway/PTARGS_0_283309_4352_2758_4823_43/http;/PRODGADGET12.plumtree.com/collab/discussion/app/threadDetails.jsp?projID=39883&forumID=48674&threadID=80810&messageID=80894 (If the link doesn't work, it is located Discussions: Pluggable Nav, Style Sheet Mill, PEI, UI Cust: Changing colors/style sheets with custom header portlets?)
    If you send me an email at [email protected] will send you the code.
    Michael [email protected]

  • Setting the font style of a TitleWindow or Panel w/o creating a skin?

    N00b question - Is it possible to set the font style of a TitleWindow or Panel header/label with out creating a custom skin? Looking for a simple way and I can find one in the docs.
    Thanks in advance

    Yes, using advanced css to style the specific title label in the skin:
        <fx:Style>
            @namespace s "library://ns.adobe.com/flex/spark";
            @namespace mx "library://ns.adobe.com/flex/mx";
            s|Panel #titleDisplay
                fontStyle: italic
        </fx:Style>
        <s:Panel title="hello" />
    -Kevin

  • Setting default paragraph style (InDesign CS4, AppleScript)

    I'm trying to set the default paragraph style to [Basic Paragraph], but this produces an error.
    Setting other styles does work, what's wrong with "[Basic Paragraph]"?
    tell application "Adobe InDesign CS4"
    tell active document
    tell text defaults
    set applied paragraph style to "[Basic Paragraph]"
    end tell
    end tell
    end tell
    Thanks,
    Peter

    Alternatively you could use:
                                  set applied character style of text defaults to character style 1
                                  set applied paragraph style of text defaults to paragraph style 1
    Cheers
    Tobias

  • Setting packetSize given in JDBCDriver.

    I am using, Java, Jboss, Hibernate, SqlServer 2008 R2, getting following exception
    WARNING [com.microsoft.sqlserver.jdbc.internals.TDS.Reader] (pool-26-thread-7) ConnectionID:4 TDS header contained invalid packet length:12590; packet size:8000
    SEVERE [com.microsoft.sqlserver.jdbc.internals.TDS.Reader] (pool-26-thread-7) ConnectionID:4 got unexpected value in TDS response at offset:7992
    ERROR [STDERR] (pool-25-thread-2) Exception in thread "pool-25-thread-2"
    ERROR [STDERR] (pool-25-thread-2) org.hibernate.TransactionException: JDBC rollback failed
    [STDERR] (pool-25-thread-2) at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:204)
    [STDERR] (pool-25-thread-2) at com.wideplay.warp.persist.hibernate.HibernateLocalTxnInterceptor.rollbackIfNecessary(HibernateLocalTxnInterceptor.java:149)
    [STDERR] (pool-25-thread-2) at com.wideplay.warp.persist.hibernate.HibernateLocalTxnInterceptor.invoke(HibernateLocalTxnInterceptor.java:72)
    [STDERR] (pool-25-thread-2) at com.softpak.marserm.engine.library.impl.JobReportStatusUtil.updateReportStatus(Unknown Source)
    [STDERR] (pool-25-thread-2) at com.softpak.marserm.engine.library.impl.ExecutableJob.run(Unknown Source)
    [STDERR] (pool-25-thread-2) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    [STDERR] (pool-25-thread-2) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    [STDERR] (pool-25-thread-2) at java.lang.Thread.run(Thread.java:662)
    [STDERR] (pool-25-thread-2) Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.
    [STDERR] (pool-25-thread-2) at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:170)
    [STDERR] (pool-25-thread-2) at com.microsoft.sqlserver.jdbc.SQLServerConnection.checkClosed(SQLServerConnection.java:304)
    ERROR [STDERR] (pool-25-thread-2) at com.microsoft.sqlserver.jdbc.SQLServerConnection.rollback(SQLServerConnection.java:1655)
    ERROR [STDERR] (pool-25-thread-2) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcRollback(BaseWrapperManagedConnection.java:697)
    ERROR [STDERR] (pool-25-thread-2) at org.jboss.resource.adapter.jdbc.WrappedConnection.rollback(WrappedConnection.java:500)
    ERROR [STDERR] (pool-25-thread-2) at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:217)
    ERROR [STDERR] (pool-25-thread-2) at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:196)
    ERROR [STDERR] (pool-25-thread-2) ... 7 more
    I need to increase packetSize given in JDBCDriver (sqljdbc4), How can I do this?
    I tried many things including defining <packetSize>32767</packetSize> in ds.xml but no use, getting this exception now
    SEVERE [com.microsoft.sqlserver.jdbc.internals.TDS.TOKEN] (pool-27-thread-7) ConnectionID:1: FetchBufferTokenHandler: Encountered unexpected unknown token (0x30)
    SEVERE [com.microsoft.sqlserver.jdbc.internals.TDS.Reader] (pool-27-thread-7) ConnectionID:1 got unexpected value in TDS response at offset:7282
    SEVERE [com.microsoft.sqlserver.jdbc.internals.TDS.TOKEN] (pool-27-thread-7) ConnectionID:1: getNextResult: Encountered unexpected unknown token (0x30)
    SEVERE [com.microsoft.sqlserver.jdbc.internals.TDS.Reader] (pool-27-thread-7) ConnectionID:1 got unexpected value in TDS response at offset:7282
    Edited by: 1007286 on 22-May-2013 00:23

    This isn't the place to ask questions about Microsoft products. I would try to find a manual for the JDBC driver on the Microsoft website if I were you. But I'm a curious chap so I did a quick Google for "sqlserver jdbc packetsize" and turned this up as the first result:
    http://msdn.microsoft.com/en-us/library/ms378988%28v=sql.90%29.aspx
    This documentation lists the property exactly as you say. However one (old) source of information is not enough, I check more results.
    http://docs.oracle.com/cd/E13157_01/wlevs/docs30/jdbc_drivers/mssqlserver.html
    This documentation has an interesting tidbit:
    "NOTE: If SSL is enabled, the driver communicates with database protocol packets set by the server’s default packet size. Any value set by the PacketSize property is ignored. "
    I would read more documentation if I were you.

  • How to find top level object on a given layer?

    I need to assign it to a var...
    var topLevelObj = app.activeDocument.layers.name("foo")... whatever is on top of that stack...
    ...this is probably not correct but you know what I mean

    Jump_Over wrote:
    Hi,
    top level object is the first in a collection:
    var fooLayerTopObj = app.activeDocument.layers.item("foo").pageItems[0]
    Jarek
    I'm not very good in ID-scripting, but I think this isn't good enough to find topmost item of a layer.
    Why?
    - create a new document
    create a polygon
    create a rectangle
    create an ellipse
    create a line
    Run this script snippet:
    var pI = app.activeDocument.layers.item(0).pageItems;
    for (i=0; i<=pI.length-1; i++) {
    pI[i].select();
    alert (i);
    pI[i].locked = true;
    Do you see, which element pageItems[0] is?

  • Query to Identify Sets Having Given Pattern

    Hi,
    Assume that i have following table
    Id Code
    1 aaa
    1 bbb
    1 ccc
    2 aaa
    2 bbb
    2 ddd
    3 bbb
    3 eee
    The records will be grouped by Id. I want to identify sets having following criteria
    1. Set should have at least one record with code like 'a%'
    and should have at least one record for codes 'bbb', 'ccc' (in this case group 1 would be selected)
    2. Set should have at least one record with code like 'a%'
    and should have at least one record for either 'bbb' or 'ccc' (in this case group 1and 2 would be selected)
    Does anyone have idea about how this could be achieved efficiently? Any pointers, references would be appreciated
    Regards
    ~Pravin.

    Problem 1 Can be solved like:
    SQL> select * from t;
            ID CODE
             1 aaa
             1 bbb
             1 ccc
             2 aaa
             2 bbb
             2 ddd
             3 bbb
             3 eee
    8 rows selected.
    SQL> select id
      2  from t
      3  group by id
      4  having sum(case when code like 'a%' then 1 else 0 end) > 0
      5  and sum(decode(code,'bbb',1,0)) > 0
      6  and sum(decode(code,'ccc',1,0)) > 0;
            ID
             1
    <br>
    <br>
    Similarly Problem 2 can also be solved...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Select type by style and move to layer

    I would like to select all the type in my document, at one time, that has a certain style applied. After they are all selected I will move them to a layer so I can set that layer not to print.
    Is there a way to select all the type, at once, that has a specfic style applied?
    I have searched and found nothing. This seems like it should be a smiple thing to do but maybe not?
    Thank you for your time and knowledge.
    CC

    It's most certainly not a simple thing, because a text frame on one layer may contain text with different styles. If you would move a piece of text out of the frame onto another layer (for example, with a script), it would not leave a "gap" but rather all text would reformat to fill the hole.
    I agree with Eugene: if you simply don't want to see all text in a particular style, set its color to None. Be aware other styles may be linked to the one you change, those will change as well.

  • How to set JMS clients to use JVM Invocation layer

    Hi,
    I'm not sure if this JBoss specific (but I'm assuming it's not) so I'll be asking it here. How can I set my JMS clients and Message-Driven Beans to use JVM Invocation layer since the clients and queues will reside in the same JVM.
    Thanks in advance.

    May be that explains why I couldn't successfully integrate ActiveMQ with JBoss. I was using the 3.0 version. I'll try again once I find the time.
    Anyway, do you know how to set JBoss JMS clients and MDBs to use JVM invocation or transport layer instead of UIL2?
    I'm not sure if what I've done is correct But here's what I've done.
    For jvm-il-service.xml, I changed the JNDI reference from "ConnectionFactory" to "JVMILConnectionFactory" since the default service uses "ConnectionFactory". Then I used that reference as my JNDI look up in my JMS client. I'm just not sure how to do this with MDBs. I think I should add an entry in the ejb descriptor file but I need someone to confirm.
    Thanks.

  • Setting the font style and color for FileChooser labels

    Hi Friends,
    I have a certain standard Font style and color set for my application GUI. Now, I want to set the style and color for Swing components like FileChooser. Is it possible ?
    Also is it possible to localize JOptionPane ?
    Please advise.
    Best regards,
    Harilal.

    Does anybody knows how to do that?

  • Retaining layer styles in a text layer merge down

    I created some text and added layer styles to it.  However when I merge the text, first rasterizing then merge down, I lose the layer styles.  The text goes to its original color and no shadow, no stroke, bevels or anything else.
    on a Mac CS 5.5  OS 10.6.8
    Thanks in advance

    Hi,
    If you view the image at 100% view (actual pixels) before rasterizing and merging, does that make a difference?

  • Setting an undeclared style in MXML

    Hi folks,
    for a component that renders via a programmatic skin I would like to set style values in MXML, which are not declared by the component.
    Lets say I had developed a skin for a button that makes the border blink, and I need a "border-blink-color" style.
    The following code obviously wouldn't work
    <mx:Button borderBlinkColor="#ff8822" label="Test" />
    however, setting it via CSS or AS works.
    Now is there a way to achieve my goal using MXML?

    Did you try giving your button an id and setting the style in actionscript?
    In a creationComplete handler:
    myButton.setStyle("borderBlinkColor", 0xff8822);
    <mx:Button id="myButton" borderBlinkColor="#ff8822" label="Test" />
    -Darrell

Maybe you are looking for

  • My iPhone 4 rebooting while hooked up to charge after fall.

    My iPhone 4 recetly fell from pocket to my foot and turned off right away, now it's only rebooting while connected to a charging source; but only continuous reboots. We can't connect to restore it to iTunes because the home button doesn't work as wel

  • Fundamental flaws in Java Server Faces

    Fundamental flaws in Java Server Faces (JSF) After working with Struts framework for many years I wanted to try something new and decided to investigate JSF. I was very impressed with my initial evaluation and recently used it in one of my project. M

  • A warning to those with iWeb not publishing to .mac

    I made a beautiful web site on iWeb, but when I lost my hard drive, even though I saved all my info, I can not restore my web page to the iWeb program! They make it impossible. I was told I should have save my page (not very sympathetic) but I had al

  • Paging and count of rows

    Hi, I have a procedure doing paging and returning the count of rows: As you see I used 2 select, one for paging and one for getting total row counts. Is there a way to get rid of "SELECT count(*) into PO_TOTAL FROM TABLE1;"? CREATE OR REPLACE PACKAGE

  • PI_BASIS 7.02 compatiblity

    Hi Experts! We are in the process of Netweaver 7.0 upgrade to EHP2 which includes plugin PI_BASIS with min. required 7.02 SP07 level. Do you know what restrictions apply or where to get information about the minimum version/patch level for the connec