Script Help: The names of layers from the Excel data

Hello!

I'm a noob script and have tried to learn, but unfortunately I just haven't the time. Projects at work keep me in the Bay. In any case, here's my scenario and I hope someone can guide me.

I want a script that would look at a database (XML, CSV, excel or anything that works) and create separate layers in illustrator based on the data.

Example: description and part number comes from a database. Name of the Illustrator layer is what I want the automation script. The reason for this request is a 200 point that I don't want to retype.

Part numberDescriptionName of the Illustrator layer
33456Point 133456_Item 1
33457Point 233457_Item 2
33458Point 333458_Item 3
33459Point 433459_Item 4
33460Point 533460_Item 5
33461Item 633461_Item 6
33462Point 733462_Item 7
33463Item 833463_Item 8

After that, I have all my items, with correct layer names, I export each layer as a separate PDF file. The name of the export file would be identical to the layer name with "_1up" appended to the end. For example, 33456_Item 1_1up.ai.

I would have a separate illustrator file that contains all the same name of the layer as above and then I place the exported file, he respected the layer. This is where the script of another would be great. Is it possible to make a script that will place an image on a layer that has similar naming structures (the only differences would be the name of the layer would not "_1up")?

I hope this makes sense and I know that I ask a lot. I thank very you much in advance!

still not sure why export you all the layers to separate the files only to place them all back again?

but this will get your layers created.

var line,lay,myLayers = [];
var csvFile = File('e:/csv.csv');
csvFile.open( 'r' );
while(!csvFile.eof){
    line = csvFile.readln();
    line = line.replace(',','_');
    myLayers.push(line);
}
csvFile.close();
var doc = app.activeDocument;
for(var i = myLayers.length - 1; i > 0; i--){
    lay = doc.layers.add();
    lay.name = myLayers[i];
}
var oldLayer = doc.layers.getByName('Layer 1');
oldLayer.remove();

CSV should simply be:

33456, point 1

33457, point 2

...

Tags: Illustrator

