How to refer to libraries

Hi,
given an open document with different libraries open (especially graphic styles libraries), how do i reference a particular graphic style in one of the libraries to apply it to an element?
Not intended to be a cross posting (i accidentially started a similar thread in the general use forum but i seem not to get answers there).
[EDIT] Forgot to mention: Illu-Ver.: CS4, intended scripting environment: Extend Script Toolkit [/EDIT]
Nachricht geändert durch moebius_tm

Should it be of any use to you or anybody else here. This is how I was doing this some time back. Like I said if you use 'graphic styles' then they bring all the extra used pallet objects with them which can be a bit of a time saver the only one that you would have to handle separately is 'symbols' as these are placed items not applied requiring you to place an instance of it then copying over.
Graphic Styles
tell application "Adobe Illustrator"
set user interaction level to never interact
activate
make new document with properties ¬
{color space:CMYK, width:500, height:500}
set Doc_Ref to name of current document
tell document Doc_Ref
do script "Delete Unused Palette Items" from "Default Actions" without dialogs
do script "Delete Unused Palette Items" from "Default Actions" without dialogs
delete swatch "Smoke"
end tell
my Load_Graphic_Styles(Doc_Ref, "Marks_Graphic_Styles.ai")
repeat the result times
tell document Doc_Ref
delete path item 1
-- do stuff with your graphic style
end tell
end repeat
set user interaction level to interact with all
end tell
on Load_Graphic_Styles(Doc_Ref, Presets_Name)
set Apps_Folder to (path to applications folder as Unicode text)
set Preset_Folder to "Adobe Illustrator CS2:Presets.localized:Graphic Styles.localized:"
try
set Preset_Path to Apps_Folder & Preset_Folder & Presets_Name as alias
set This_Count to 0
tell application "Adobe Illustrator"
open Preset_Path
-- ignore 1 {"Default"}
repeat with i from 2 to count of (graphic styles of document Presets_Name)
make new rectangle at beginning of document Presets_Name with properties ¬
{fill color:{cyan:0, magenta:0, yellow:0, black:0}, stroked:false, width:10, height:10}
apply graphic style i of document Presets_Name to path item 1 of document Presets_Name
duplicate path item 1 of document Presets_Name to beginning of document Doc_Ref
set This_Count to This_Count + 1
end repeat
close document Presets_Name saving no
end tell
return This_Count
on error
error "Your preset does NOT exist where expected!!"
end try
end Load_Graphic_Styles
Symbols
tell application "Adobe Illustrator"
set user interaction level to never interact
activate
make new document with properties ¬
{color space:CMYK, width:500, height:500}
set Doc_Ref to name of current document
tell document Doc_Ref
do script "Delete Unused Palette Items" from "Default Actions" without dialogs
do script "Delete Unused Palette Items" from "Default Actions" without dialogs
delete swatch "Smoke"
end tell
my Load_Symbols(Doc_Ref, "Marks_Symbols.ai")
repeat the result times
tell document Doc_Ref
delete symbol item 1
-- do stuff with your brush
end tell
end repeat
set user interaction level to interact with all
end tell
on Load_Symbols(Doc_Ref, Presets_Name)
set Apps_Folder to (path to applications folder as Unicode text)
set Preset_Folder to "Adobe Illustrator CS2:Presets.localized:Symbols.localized:"
try
set Preset_Path to Apps_Folder & Preset_Folder & Presets_Name as alias
set This_Count to 0
tell application "Adobe Illustrator"
open Preset_Path
repeat with i from 1 to count of (symbols of document Presets_Name)
make new symbol item at beginning of document Presets_Name with properties ¬
{symbol:symbol i of document Presets_Name}
duplicate symbol item 1 of document Presets_Name to beginning of document Doc_Ref
set This_Count to This_Count + 1
end repeat
close document Presets_Name saving no
end tell
return This_Count
on error
error "Your preset does NOT exist where expected!!"
end try
end Load_Symbols
This should be pretty self explanatory just pass the handler the files name string. It expects the file to exist in your App presets folders…

