Storing per project script data ?

Hello,
I have configuration for user selections that I need to store on a per project basis, things like files paths and co.
Where this data should be kept, I obviosuly can keep it in a seperate file next to the psd, or inside photoshop registry but I'm looking for a better solution of storing the data inside the psd file itself.
Is there an API solution for this, or should I be looking into hacks such as finding an unused XMP field and storing the data there?
What is important to me is that this data will survive application reboots.
Second priority is the situation that a user emails the psd to someone else, I would like this data to be present there as well.
Any suggestions?

Unless Xbytor knows something about layers that I don't I think when he said 'a hidden text layer' he meant a normal text layer with the visibility turned off. The layer would still be in the layers panel.
I am not sure what you mean by 'CompsLayer'. If you mean Layer Comps, then no layer comps are not layers so don't have layer metadata.
Here is an example of using reading/writing layer metadata.
loadXMPLibrary();
try{
var layerXMP = new XMPMeta( activeDocument.activeLayer.xmpMetadata.rawData );// get the object
}catch(e){
    var layerXMP = new XMPMeta();// layer did not have metadata so create new
var lastUpdated = getLayerChangedDate();// get the date. Photoshop updates time so no need to set.
setDescMetadata( 'Desc' );// set desc
var comment = layerXMP.getProperty( XMPConst.NS_EXIF, "userComment" );// get comment
var count = layerXMP.countArrayItems( XMPConst.NS_DC, "description"  );// get the number of items
if ( count == 0 ) {
    layerXMP.getArrayItem( XMPConst.NS_DC, "description", 1 );
setCommMetadata('comment');// set comment
lastUpdated = getLayerChangedDate();// get the date. Photoshop updates time so no need to set.
alert(lastUpdated);
unloadXMPLibrary();
// these function adapted from PerLayerMetdata.jsx -Copyright 2008 Adobe Systems Incorporated
// to use these functions are from the Photoshop Panel Developer's Guide.
function loadXMPLibrary(){
    if ( !ExternalObject.AdobeXMPScript ){
        try{
            ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
        }catch (e){
            alert("Can't load XMP Script Library");
            return false;
    return true;
    The function unloads the XMP Script Library.
function unloadXMPLibrary(){
    if( ExternalObject.AdobeXMPScript ) {
        try{
            ExternalObject.AdobeXMPScript.unload();
            ExternalObject.AdobeXMPScript = undefined;
        }catch (e){
            alert("Can't unload XMP Script Library");
function setDescMetadata(desc){
    if( app.activeDocument.activeLayer.isBackgroundLayer ){
        alert( 'Can not place metadata on a background layer.');
    } else {
        var xmp;
        if (desc == "")
            desc = " ";
        try{
            xmp = new XMPMeta( app.activeDocument.activeLayer.xmpMetadata.rawData );
        } catch( e ) {
            xmp = new XMPMeta();
        try{
            if( xmp.countArrayItems( XMPConst.NS_DC, "description" ) == 0 ){
                xmp.appendArrayItem( XMPConst.NS_DC, "description", null, XMPConst.PROP_IS_ARRAY, XMPConst.ARRAY_IS_ORDERED );
                xmp.insertArrayItem( XMPConst.NS_DC, "description", 1, desc );
            } else {
                xmp.setArrayItem( XMPConst.NS_DC, "description", 1, desc );
        } catch( e ) {
            alert( 'Unable to place description metadata on selected layer.\n' + e );
        app.activeDocument.activeLayer.xmpMetadata.rawData = xmp.serialize();
function setCommMetadata(comm){
    if( app.activeDocument.activeLayer.isBackgroundLayer){
        alert( 'Can not place metadata on a background layer.' );
    } else {
        var xmp;
        if ( comm == "" )
            comm = " ";
        try{
            xmp = new XMPMeta( app.activeDocument.activeLayer.xmpMetadata.rawData );
        } catch( e ) {
            xmp = new XMPMeta();
        try{
            xmp.setProperty( XMPConst.NS_EXIF, "userComment", comm );
        } catch( e ) {
            alert( 'Unable to place metadata on selected layer.\n' + e );
        app.activeDocument.activeLayer.xmpMetadata.rawData = xmp.serialize();
function getLayerChangedDate(){
    var ref = new ActionReference();
    ref.putProperty( charIDToTypeID( 'Prpr' ), stringIDToTypeID( "metadata" ) );
    ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
    var desc = executeActionGet( ref );
    if ( desc.hasKey( stringIDToTypeID( "metadata" ) ) ){
        desc = executeActionGet( ref ).getObjectValue( stringIDToTypeID( "metadata" ) );
        var timeInSeconds = desc.getDouble( stringIDToTypeID("layerTime") );
        var d = new Date();
        d.setTime( timeInSeconds * 1000.0 );
        return d.toLocaleString();

Similar Messages

  • Scheduling as per given project finish date

    I need to know if it is possible to arrange the project structure to do below described scheduling.
    Urgent reply will be highly appricated..
    thanks,
    he.
    I would like to give the "project finish date " ;
    I would like p6v7 would schedule such that ;
    - project finish date would be the date that I gave,
    - all activity dates would be defined accordingly even if they should have been start and/or finish before project start date.
    I should say that there is not any resource / cost assignment. Just activities/ original durations/ and relationships have been entered.

    user9166529,
    By you saying "project finish date" I have to assume that you have some sort of mandatory completion date such as a contract deadline.
    Or do you mean that you want to add a date constraint to the project finish date such as "must finish on or before" your date of completion?
    If needed, you could even apply a "mandatory finish" date constraint (not highly recommended).
    On the other hand, by building your initial schedule you will be able to determine your planned finish date by tracing your longest path. If this completion date does not meet your needs you then would need to adjust your scheduled activities (durations) to fit within your planned finish date.
    After settling on your initial schedule, save it as a baseline (copy) in order to perform periodic comparisons between your original (baseline) and the current (real time) schedules. The result of performing these comparisons will produce your schedule variance data.
    Hope this helps,

  • Storing in projects vs. albums

    Hey!
    I've been doing an internship for 7 months now and I've been taking pictures like crazy, I'm up to 4200 and counting.
    Currently I'm storing all photos in a project called internship and each event (like roadtrips) are in separate albums.
    Recently I noticed that aperture is getting kinda slow so I started thinking, could this be because of all 4200 photos being in the same project?
    How are you supposed to organize your photos?
    You can either do what I do today or you could switch places of projects and albums (so you have one album in the root and many projects), you could also use folders. Which way is preferred?
    Thanks
    Nicklas

    Good advice above.
    Ansman wrote:
    Currently I'm storing all photos in a project called internship and each event (like roadtrips) are in separate albums.
    Instead, let each road trip or perhaps one day's shoot, or morning shoot be an individual Project, aiming for that goal of (a) logical time-based organization and (b) no more than ~500 pix per project I have not personally tried to quantify the impact of Project size on performance.
    "Internship" can be a folder with all the relevant projects in it.
    Note that an Album is just a collection of pointers to Versions, so Albums can be created and discarded at will, changing nothing and taking up negligible space. Very powerful tool. Albums are often created by searching on Key Words, another very powerful organizing tool in the database of image files.
    Recently I noticed that aperture is getting kinda slow...
    Aperture is a very demanding application that can slow down for lots of reasons. Hard drives and RAM are the two main reasons that a workflow slows - and they interrelate. Setup changes, workflow changes and/or version changes can also be causative.
    HARD DRIVES
    Hard drives slow as they fill so keep drives underfilled. No more than ~70% full is a good maximum guideline, but less full is faster. A hard drive 80% full performs more slowly than a 50% full hard drive. Even a hard drive used solely for backup should be not allowed to exceed ~85% full for stability reasons.
    The Aperture Library should be on a fast underfilled internal drive. Reference Masters to external drives as needed to keep internal hard drives underfilled. Use Firewire 800 (thunderbolt on 2011 Macs) rather than USB for external drives when possible.
    Back up originals on external drives prior to import into Aperture or any other images app. I cannot overstate how important that is, and various manuals, texts, etc. present workflows that skip that critical step. Also back up the Aperture Library using Aperture's Vaults, which are designed for that purpose.
    RAM
    Your workflow may be running out of RAM and therefore "paging out" to disk. Page outs slow operation a lot and can lead to instability.
    You can evaluate whether or not you have adequate RAM by looking at the Page Outs number under System Memory on the Activity Monitor app before starting a work session; recheck after working and if the page outs number (manual calculation of ending page outs number minus starting page outs number) increased significantly during operation your workflow is RAM-starved. Ignore the pie charts and other info in Activity Monitor.
    If page outs increase significantly during operation you can add RAM or simply try to run Aperture by itself. Switching from 64-bit operation to 32-bit operation will also make some additional RAM space available.
    On my 2006 MBP with its max of 3 GB RAM I always did a restart prior to a heavy Aperture session to clear any memory leaks and make sure no other apps were open. Browsers in particular will often suck RAM Aperture would otherwise be using.
    The problem with running a RAM-deficient workflow like I did is that along with slower operation, page outs can reduce overall stability - - and instability always seems to present at the worst times, like in the midst of processing a time-critical project. It does help a lot to keep a really really clean workflow.
    If your test of page outs does show that you are paging to disk the speed of your drives and drives connectivity become even more important than normal.  The use of solid state drives (SSDs) frequently reduces the impact of inadequate RAM.
    OS 10.7 does seem to utilize more RAM than OS 10.6 does, and that makes sense because over time evolving OSs and evolving apps take advantage of evolving hardware.
    IMO all Aperture users who can should routinely bump RAM to at least 8 GB. Two good sources of third-party RAM (Apple overprices RAM) are Crucial and OWC http://eshop.macsales.com/.
    HTH
    -Allen Wicks

  • FCP project creation date

    Hi all,
    1 have an installation with three MDC Xserves (10.6.2) ,8 Mac Pro clients ( 10.5.8 ) with XSAN 2.2.1 and Open Directory .
    The MAC pro clients have Final Cut Pro 6.0.6 installed.
    When we modify a project in FCP and save it then the creation date of the file changes to the modification date. This behavior happens only in the XSAN volumes and only for the FCP projects, if we create a text file , edit it and then save it the modification date changes but the creation date is not affected .
    Thanks in advance.
    Mac Pro Mac OS X (10.5.8) Xsan 2.2.1 & Final Cut Pro 6.0.6

    Hi Uday,      
    Thanks for your post.
    It seems the created date not stored in Project object in TFS API. To get team project created date automatically, you can query the date from
    [Tfs_DefaultCollection].[dbo].[tbl_projects]
    table>> [last_update]field use coding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Query Purchasing Report per Project

    Dear all,
    I want to make query that can give me information about purchasing report per project. The data should come from AP invoice and AP credit memo (item and service type). I use project code field in the form to filter data.
    Thanks before for your kind help

    Hai!
    Try this
    Declare @project as nvarchar(30)
    set @Project = (select max(S0.PrjCode) from OPRJ S0 where S0.PrjCode='[%0]')
    Select
    a.Itemcode,
    max(a.Name) Name,
    sum(a.quantity) Quantity,
    sum(a.price) Price,
    sum(a.linetotal) Line_Total from (
    SELECT
    T1.ItemCode,
    max(T1.Dscription) Name,
    sum(T1.Quantity) Quantity,
    sum(T1.Price) Price,
    sum(T1.LineTotal) LineTotal
    From
    PCH1 T1,OPRJ P0
    where
    T1.Project=P0.PrjCode and
    T1.Project = @Project
    Group By
    T1.ItemCode
    UNION All
    SELECT
    T1.ItemCode,
    max(T1.Dscription) Name,
    sum(T1.Quantity) Quantity,
    sum(T1.Price) Price,
    sum(T1.LineTotal) Line_Total
    From
    RPC1 T1,OPRJ P0
    where
    T1.Project=P0.PrjCode and
    T1.Project = @Project
    Group By
    T1.ItemCode) a
    Group By
    a.ItemCode
    Regards,
    Thanga Raj.K

  • Unable to Change Project Start Date in Project Server 2013

    Dear All,
    I have created new EPT in Project Server 2013. After that, when i am creating any new project in PWA 2013 by using newly created EPT, then i am not able to change Date as per my requirement. 
    Basically, EPT created on 02/18/2015 & even though i am changing Project start date then its again showing same date (02/18/2015)
    Kindly suggest what i can do.

    Hello,
    Does this new EPT have a project plan template associated? What happens if you set the EPT not to have a plan template then create a new project from this EPT? Does that let you update the start date? The start date should default to today (date the project
    plan was created). If that works as expected, add the plan template back to the EPT (if you had one to start with) and test creating another project to see if that then works or you then get the same behaviour. This will point us to the cause hopefully.
    Do other EPTs work as expected?
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS |
    MVP | Downloads

  • Project creation date api

    Hi,
    Is there a way to get the date when a project is created throught TFS Api

    Hi Uday,      
    Thanks for your post.
    It seems the created date not stored in Project object in TFS API. To get team project created date automatically, you can query the date from
    [Tfs_DefaultCollection].[dbo].[tbl_projects]
    table>> [last_update]field use coding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Broadcasting to send an email per project dynamically ?

    Hi all,
    The requirement of the business is the following :
    We want to send in an automated way a report to all PM (Project Manager) managing project in which they are in charge of.
    Every PM will receive 1 email per project he is in charge of.
    In standard broadcaster, we have the option u201Cbroadcast data burstingu201D but it unables to do dynamically, that is to say we do not know in advance project manager name. Each time we want to test, we have to select le Project Manager name.
    Following are the steps :
    1. We have created a query (A) with the required results and Infoobject 0Project Manager (ZXRESP) in drilldown. We have added an info-object email-address as attribute to info-object 0Project Manager (ZXRESP)
    2. We have created a new setting of type bursting -.
    a. On tab 'Recipient Determination' ->'Characteristic for Recipient Determination ' use 'Filter Document by Characteristic Value ' and select '0Project Manager ' as Characteristic
    b. 'Attribute for Recipient Determination' - Infoobject-emailaddress and 'Attribute Value Is '-->E-Mail address
    3. In section 'Selection of the Characteristic Values ' we have chosen u201CBy Following Selectionu201D and have to select project manager name. We would like to avoid this step manually but use in automatically way
    If  the fact to choose 'By Control Query' and use a variant to provide the necessary parameter can accomplish the requirement ? Do you have any solution for that ? Thank you in advance.
    All help are welcomed.
    Regards,
    Kevdin

    Check this blog:
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/20d671c6-b377-2d10-7488-b75841c389a3
    Here we are creating a program and running it in background and that populates the values of the date variables.
    I think you can use the same to populate your varialbles.
    Please do close the thread if that answers your questions. Please help us keep the forums clean and open useful information only.
    For more information search on help.sap.com and you will get lots of material.
    Regards.
    Den

  • Burndown by Project & Release dates

    I have a scenario where we have multiple projects on the same team with the same team members and each project has a different release date. We would like to track the burndown for the work done per project and its release date to ensure we are on track
    for the release. Also we need to know the overall individual team member capacity across the projects to identify if resources can be shared and thus they all have to be under the same Team. Is there a way to have multiple burndowns in Visual Studio Online?
    We are using the Agile Project Management template. We previously achieved this by using pivot tables in Excel. But were hoping there is an easier way when using VSO so that we do not have to manage data separately in excel sheets.
    Here's my scenario:
    Sprint April
    Project 1 under Team A. Release Date say April 10 - Burndown 1
    Project 2 under Team A. Release Date say April 25 - Burndown 2
    Project 3 under Team A. Release Date say May 15 - Burndown 3
    What are my options here? Should I create multiple area paths and iteration paths? Have different team projects under the same collection? Please advise
    Thanks
    pooja dave

    There are multiple ways to get something in this direction. The simplest would be to create 3 teams, one for each project, and put all the work for each team in its own Area. Your actual team (the people) can still use the root team (which can be configured
    to show all the work) to plan their work across the different projects.
    If you want to see the work on the burndown, you can then simply open the team dashboard for each individual team (work area/project) to see the status of the work in progress for each project.
    You can also use the Team explorer integration into Excel to export all the data to a table that automatically updates when you hit refresh in Excel. That way you won't need to manage the data in 2 locations, just keep the data in TFS, and then use the Team
    tab in excel to update your report.
    Using different team project would also work, but makes it much harder for the team members to use the planning tools, there is no way in TFS to get a plan board or backlog view that goes across team projects.
    My blog: blog.jessehouwing.nl

  • Annual Provident Fund not coming as per projection.

    Hi,
    Annual provident fund is not calculated as per projection basis (Nominal Basis) whenever employee getting LWP.
    present calculation in the month of April : Actual Basic = 9000
    Basic(after 1 day LWP) 12% : 870012%= 1044-00
    Projection : current month PF + current month11 months= 1044+104411 =12528
    But it should be the current month PF + 12% on actual basic * remaining months: 1044+1080*11= 13012
    Please suggest me to resolve this issue.
    Thanks & regards,
    vv.

    hi,
    thanks for your reply.  /3f6 is coming as explained above.  But in another client (sand box) it is coming fine as per projection basis.
    it should be the 12% of annual  Basic amount. But annual basic is coming ok.
    Thanks & regards,
    VV

  • Project & WBS data

    Hi All,
    I have project & WBS data in my Datasource. I have checked using RSA3 for a Datasource, and i c that the Project and Wbs data appear exactly as the Table Data like
    For Ex: Refer this Record values for WBS and Project respectuvely.
    (WBS)P000254A1 and P000254(Project).
    But when i replicate this Datasource in BW,,these above said values change to (WBS)1463 and 316(Project)
    Y is this change involved when the Datasource in R.3 shows correct Data but while In BW it shows Something Else,,
    Please Help on this Issue.
    Thanks
    Point Are Assured..

    Hi Jr,
    Sorry for the delay In reply!!
    Im Checking the data in BI at PSA level.I just replicated the datasource then scheduled the infopak to DS to see it.
    The DS is a Zdatasource which is made thru a Ztable. The table & ZDS in R//3 contains correct P******(WBS) and P****(project) data's,,but y is it wrong in BI??
    Is there any conversion exits!!,,,Bcoz,project number starts vth P****** but earlier in my Ztable it was showing the same numerics which is as of now in BI,,So i checked on the SEttingsUserparameterthen Check on conversion exit Box,Then finally the Data gt changed to P********.So is there any technique like this in BI??
    Please help

  • SSRS - Oracle Stored procedure returns no data but does in SQL Developer Sudio

    HI there,
    Stored procedure returns no data when executed on the report but when i execute the stored procedure in Sql Developer it returns required rows.
    Thanks for your help!

    Hi Simon,
    When i test with simple query, i get the data.
    For your convenience, my stored proc looks lyk :
    PROCEDURE pr_REPORT_data(P_STARTDATE IN DATE, P_ENDDATE IN DATE, data_rows OUT T_CURSOR) AS 
    OPEN completed_Reinstatement FOR
      SELECT 
                 value1,.......value5
      FROM table1
    WHERE
        To_Date(createdDate, 'YYYY/MM/DD') BETWEEN To_Date(P_STARTDATE, 'YYY/MM/DD') AND To_Date(P_ENDDATE, 'YYYY/MM/DD');
    END pr_REPORT_data;          
    T_CURSOR is of type cursor which is declared on the package.
    I'm assuming the problem is with date parameters, however i converted the date before passing to
    WHERE clause. 

  • Can I create a Stored Procedure That access data from tables of another servers?

    I'm developing a procedure and within it I'm trying to access another server and make a select into a table that belongs to this another server. When I compile this procedure I have this error message: " PLS-00904: insufficient privilege to access object BC.CADPAP", where BC.CADPAP is the problematic table.
    How can I use more than one connection into an Oracle Stored Procedure?
    How I can access tables of a server from a Stored Procedure since the moment I'm already connected with another server?
    Can I create a Stored Procedure That access data from tables of another servers?

    You need to have a Database Link between two servers. Then you could do execute that statement without any problem. Try to create a database link with the help of
    CREATE DATABASE LINK command. Refer Document for further details

  • Error in Loading Project master Data into BW from R3

    Hi Experts,
    Actually I am trying to load Project Master Data from R3 to BW through a BW Process chain, Its a daily activity which we are performing since long time.
    But since last 2 days loading is getting failed with an error in ST22 in source system (R3):
    Runtime Errors         OBJECTS_OBJREF_NOT_ASSIGNED
    Exception              CX_SY_REF_IS_INITIAL
    Date and Time          27.09.2011 01:47:15
    Short text
         Access via 'NULL' object reference not possible.
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "CL_CGPL_TASK==================CP" had to be
          terminated because it has
         come across a statement that unfortunately cannot be executed.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not
         caught in
        procedure "PREPARE_FOR_RELOAD" "(METHOD)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        You attempted to use a 'NULL' object reference (points to 'nothing')
        access a component (variable: "ME->OUTLINE_PARENT").
        An object reference must point to an object (an instance of a class)
        before it can be used to access components.
        Either the reference was never set or it was set to 'NULL' using the
        CLEAR statement.
    I tried to reload the data but no help, I am not sure how to reolve this issue, I also contacted to BASIS even they are not aware of this error.
    I am seeking help from you guys.
    Please help to overcome this problem...!
    Thanks.

    it seems basis issue
    howver check below links
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/objects_objref_not_assigned-1793688
    OBJECTS_OBJREF_NOT_ASSIGNED error in a background execution
    thanks
    pathak

  • Vendor Evaluation Report as per the delivery date

    Dear Experts,
    Please guide how view reports for
    1. Varince of delivery date for goods recieved from the Vendor as per the delivery date in the PO.
    2. Variance of delivery date for goods recieved from the Vendor as per Standard Varinace %age defined in purchasing Value Key ?
    Regards,
    Vikas

    Hi Narendra,
    Thxs for quik response,
    I created Purchasing value key with Negative indicator like first reminder is -8.second is -4 and third is -2 and assigned the respetive material master and w r t material PO created.  When i am doing ME9F exceuting its showing error No suitable purchasing documents found,while i am exceucting  i select PO No,Purchase Org,application EF and message type MAHN but its shoing error ..kindly let me know how i can proceade.
    Please note, My client requirment is once PO delivery date falls with the reminder period its should remind vendor through mail,
    Regards
    Santosh

Maybe you are looking for