Similar Questions

  • Script for the current date

    I have a javascript document that worked. It prints the current date to the first opening the PDF file in a field called today. Subsequently, the date does not change no matter how many times the PDF file is opened.

    var f = this.getField ("Today");
    If (f.value == ' ') f.value = util.printd ("mm/dd/yyyy", new Date());

    I'm using Acrobat 9 Pro and for some reason this script no longer works in version 9. If someone can help fix this sript, I would be very happy.

    It works fine for me in Acrobat 9.2.0 (under Windows 7). If the field is empty when the form opens, it inserts the current date. If the field is not empty, it does nothing.

    You are absolutely sure that the field 'Today' is empty when you open the PDF file?

  • Script to the database data to TextInput

    Hello

    As it says in the title, I want to put the database data to Textinput. Here is my request:

    Cliché 2009-05-12 11-55-40.tiff

    Well, what I want to do is when you click on the rows in the Datagrid control, the 'Name' field is filled by the name in the DataGrid, the "address area" by the address in the Datagrid...

    Can someone help me? Please

    Thank you

    It is a minimal example:

    
    
         
              
         
    
         
    
         
    
    
  • Graph of the Excel data with overlay of dynamic data acquisition

    Hi all

    I was next to the forum of Labview for about a year, it's the same with my programming so I'm a little rusty. I don't have someone code this for me, but just a quick plan high level to point me in the right direction.  I am able to work through the tutorials Excel etc.

    Task 1: Basically, I have a set of data Excel (2 to 6 columns of figures, not the time) I want to read in Labview and throw in a XY graph as the base model that remains visible all the time.  This data set is quite long, length vs. size (length is 100km, 1 m intervals). I essentially want a scroll X graph to display all of the data.

    Task 2: Acquire a direct serial data string which will be superimposed on the graph of task 1 model. Acquired essentially data comparing data in real time to previously.

    In the past, I made the simple projects with Excel data reading and also the reading of data in series.  What I'm not clear on is how to create the (static) graph with Excel data model while superimposing live data as it comes.  It is the basis of an annual check of the investigation process.

    Advice on the process would be appreciated so I'll be working through the nuts and bolts.

    Cheers for any help,
    Wes

    If you are worried that your data sets is too large, then run a test with simulated data to see how LV takes it. You might be surprised. In all cases, you should be aware that the chart control will need to redraw it with any changes you do anyway, and as far as I know, having a large amount of data is the main thing that can make a slow chart control. If you find that you have too much data, you might need to decimate it you based on how much you zoom before putting it in the graph.

  • Need help to load the data from the Excel data to oracle tables

    I need to load an Excel worksheet to the Oracle table.

    The worksheet contains 20 columns, the first 8 columns contains basic information, but the rest 12 columns contains info like
    1stQtr_08, 2ndQtr_08, 3rdQtr_08, 4thQtr_08
    1stQtr_09, 2ndQtr_09, 3rdQtr_09, 4thQtr_09
    1stQtr_10, 2ndQtr_10, 3rdQtr_10, 4thQtr_10

    So what I have to do is:

    break only one record (with 20 fields) in Excel to 3 files for each fiscal year in the Oracle table for each record in the database table will look like

    8 base field + fiscal_year + 1stQtr_08, 2ndQtr_08, 3rdQtr_08, 4thQtr_08
    8 base field + fiscal_year + 1stQtr_09, 2ndQtr_09, 3rdQtr_09, 4thQtr_09
    8 base field + fiscal_year + 1stQtr_10, 2ndQtr_10, 3rdQtr_10, 4thQtr_10

    There are about 10000 rows in the data file, so how can I use sqlldr to perform this task? beside sqlldr, other good suggestions?

    THX

    External tables is just an API Oracle sqlloader. If you are about to load this data over and over again, the external tables would be a good idea, but if it's a one time thing, sqlldir is more simple, unless you want to just learn to use external Tables.

    I used to run a data warehouse, so I did it, the less similar to what you do in the past.

  • Help the fetaching data in dynamic PL/SQL tables

    Hello

    I'm develioping a PL/SQL procedure in which I'm 24 tables of PL/SQL creation of the same type.

    But while inserting data in them, I need to use the table dynamically names for example, immediate enforcement to put the data in the tables would remain even just I need for each loop for the Execute immediate statement, it must use the name in the other table.



    See the code example below:

    Varchar2 column (20);
    Type RA_TABLE is table of the CALL_DETAIL_EXCEPTION. TYPE % IC_CIRCT_GR_CD
    index of directory;

    MY_RA1 RA_TABLE;
    MY_RA2 RA_TABLE;
    MY_RA3 RA_TABLE;
    MY_RA4 RA_TABLE;


    BEGIN

    for idx in 1.cnt_interval loop

    Column: = "MY_RA" | IDX;

    Query1: = 'select Trunk_info bulk collect INTO MY_RA | IDX |' dbl.vw_cgi v where there is no (select 1 of dbl.varun f
    where f.ic_circt_gr_cd = v.TRUNK_INFO and f.call_gmt_dnect_dt_time between
    to_date('''|| stime ||'') (', "yyyymmddhh24miss") and to_date('''|| eTime ||'') ((', 'yyyymmddhh24miss'))';


    Now, when I run this code, it gives me an error for query1 saying that it's a function not implemented in Oracle.


    He is not able to choose this dynamic table name.

    Help, please!
    dbms_output.put_line(l_outertab(1)(1));
    
  • Script for the content data store

    Hello

    I'm new in the world of Vmware of scripts.

    I used powercli and real working examples of scripts to find my way.

    I am trying to create an inventory of the existing infrastructure of vmware.

    I have a list of all the VMS and their data store, but I also need a data store content.

    As:

    a list of all the stores of data in a data center.

    Download all the contents of the data store (folders, files vmdk, iso files, other files)

    A list of all the folders / files with VMservers still known in the inventory.

    The goal is to know if there are any files/VMservers on the data store, which are no longer in use and to check if we have duplicate in other data stores files

    Thanks in advance for any assistance.

    Best regards

    Dany

    Take a look at the data store provider

    Try something like

    dir vmstore: \-recurse

  • Creation of buttons in movieclip in the script with the xml data?

    The code following, showing the errors when I create buttons multi based on xml data. Please help me

    package {}
    import flash libraries
    import flash.display.Sprite;
    import flash.events. *;
    flash.xml import. *;

    import flash.display.MovieClip;

    multibuttons public class extends Sprite {}

    private var xml_loader:URLLoader;
    private var xml_data:XML;

    public void multibuttons() {}

    xml_loader = new URLLoader();
    donnees_xml = new XML();

    xml_loader. Load (new URLRequest ("buttons.xml"));
    xml_loader.addEventListener (Event.Complete, load_xml);
    }


    public void load_xml(evt:Event):void {}
    try {}
    donnees_xml = new XML (evt.target.data);
    trace ("XML data loaded successfully");
    button_xml_list (xml_DATA);
    } catch {(evt:message)}
    trace ("data XML has not loaded");
    trace (evt. Error);
    }

    }

    public void button_xml_list(butn_list:XML):void {}
    var button_list:XMLList = butn_list.totalbutton.button;
    for each {(var button_element:XML in button_list)
    trace (button_element);
    box_button is linkgae of film clip
    var create_button:box_button = new box_button();
    create_button.x = 50;
    create_button.y = 50;
    addChild (create_button);
    create_button.x += 30;
    }

    }

    }


    }

    If multibuttons is the class of your documents, your buttons will be added to the scene.  but they will all be added to the same x, y so

    you will see only one.

  • Using the Excel sort function through tiara.

    Hello

    I'm looking to make use of the sorting function in Excel via DIAdem. I export the data of my. TOC files in a newspaper running in Excel, and I'd like to be able to sort out a selection, in ascending order, based on the data in the first column.

    Everyone has achieved something close to that?

    I appreciate any help you can offer.

    Hey Kevin,

    I was look a little on the web about the issue you are experiencing. Honestly, I'm not an expert on ActiveX scripting, however I found out something that at least might be useful about the method in script of the Excel worksheets. If you take a look at the second point on this link, how certain methods and properties are disabled when a control tool is active and above all they talk about the method out and that they offer as workaround to activate another element on the sheet before calling the method out.

    I hope that you will find useful for your development as well!

    Best regards,

  • Help to import Excel data in tables preformattes

    This is my first post here, so please be gentle!

    I am a relatively new user of InDesign CS4, and I created the list price of the manufacturer 70 - pg.  A very large part of each page will be of size and price information source of a large Excel spreadsheet.

    I created the table format I would use for each page, but the problem comes when I import the Excel data in this table.  For some reason, when I import, all this turns in a cell.  It would be preferable to import into a table not formatted and then put in the form table every time, or is there a way to simply import data into my preformatted table?  I've seen how the former, but the latter seems much easier (.. .Although that could be my inexperience talking).

    Any advice would be greatly appreciated!

    Thank you very much

    Laura (V1500)

    To paste a range of cells in the way you want, you have most of the steps down.

    The key point is to select the CELL at the top left of the area you want to paste into. See the screenshot below. The first cell in the range of rates is selected.

    You may simply move the active cursor in the cell. This puts the contents of the Clipboard into this one cell.

  • Need help to build the query/pl-sql block to get the query result and the name of column from DB table in the form of key-value pairs.

    Hi Experts,

    I have a DB table has columns of more than 50.

    I question this table, it should only return one line at any time. as sqldeveloper below image.

    here, I need to build block pl/sql-query, Discover the column in the table as a key and query result as values.

    Eg:     Key                         -  Value

    TASK_EVENT_ID - 1765

    EVENT_TYPE - ASR_UPDATE

    ... etc until all of the columns in my table.

    Experts please comment on that point, appreciate your help on this.

    Thank you

    -Vincent.

    Here is an approach using DBMS_SQL to iterate over the columns of key / value to assign... (Little code snipped for brevity)

    create or replace procedure (task_expired)

    v_store_id in full,

    v_task_action_id in full,

    v_job_id in full

    )

    as

    -[SNIP code...]

    v_sql VARCHAR2 (4000): = ' select * from my_table where PK = 123';  -Your SQL here!

    v_v_val VARCHAR2 (4000);

    v_n_val NUMBER;

    v_d_val DATE;

    v_ret NUMBER;

    c NUMBER;

    d NUMBER;

    col_cnt INTEGER.

    f BOOLEAN;

    rec_tab DBMS_SQL. DESC_TAB;

    col_num NUMBER;

    vAsString VARCHAR2 (4000);

    BEGIN

    -[SNIP code...]

    Message_properties. CORRELATION: = "EDF_EVENT";

    MSG: = SYS. AQ$ _JMS_BYTES_MESSAGE. Construct();

    Msg.set_string_property ('queueName', ' shipping/csi_cth');

    Msg.set_string_property ('MODE', 'CR8');

    c: = DBMS_SQL. OPEN_CURSOR;

    DBMS_SQL. PARSE (c, v_sql, DBMS_SQL. NATIVE);

    d: = DBMS_SQL. Execute (c);

    DBMS_SQL. DESCRIBE_COLUMNS (c, col_cnt, rec_tab);

    1.col_cnt J

    LOOP

    CASE rec_tab (j) .col_type

    WHEN 2 THEN

    DBMS_SQL. DEFINE_COLUMN (c, j, v_n_val);      -Number

    WHEN 12 CAN

    DBMS_SQL. DEFINE_COLUMN (c, j, v_d_val);      -Date

    ON THE OTHER

    DBMS_SQL. DEFINE_COLUMN (c, j, v_v_val, 2000);   -Else treat as varchar2

    END CASE;

    END LOOP;

    LOOP

    v_ret: = DBMS_SQL. FETCH_ROWS (c);

    WHEN OUTPUT v_ret = 0;

    1.col_cnt J

    LOOP

    -Fetch each column to the correct data type based on coltype

    CASE rec_tab (j) .col_type

    WHEN 2 THEN

    DBMS_SQL. COLUMN_VALUE (c, j, v_n_val);

    vAsString: = to_char (v_n_val);

    WHEN 12 CAN

    DBMS_SQL. COLUMN_VALUE (c, j, v_d_val);

    vAsString: = to_char (v_d_val, ' DD/MM/YYYY HH24:MI:SS');

    ON THE OTHER

    DBMS_SQL. COLUMN_VALUE (c, j, v_v_val);

    vAsString: = v_v_val;

    END CASE;

    Msg.set_string_property (rec_tab (j) .col_name, vAsString);

    END LOOP;

    END LOOP;

    DBMS_SQL. CLOSE_CURSOR (c);

    DBMS_AQ. ENQUEUE (queue_name-online 'cbus.aqjms_common',

    Enqueue_options => Enqueue_options,

    Message_properties => Message_properties,

    Payload-online msg,

    Msgid => Message_handle);

    dbms_output.put_line ('00 Msgid =' |) Message_handle);

    dbms_output.put_line('===Done=');

    -[SNIP code...]

    END;

    /

  • File names image missing from the underside of the Photo Image

    I recently spoke with someone from Apple support and they confirmed that displaying the name of the file Image is a present feature in iPhoto, but was lost in the update photograph.  Their suggestion was to send feedback to Apple.  He said that it is the most effective way to get results and more of us than that best the chance we have to see this feature in a future update of photography.  It was my return to Apple:

    "Thank you for the update photograph... I appreciate some of the improved features that have been made for him. However, I would like to note that the absence of the names of files that appears under the image is cruelly.  I find this information very useful as I get pictures from other sources and helps determine the ownership of the photos.  Now, I'm a little lost without her.

    While the screen may look sharper and more user friendly for some, it would be good to know that this feature could be made available View (display Image File Name) option.

    Could I do that as a suggestion for your next release? »

    If you are also missing this feature, I encourage you to submit your comments to http://www.apple.com/feedback/photos.html

    iPhoto has used the names of files as a default title to be displayed as thumbnails, if no title has been assigned. Photo for Mac displays only the titles under the thumbnails, if a title had been awarded. He makes a distinction between a title assigned user and a file name.

    As a workaround: in the tip section the user to change the title of a photo file name - have a look, we have posted a few Scripts from Apple:

    Photos will show the title under the thumbnails if you select the titles in the menu: view > metadata.

    An alternative workaround: you get pictures of the power.  It allows you to browse your photo library with fields of metadata under the thumbnails - keywords, titles, names of files. You can customize what you want to see in the title or subtitle.

    But I support the request for better support of metadata in the pictures.  The feedback form is here: Feedback - Photos - Apple

  • Cannot right click Windows 7 Explorer of files to generate the copy of the file names in a Notepad or Excel-compatible file. HELP REQUESTED!

    I struggled for several hours to restore the service right click that I used to have XP to Windows 7.  I need to save lists of file names such as displayed in the file Explorer. Allowing you to right-click and save files in Notepad. This option has been removed in Windows 7 and anything put in place to restore it.

    I have lists of items in the inventory and need to copy and paste the image corresponding to a transfer sheet to allow the server names to match images in article SKU.  The file names are long and typing is a complete waste of time.

    I used to be able to find them in the Windows Explorer, right-click on the directory and generate a txt file that I could open in Notepad or Excel.  -Easy.  Now right-click only allows an export in an uneditable image in ONE NOTE. This is useless for me. I can't do anything with an image file - I need the editable data.

    Is there a solution?  I need only the file name and extension, not the full path, in a text or spreadsheet document propagation.

    I had used the Microsoft solution to install their dose without knowing the final format was a NOTE image file format and not a simple txt file. I try now too write the batch file:

    %windir%\Printdir.bat

    or edit it in order to keep the file in Notepad and do not make the final conversion into a single Note.

    The problem is that the fix from Microsoft, designed to fix this problem, has placed the conversion file in the root directory and it cannot be overwritten.  I refused the possibility to delete, edit or write the file due to the requirements of administrative privilege mandated by the security of Windows 7 too much.

    So if anyone has a solution to every problem - that would help - I am very tired and frustrated and not happy with Microsoft.  Their zealous concern with security made their unnecessary programs for me and have further discouraged me to convert to the windows 10. frustrations and nightmares are waiting for me there I can't imagine.  What I really want to do at this point is to go back to XP.

    He ate five hours of my day. I don't have the time to fight like that. I am trying to be productive, but all I got are monumental technical walls and roadblocks - often designed into the system. Frustrating doesn't begin to describe it.

    Found a solution on a Web site:

    http://www.watchingthenet.com/how-to-print-a-directory-tree-from-Windows-Explorer.html

    They said it was for VISTA, but worked for me under Windows 7. You will need to use Notepad to the command prompt and select run as administrator to save the file in the root directory.

    Thanks for the help.

    Cheers.

  • How to import the list of names of VM and opposed a script of the imported virtual machines list

    Hi guys,.

    Can someone help me and integrate a csv import script (which contains a list of VMS) and ran the script against the VMs imported to create a CSV output below? Thank you very much in advance.

    SE connect-VIServer xxxxxxxx

    $date = get-Date-format-M - d - yyyy

    . 'c:\Users\xxxx\test\test2\scripts\xxx scripts\Get - FolderPath.ps1'

    $folders = get-file-type vm | Get-FolderPath | Sort-Object Id

    {Set-Path function

    Param ($Object)

    foreach ($folder IN $folders) {}

    If ($folder. ID - eq $Object.Id) {}

    $result = $folder. Path

    breaking

    }

    }

    $result

    }

    Get - VM vditest - 1.xxx.internal | Select-Object - property Name,@{N='Datacenter'; E={$_| Get-Datacenter}},@{N='Cluster'; E={$_. VMHost.Parent}},

    NumCPU,MemoryGB,ProvisionedSpaceGB,@{N='Path'; E={($_. Folder | Get - FolderPath). Path}},@{N='FolderID'; E = {$_.folder.} ID}} | Export-Csv "C:\test\vm-xxx-$date.csv" - NoTypeInformation - UseCulture

    Try something like below script

    It assumes that your CSV file looks like this

    'Name '.

    "VM1.

    "VM2.

    The script

    VM.csv Import-Csv - UseCulture | %{

    Get-VM-name $_. Name |

    Select Name,

    @{N = 'Center'; E = {Get-Datacenter - VM $_______ |} {{Select - ExpandProperty name}}.

    @{N = "Cluster"; E = {Get-Cluster - VM $_______ |} {{Select - ExpandProperty name}}.

    NumCpu, MemoryGB,

    ProvisionedSpaceGB,

    @{N = "Path"; E = {}

    $current = get-view $_. ExtensionData.Parent

    $path = $_. Name

    {}

    $parent = $current

    if($parent.) Name - only "vm") {$path = $parent. {Name + "\" + $path}

    $current is get-view $current. Parent

    } While ($current. Parent - no $null)

    [channel]: join ('-',($path.)) Split('\') [0.. ($path). Split('\'). (Count-2)]))

    }},

    FolderId

    }

  • Help to get a file from the host to the virtual computer within the workstation

    Hello

    I need help with a script in the guest operating system (this is through workstation).

    Workstation will not see the USB drive (driver error), or the CD rom.   I can't mount the CDROM because he said/dev/cdrom is not a valid block device (I have modified/etc/fstab) and I tried everything listed here http://www.computing.net/answers/linux/cdrom-not-a-valid-block-device/6331.html

    I also tried to copy the script in the guest OS using vmrun

    C:\Users\rodelane\Desktop > vmrun t ws - gu root gp - password copyFileFromHostT

    oGuest "C:\Users\rodelane\Desktop\vm_discovery.pl" / tmp/vm

    Error: Invalid file names

    Any help or advice are appreciated

    I think you'll have better luck poster this problem on the forum of vCenter. VIX is not involved in the activation of vCenter.

Maybe you are looking for

  • VMWare Player

    Pavilion g6 1201-tx. QG470PA #ACJ. Windows 7 64-bit. 2nd gen i5 2430 M 2.4 GHz, Intel HD 3000 + AMD Radeon 6470 M 1 GB HD. 640 GB HARD DRIVE. 4 GB OF RAM. I want to install Linux on my Windows 7, but using 'VMWare Player '. If I install Linux with VM

  • Use of the key board

    How to make a symbol of the Euro with a TouchSmart PC key board?

  • my laptop is plugged in, but it is not the battery, how to fix?

    I have a laptop Dell Latitude D620 and today for a reason any, it is not the battery... I have not changed the settings... can someone help me please...

  • Need 1024 x 600 1024 x 768 screen resolution

    Have a screen of 1024 x 768 on graphics controller Intel (r) 82852/82835 GM/GMR. My system tells me that my drivers are up to date. My screen resolution is at 1024 x 600 then available on slider is 1152 x 864, which is of no use to me. I used to only

  • Regular expression - get longer channel number

    I think it's easy, but I can't get it. Lets say I have a string "A1_1000", I would like to remove the 1000 using regular expressions. When I fed regular expression Match I get '1', which is not the longest number. I know other ways to do it, but I wa