Similar Messages

  • How to refer report items?

    Hi,
    How to refer the report items?
    I have standard sql report region contains 3 columns.
    doc_id,doc_name and No_units.all three items are apex item.
    below is my sql query for report.
    APEX_ITEM.SELECT_LIST_FROM_QUERY(17,doc_id,'select s_id from         
    sales')"doc id",
    apex_item.text(18, doc_name) "doc name",
    apex_item.text(19,  No_units) " No units",null
    from sale_docMy intention is to fire a dynamic action when event change in doc_id. So in when tab what i have to assign in item(s) fields for doc_id. i gave *#doc_id#* in items(s) field it doesnt work.
    how to resolve this?

    any help?

  • How do I transfer Libraries from one computer to the other?

    ok i know this might sound like a dumb question but i have no idea how to do it how do i? i downloaded another library onto this computer but it wouldnt transfer any of my songs so how do i transfer libraries??

    Probably the most straightforward way to get iTunes onto your new computer is to network it with the old one and copy your iTunes folder across. This works fine if you have been using iTunes to completely manage your music and all your songs are in iTunes Music not in different folders. You can also use this method with an external hard drive, you drag the folder from the old computer to the external drive and then from the drive to the new computer. If the songs in your library are not all in the iTunes Music folder you can consolidate them. When you consolidate, any songs in the iTunes Library that are not in the iTunes Music Folder are copied to the Music Folder and the Library is updated to point to those new files. Files already in the iTunes Music Folder have no changes made to them: Copying all your iTunes files to one location - Windows
    Copying the whole folder brings with it the iTunes Music folder and also the iTunes Library (iTunes Library.itl in Windows) database file which holds all the information about your songs (Playlists, Ratings, Play Counts, Last Played, Date Added, etc). You'll get more information including the Folder/File structure in this article: What are the iTunes library files?
    When you copy the iTunes folder make sure you put it into the same location on the new computer. This has to be the exact same place, on a PC this is \Documents and Settings\Username\My Documents\My Music\. When you open iTunes on the new computer it will be the same as on the original one Songs, Playlists, Play Counts, Ratings etc. When I moved iTunes a while ago for my daughter I was also using the same version of iTunes, not sure how important that is but it's probably worth keeping them the same.
    If you have an iPod it can be used as an external drive and you can move the iTunes folder onto it: How to use your iPod to move your music to a new computer

  • How to refer one view from another view?

    Hi,
    I have 2 views in my Adobe Flash Builder mobile app. I need to refer the first view in my second view.
    How to refer one view from another view? Or how to create a reference to a view wherever needed?

    I don't need any data from my first view. In a certain flow, I need to make my first view to be invisible.
    for eg., My First view is in portrait mode. I change the device to Landscape. In the landscape mode, I want to show a completely different view (second view).
    In this case, what happens is, I see my first view in Landscape mode for a second. Then the second view appears. When I change to Landscape mode, only the second view should be seen. I need to make my first view to be completely invisible in the OnOrientationChanging event of
    StageOrientationEvent
    As stage object and StageOrientationEvent works at application level, I need to know how to refer my first view object in the application level.
    private function onOrientationChanging(soe:StageOrientationEvent):void
          MyFirstView.Visible = False; ====> don't know how to refer MyFirstView here
    Is my question clear now?

  • How to refer a column value of a single row in conditional column display?

    Hello,
    does anybody have an idea, how i can refer a column value of a single row in conditional display of a column?
    So my idea is, that a report has a column, which value is only displayed, when another column value of this row has a specific value.
    I want to solve this problem with condition type: PL/SQL Function Body returning a boolean.
    But I do not know how to refer the column value of each single row!
    Thank you,
    Tim

    Here's a solution that, to me, seems easier to implement but, that's, of course, in the eye of the implementer.
    Rather than using APEX to generate a link column for you, actually create the link as part of your SQL.
    select '<a href="f?p=102:3:491847682940364::::P3_CONTACT_ID:' || CONTACT_ID || "><img src="/i/themes/theme_1/ed-item.gif" alt="Edit"></a>' CONTACT_LINK, ...
    etc.
    Test this out. You'll see that it works just like making a column a link using the column attributes.
    Next, we'll change the SQL to use a DECODE statement to either display the link or nothing depending on what your criteria is. For example, let's assume you only want a link for active contacts.
    select Decode( CONTACT_STATUS, 'A', '<a href="f?p=102:3:491847682940364::::P3_CONTACT_ID:' || CONTACT_ID || "><img src="/i/themes/theme_1/ed-item.gif" alt="Edit"></a>', NULL ) CONTACT_LINK, ...
    etc.
    This will not display the link in any rows in which the CONTACT_STATUS is not active, i.e. "A"
    -Joe

  • How to refer a .jar file in the code.

    How to refer a .jar file in the code.
    I want to use a library dnsjava.jar, which I download from the internet. I want to know how to refer it
         If I am compiling the code on Solaris
         If I compiling the code on windows using eclipse.
    I added the following line in my code to refer to this library. But it always complains of not found the class
    import org.xbill.DNS.*;
    I tried the following to add this library but did not work
    On eclipse/windows: Went to window-> preferences -> BuildPath _> class path Variable.
    On Solaris: Could not add this library /opt/java_reference/v1.6.0_04/jre/lib. Although I am logged in as root, but not able to add the library there. Complains of Permission denied.

    Set the classpath option when compiling.
    javac -classpath /path/to/lib/dnsjava.jar YourProgram.java
    I don't use Eclipse, but it probably has a library list on your project preferences. Add it there.
    Regards,
    Henrique Abreu

  • How to refer field of DataSource in transfer rule for DSO object  in BI 7.0

    hello Gurus,
    I am new to BI 7.
    pls tellme how to refer field of DataSource in transfer rule for DSO object.
    I will assign points to proper answer.
    Praveen.

    hi praveen,
    when u create the transformation for the DSO, it asks for the source. in that you enter your datasource, then you get the datasource fields on one side and the rules in the middle and the DSO objects on the other side. whichever field of DataSource you want to refer in tranformation rule, just connect that field to the rule for the required object of the DSO.
    hope this will help you.
    regards
    vaibhav

  • How to refer to Excel tables (ListObjects) in PowerPivot

    I am trying to figure out how to import ListObjects in PP.
    As far as I can tell PP does not seem to "see" range names that refer to entire ListObjects i.e. =T_DTL[#All], while it "sees" ranges that refer to direct cells i.e. =Dtl!$O$3:$V$46.
    Is that correct and is there a way to work around it?
    The reason I am asking is that the tables I want to work with do not necessarily start on line 1 and PP references entire worksheets i.e. Dtl$, as per my example above.I tried different approaches with dynamic ranges but PP refuses to present them as choices
    while Selecting Tables and Views. The only way to achieve what I need is by creating named ranges with hardcoded start and end, which is a bit odd since Tables (ListObjects) are a powerful tool since Excel 2007 and I would expect a stronger integration with
    other powerful tools such as PowerPivot.Apart from the overhead of having to go through each workbook and define a range for every Table I wish to use.
    Am I missing something here?

    My PowerPivot attempt was abruptly broken about a month ago, hence my very late reply.
    Peter is quoting VBA statements on how to refer to a Table (ListObject), which is familiar to me as I am also writing VBA code. Unfortunately my problem is in interactive mode, not in code execution.
    When we open a file's PowerPivot window from within Excel we are prompted to select the tables we want to work with. That is where I cannot see my ListObjects / Tables. I am presented with all ranges that PowerPivot sees as declared in the file that I am
    opening (as in Formulas / Names Manager) EXCEPT for the ListObjects. Those are missing.
    Try it if you will and let me know if this behavior is relevant only to my installation or to yours as well.
    George Thalassinos

  • How to refer to a protected class outside the enclosing package

    Hi all,
    At the page 357 of the book Java Language Specification(Second Edition), when saying about checking accessibility of Type and Method, they concern Let C be the class containing the method invovation T.m, if T is in a different package than C, and T is protected then T is accessible if and only if C is a subclass of T. I just wonder how to refer a protected type outside the package it declared.
    For example,
    package test;
    public class test {
    static protected class protectedTest {
    public void foo() {..}
    in another package
    import test.*;
    class subtest extends test.protectedTest {  <- error
    Anyone can give me an example showing an invocation directly to foo() declared in class test.protectedTest ? The invocation should appear outside package test.
    Thanks,
    Ha Chau

    The protected inner class would be accesible only within a class which extends test, where you could either use or extend it as in:
    class subtest extends test {
        private static class sub2 extends protectedTest {
               }

  • How to symlink vendor libraries in DW? It doesn't consider that a library is in the local site folde

    Here's my question on Stackoverflow.
    http://stackoverflow.com/questions/13223428/how-to-symlink-vendor-libraries-in-dw-it-doesn t-consider-that-a-library-is-in
    And here I duplicate it. Please see on Stackoverflow because I'm afraid I'll not be able to format my question here right way using these forum tools.
    I use Win XP and Dreamweaver. I have ZF2 project. Here its "site root directory", using DW words:
    application_root/
        config/
            application.config.php
            autoload/
                global.php
                local.php
                // etc.
        data/
        module/
        vendor/
        public/
            .htaccess
            index.php
        init_autoloader.php
    I have it here C:\xampp\htdocs\mySite
    In /vendor directory there must be ZF2 library. But I have it in other directory'C:\xampp\htdocs\ZF2' and just want to put symlink to it in my /vendor directory.
    But if do so DW considers that ZF2 library is outside of my project directory. For example I want to require a class:
    require_once('\Zend\Mvc\Application.php');
    But DW says:
    This file is outside of the root folder of site "mySite", and may not be accessible when you publish the site... Would you like to copy the file there now?
    No, I don't want to copy. I don't want to make a score of the same library in every directory of my projects. But DW seems doesnt allow to do it. It makes me to copy only.
    So my question is. Is it possible to set DW that it allows to use symlinks to include libraries which are not in the "site root directory"? How to do it?
    I've read this http://www.adobe.com/devnet/dreamweaver/articles/setup_php.html , but it doesn't help. It has one sentence about the problem and that's all it has. It absolutely doesn't give the answer how to solve it.
    However, this results in two identical copies of every file. Instead it's common practice to store project files in a folder inside the document root of the testing server, which is what you'll do in this tutorial.
    And there is nothing in the tutorial about the problem.

    Non-Windows browsers do not have a concept of a "trusted" site. In Windows, IE and Chrome do not repeatedly prompt for credentials because they use the user's login credentials on the desktop. Other devices do not have this capability. Instead,
    you need to use something like ADFS to authenticate users.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • How to Refer Application item in the html region

    Hi All,
    I have region which says 'Data was refereshed on 12-Apr-2010'. This is displayed in many pages. I want to reduce the manual work of going into each and every page and editing the date.
    I have created an Application Item in shared components. Can anyone help me how to refer this application item in the html region?
    Thanks,
    Vikas

    You can use the syntax of : &<ITEM_NAME>.
    i.e. say I have an application item MY_NAME , I would then have a html region which has the following
    <p>My name is &MY_NAME.</p>see: http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/concept.htm#BEICHBBG
    Trent

  • How to use external libraries jar files in the composite application?

    Hi,
    I have some external jars files (which consists of java classes) that I would like to use in my composite application. 
    I have created a DC with type as external library for the jars.  However, I don't know how to specify the DC to be used in my caf application.
    Can anyone help?
    Thanks.
    Regards,
    Fui Voon

    Hi,
    My jar files consists only java classes and a manifest.mf. The files are compiled using jdk 1.4.2-b28.  Will this be any issue?
    It seems that if I ignore the error and continue step 7 which is to do deployment of the ear, the error given is
    Cannot update it.
    Caused by: com.sap.engine.library.bytecode.cf.CFException: Invalid constant pool tag, 60 at index 41.
    Does anyone know what that mean?
    Is there any sample that teach how to deploy external libraries as bundled library?
    Thanks.
    Regards,
    Fui Voon

  • How to refer standard component to create customize component?

    Dear experts,
    Can any one guide me how to refer a standard component to understand the flow of the event of with in the views and there are various methods are present to change properties of a field property. How can we refer the standard code for changing our field property?
    with regards
    crmfresher.

    Hi,
        The CRM 2007 Webclient cookbook is available if you have a marketplace ID.
    Refer to this thread.
    [CRM 2007 WebClient Cookcook available!;
    Regards,
    Arun Prakash

  • How to refer a particular filed of a Table data type

    DECLARE
              CURSOR C1 IS SELECT
                                       GLUSR_USR.GLUSR_USR_ID BYER_ID,
                                       GLUSR_USR.GLUSR_USR_ADD1 BUYER_ADD
              FROM
                   GLUSR_USR
              WHERE
                   ROWNUM<=5;
    TYPE TBL_TYPE IS TABLE OF C1%ROWTYPE;
    TBL TBL_TYPE;
    BEGIN
         OPEN C1;
         FETCH C1 BULK COLLECT INTO TBL;
         CLOSE C1;
         FORALL I IN 1..TBL.COUNT
         INSERT INTO SATYA_TEMP VALUES(TBL.BYER_ID,TBL.BUYER_ADD);(How to use a particular field of TBL in this case).
         --INSERT INTO SATYA_TEMP VALUES TBL(I); (I know this)
    END;
    My question is how to refer a particular field of table type..?
    Please suggest.

    Then you have to create a record type and give all the columns inside it as given below.
    Then you can create a variable for this type and use it
    Type IS RECORD OF
    columnname1 table_name.column_name1%type,
    columnname2 table_name.column_name2%type,
    columnname3 table_name.column_name3%type,
    OR Use
    rec table%ROWTYPE;
    Edited by: Geek vishal on Aug 4, 2011 12:54 PM

  • How to refer to enclosing instance from within the member class?

    Hi
    How to refer to the enclosing instance from within the member class?
    I have the following code :
    import java.awt.*;
    import java.awt.event.*;
    public class MyDialog extends Dialog
         public MyDialog(Frame fr,boolean modal)
              super(fr,modal);
              addWindowListener(new MyWindowAdapter());
         public void paint(Graphics g)
              g.drawString("Modal Dialogs are sometimes needed...",10,10);
         class MyWindowAdapter extends WindowAdapter
              public void windowClosing(WindowEvent evt)
                   //MyDialog.close(); // is this right?
    In the above code, how can I call the "close()" method of the "Dialog" class (which is the enclosing class) from the inner class?
    Thanks in advance.
    Senthil.

    Hi Senthil,
    You can directly call the outer class method. Otherwise use the following way MyDialog.this.close(); (But there is no close() method in Dialog!!)
    If this is not you expected, give me more details about problem.
    (Siva E.)

Maybe you are looking for

  • I rented a movie from iTunes. When I go to watch; it says download???

    I rented a movie from iTunes for my iPad 3rd Gen. I went to the video app like usual. Selected to watch, and it said- I've already purchased it, but I have to go to downloads to download it. What the heck does that mean? Where do I go. It's taking me

  • Quick question about an exception problem

    Hi all, I'm doing a homework problem with exceptions and there is an outline I have to fill in with some exception handling. There are 2 parts of the problem I'm not sure about that deal with checked and unchecked exceptions and passing exceptions to

  • Chost in makepkg.conf

    what is this variable ? and what happen if i change this ? thanks

  • ALV Grid - Columns Displays?

    Any way to display an ALV grid in different sections? Meaning, The top half of the report lines up columns differently then the bottom half of the report. For instance, The first two columns are always the same for all fields, but becuse the rest of

  • Events and AdvancedDataGridRendererProvider

    <mx:rendererProviders> <mx:AdvancedDataGridRendererProvider column="{someCol}" id="myRenderer" renderer="util.TheRenderer"/> </mx:rendererProviders> if I use myRenderer.addEventListener("customEvent", function2call); I get the error: 1061: Call to a