Creation of a Dimension by ODI

I can help with the creation of an OLAP dimension with Oracle Data Integrator. And what knowledge modules are used
I appreciate any guidance and help on this topic.
Thanks in advance

LKM Oracle to Oracle (DBLINK)
IKM Oracle Slowly Changing Dimension
Source and Target is DB ORACLE but in different machines
I hope you help me with this problem.
Thanks

Similar Messages

  • How to .... create a hierarchical dimension in ODI?

    What are the steps to create a hierarchical dimension in ODI? For example: Employee dimension with 3 levels: L1, L2, L3 (will include SID, ID, ...)
    Any suggestions are appreciated !

    Hi,
    Specify your PROJECT CODE while calling the variable.
    In your case
    ArchiveFolder variable =#<YOUR_PROJECT_CODE>.RootFolder\Archive
    If RootFolder variable is a GLOBAL variable then
    ArchiveFolder variable =#GLOBAL.RootFolder\Archive
    Thanks,
    Sutirtha

  • Populating the time dimension in ODI

    I need to populate my time dimension in ODI> I read a solution in this forum suggesting to create a time table/view in the source schema, reverse it in ODI and then use it as source to populate the time dimension. Is there another way to do this? One way I thought of was to use the ORDERDATE field in my ORDER table (my source table in Oracle) and map it to my time dimension in SQL Server via an interface. But I also have DUEDATE, SHIPDATE and PAYDATE fields in my ORDERS table and this approach would mean that I have to map them through separate interfaces to the time dimension as well. I have created a procedure in the source schema(Oracle) and want to use it in ODI to populate the time dimension. But I amnt sure if that is possible in ODI. Could anyone help me with this please?
    Regards,
    Neel

    Hi Neelab,
    Sorry for my delay to reply you, I had no time the lasts days...
    To get the four distinct key from your time dimension, just add four instance of dimension table at interface each one joined with one of the columns.
    I believe that you load your time dimension from some other table than PRJ_TBL_TRANSACTION because you have the HolidayType column in your time dimension...
    A view is one possible solution to load the time table but depends how the performance of the query is.
    A way to do it at ODI is:
    - Create 4 interfaces, one for each column, to load 1 singe table with 1 single date column, don't worry about duplicated value at this time, than you can just use the "IKM Control Append" that has more performance but check the "Distinct" box (flow tab) at each interface
    - Create a last interface from this temp table as source, to the time dimension target table. Now you will use the "IKM Incremental Update" and do choose the "Update" option to "NO". Check the "Distinct" box.
    As this table will have no more than 6.200 records from the last 20 years it will be a small table where you shouldn't have performance problems.
    These are some of possible solutions but I would like to add other "way to think".
    By the table that you show here you have a simple time table with no special feature, for that, let me suggest you other way.
    - in the current way you will join but didn't get the record that "fail" from the join once they will be exclude if a date do not exist at time dimension
    My suggestion:
    - Load the dimension time table from your source table
    - as PK in time dimension table, use the ''Julian Day"
    - At ODI target fact table (datastore), create a 4 reference constraints (one by column) to the time dimension
    - at interface do not use the dimension as source and transform the 4 date to Julian and let the 4 constraints take care if they exists or not at dimension table.
    OR
    - Look for the minimum "possible" date at your company
    - populate your time dimension with every each day since then until a future date (Dec 31, for instance)
    - create a process to populate the future date that will be execute in a interval that you decide (once a year, once a month, as you wish) dependent on how further the date is populated
    - use the "Julian date" as PK
    - At interface just transform any date to "Julian Date" it will be at dimension time once it is naturally unique
    You could substitute the Julian date for "YYYYMMDD" that is a unique value too.
    I presented you 2 way to consider be considered, each one could be used based on how important is for the business know if a date was loaded or not.
    Someone can question that has the dates loaded from source against has all dates previous loaded could help to find errors from days that wasn’t loaded but it has a failure. As there are 4 dates source columns (and we are talking just about one source table until now) if a date loaded math a date when the load failure there is no value in use the time dimension date to analyze this possibility.
    I defend the full time dimension load.
    Make sense and/or help you??

  • Error while loading the dimension through ODI

    Hi ALl,
    Here iam facing the different error,actually , i migrated all the cubes from dev server to integration server,and again i loaded and saved my rulefiles wen i loaded dimension its loading perfetly , so wen we arre loading the dimension through ODI package , but its all are fine for dev server we are getting the problem::::
    "Cannot build dimension. Analytic Server Error(1007083): Dimension build failed. There are many possible causes (for example, problem allocating memory). Check the server log file and the dimension build error file to locate the error that caused the failure..""
    then i tried in essbase , now its giving error cannot open object in the arbor path .otn file
    its not opening the .otn file, can any one help , it would be appriciated..
    Thanks

    The .otn file is created when essbase is restructuring and once completed renamed to otl, if it does not complete it can leave the .otn file.
    You should be able to delete the otn (maybe stop the application first) and open the outline.
    I would also check the logs generated from ODI and also the essbase app logs to troubleshoot the issue.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Error while Loading Entity Dimension through ODI

    Hi,
    When I tried to load the outline for Entity dimension onto the Planning (11.1.1.0) through ODI, I'm getting the following error:
    7000 : null : java.sql.SQLException: Invalid COL ALIAS "STORAGE C2_DATA_STORAGE" for column "DATA"
    java.sql.SQLException: Invalid COL ALIAS "STORAGE C2_DATA_STORAGE" for column "DATA"
         at com.sunopsis.jdbc.driver.file.bb.b(bb.java)
         at com.sunopsis.jdbc.driver.file.bb.a(bb.java)
         at com.sunopsis.jdbc.driver.file.w.e(w.java)
         at com.sunopsis.jdbc.driver.file.w.executeQuery(w.java)
         at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.h.y(h.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Kindly help.
    -Jitendra

    Hi,
    Send over the models/interface and I will have a look.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Cannot buil Essbase Dimension With ODI

    Hi all,
    i've a problem with an ODI interface to load Metada into Essbase.
    I must load the account dimension the table contains 4 information:
    Parent
    Child
    Alias
    Data Storage.
    I need to load some elements as Dynamic Calc and so I've added the column Data Storage wich contains 'X' For Dynamic Calc elements and 'S' for the other bottom level elements that are Store, but these buttom level elements must be shared member in the same dimension under another hierachy.
    The error that i've received from interface after the execution is:
    unknown source (error -1) cannot build dimension.
    Can somenone help me on this?
    Thanks
    Best Regards
    E. G.

    Hi John,
    i have once more the same problem.
    I send you the script description of the interface:
    from com.hyperion.odi.common import ODIConstants
    from com.hyperion.odi.connection import HypAppConnectionFactory
    from java.lang import Class
    from java.lang import Boolean
    from java.sql import *
    from java.util import HashMap
    # Get the select statement on the staging area:
    sql= """select C1_PARENTNAME "ParentName",C2_MEMBERNAME "MemberName",C3_ALIAS "Alias",C4_DATASTORAGE "DataStorage" from "C$_0Measures" where      (1=1) """
    srcCx = odiRef.getJDBCConnection("SRC")
    stmt = srcCx.createStatement()
    srcFetchSize=30
    stmt.setFetchSize(srcFetchSize)
    rs = stmt.executeQuery(sql)
    #load the data
    stats = pWriter.loadData(rs)
    #close the database result set, connection
    rs.close()
    stmt.close()
    Is it helpful for you?
    Next week i'll send you my source and the outline file.
    Today i've some VPN conncection problem and so i can not send you all the information.
    Thank you very much for your help.
    Regards
    E. G.

  • Loading Essbase Members for [ Accounts ] Dimension in ODI 11.1.1.3 ?

    Hi
    My source is Oracle Database tables and Target is Essbase Members of Dimension ('Accounts') i m trying to load Data to Accounts member (Employee Rate) When i perform Reverse Engineering I am only able to view Dimensions not is members. So in my interface i am not able to perform mapping cause Members are not showing up.
    Problem Example:
    1- Essbase Dimensions and Members
    Accounts <--------------- Dimension
    | Employee Rate <---------- Members
    | Headcount
    | Over Time Rate1
    | Employee Salary
    Currency <--------------- Dimension
    Entity <--------------- Dimension
    Period <--------------- Dimension
    2- IN ODi After Reverse Engineering when i drag and drop to Target i only see Dimension Properties NOT members
    Example: Parent, Two Pass Calculation
    but my goal is to insert data into Memember (Employee Rate) of Accounts Dimension
    So i am not able to see Members of Accounts Dimesion so i cant perform mapping with my source table.
    Looing for your help.
    Regards

    Hi John,
    Yes you are right, that was issue.
    Now How i am going to get sub Members: what should be format.
    Accounts Dimension ----> Dimension
    |
    Employee Rate -----> Member
    |
    Over Time1 ------> Sub Member of "Employee Rate"
    |
    Shift Rate ---->Sub member of "Over Time1"
    I am having above hierarchy than what should be Format that i have to put in:
    DATA_COLUMN_DIMENSION = ??
    DATA_COLUMN_MEMBERS = ????
    Thank u john, you are always helping.
    Regards
    Sher
    Edited by: Sher Ullah Baig on Jul 5, 2012 12:27 PM

  • Exporting Essbase Dimensions using ODI (specifically attribute)

    I am working on creating a flat file using ODI connected to an Essbase database. I have set up my topology correctly and have been able to export the dimension into a .txt file succesfully. My issue I am having is when I try to include an attribute dimension associated with the main dimension (in this case, organization). I get the following failure:
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 89, in ?
    com.hyperion.odi.essbase.ODIEssbaseException: The source column [ServiceByAUTypeAttribute] is not valid for dimension [Organization]
    I went to the specific line, but see nothing out of the ordinary. The column is a valid attribute dimension for Organization.

    It means you have not set a staging area for your on columns on the target datastore, as you are using essbase in your interface you will need a staging area, essbase as a technology has no SQL capabilities.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Needed urgent help for user creation in security manager in ODI 11g

    Hi Gurus,
    I have an urgent requirement in ODI security manager and i am completely helpless. We need specific steps for the user creation with sufficient priviledges. The detailed requirements are:
    1. There is a group of users under the framework team and these users should be able to edit the Knowledge modules only. All other objects (e.g. projects, interface, procedures or development related objects) should only be in read only mode for them.
    2. There is a group of users under the development team. The priviledges of these users should be mutually exclusive to that of the framework team users. i.e. the development team should be able to edit or delete all development related objects (e.g. projects, interface, proc etc.) but the knowledge modules should only be in read only mode for them.
    Now I will explain what i have tried out:
    I am working on ODI 11.1.1.5.
    I have created a user with NG DESIGNER and CONNECT profile. Dragged and dropped all the projects on the user and selected all methods in all repositories (check sign). However when i connect with that user i cannot open the KMs (as far as development team is concerned its fine) but i can also not open interfaces as well as procedures (which is not acceptable from development point of view).
    Also when i tried creating a user from the framework team point of view i could not see any option related to KMs (To give edit priviledge).
    Please help me out guys. I have also searched oracle documentation and believe me the security manager section is not very good. If you guys can help me out with specific steps it would be great (I have tried the hints given in oracle documentation and they dont work, the ODI security manager behaves strangely :-(
    Thanks in advance,
    SB

    Similar requirement here guys. Any pointers. I was able to achieve this by restricting development user from supervisor access. In that case the development user can not edit the interfaces. Any known defefct?

  • Automatic creation of new dimension members

    Hello all,
    Bit of a long post so please bear with me.
    I am about to embark on only my third BPC project after having spent several years implementing solutions using BusinessObjects Planning (formerly SRC software), and am still struggling to come up with an elegant solution to the fact that I cannot save data to dimension elements unless they are already explicitly defined in the dimension member list (presumably due to cube architecture).
    Those of you who have used BOP/SRC will remember this as unvalidated dimensions.
    I find having to first go to admin and pre create members before being able to use an input schedule to save data against them is very restrictive.
    I'm hoping one of you guys can help me improve on the workaround I currently use.
    For example I have a 'bid submission' input schedule that is used by the user to submit bids for increased budget, capital or revenue, capturing basic costs and commentary. The user selects a bid number from a combo box which is populated by using an EVLST formula to read in pre created dimension members. I have to save a flag to the db which I then use to exclude already used numbers when feeding the combo box on future submissions.
    Which works ok but if I have a hierarchy on bid number based on say, cost centre, how do I get around the fact that number ranges have to be pre-assigned to cost centre, Cost Centre A = 1 to 1000, Cost Centre B = 1001 to 2000 etc. What happens if I go over the 1000 on Cost centre A? I then get non contiguous ranges per cost centre.
    Is it possible for the bid number to be dictated by the user when they start to fill in the bid submission? Or give the impression that they are?
    Or if the client has a bid number format that cannot be pre created? Eg incorporating things like year or person etc. This information could be save separately but not within the bid number. Is it possible to save data to dimension property columns from an input schedule?
    Hope you guys can help
    Many thanks
    Phil

    Philip,
    few questions.
    Which versio of BPC.
    What is your data Source
    there are few post on the below link you may find helpful
    Please list your Question in short with the tings you want.
    Re: AdminTask_MakeDim.dts
    Thanks

  • Creation of New Dimensions

    Dear
    I want to create new dimensions as I have only ASGRUN and ASGPTO_YTD in the balance dimension form
    Secondly I want to store running balances of an element value start from employee joining date to end of service.
    Thanks

    what is your legislation?
    If there exists a localisation for your legislation, then you should have more then 2 balance dimensions.
    If there is no localization, creating one (from ZZ) should you also give more then 2 dimensions. (see ML 261452.1)
    So i'm surprised you do not have the ASGITD (Inception to date, which accumulates run results from the hire date on).
    There is also a standard concurrent program to add extra dimensions, but i would first try to understand why the seeded ASGITD is not there.

  • File datastore creation problem from window installed ODI in AIX server

    HI all,
    My question is how to represent file folder name of that server
    my file folder in AIX server and i want to access that file in window s machine.
    * is this the right way to represent the data folder in physical schema declaration
    file:///<aix server IP>/usr/oracledi/oracldi/data

    HI Julien,
    It's really working ..........
    Thanx a lot
    For other people it will be helpfull info
    Only change that I have made for that task are
    1. I have created an new agent for that AIX machine
    2. I have updated the ODIPARAM.bat
    3. I have changed record separator as UNIX while creating data store for that file
    4. While executing particular interface ,I have used the agent which is local to AIX machine ..................
    Steps for execution:
    At the time of designing you must have local copy of that file so that you can perform your mapping once it's executing well wid your local or no agent .
    then come to the Topology manager change the location for that folder in physical schema declaration of that file server of AIX machine.
    Now execute the same wid ur AIX agent u have created earlier..............
    while U have changed the data store location from local directory to other AIX directory don't try to reverse the same otherwise u'll get "Execution query failed "or file not found kinda error as because odi system system searching local systems file.................
    Julien can u provide me ur mail Id so that I can contact U for further assistance ofcourse
    if u want................
    regards
    palash

  • Mapping multiple columns of a table to single dimension using odi

    Hi John,
    Can we map multiple columns of a table to a single dimnesion?
    For example, in RDBMS, for the employee details, Grade position etc will be in different columns, and in Planning these would be as members of one dimension.
    So while loading data from oracle to essbase can we map these multiple columns to single dimension?
    If yes how?

    Hi,
    In your staging area/target you can concatentate the columns.
    So in your interface and on your target datastore, pick the column which is going to hold the details of the concatenation.
    Then in the expression editor use the CONCAT function, or you could use ||
    eg CONCAT(<sourceCol1>, <sourceCol2>)
    or <sourceCol1> || <sourceCol2>
    obviously you need to change the information between <sourceCol1> to your source datastore column
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Application creation Wizard period dimension

    The wizard creates the period dimention with 12 months, 4 quarters and the Year Total. Can I delete the 4 quarters? What is the impact?

    Hi,
    You should be able to delete the quarters no problem, it will remove the quarters and leave the months as children of Year Total.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Want to get placed images Dimension and Creation Date in Catalog

    Below is the script which is free with CS4. Is there anybody who can modify this script in a way which provide the creation date and dimension of the images in image catalog.
    //ImageCatalog.jsx
    //An InDesign C4 JavaScript
    @@@BUILDINFO@@@ "ImageCatalog.jsx" 2.0.0 5-December-2007
    //Creates an image catalog from the graphic files in a selected folder.
    //Each file can be labeled with the file name, and the labels are placed on
    //a separate layer and formatted using a paragraph style ("label") you can
    //modify to change the appearance of the labels.
    //For more information on InDesign scripting, go to http://www.adobe.com/products/indesign/scripting/index.html
    //Or visit the InDesign Scripting User to User forum at http://www.adobeforums.com .
    //The myExtensions array contains the extensions of the graphic file types you want
    //to include in the catalog. You can remove extensions from or add extensions to this list.
    //myExtensions is a global. Mac OS users should also look at the file types in the myFileFilter function.
    main();
    function main(){
    var myFilteredFiles;
    //Make certain that user interaction (display of dialogs, etc.) is turned on.
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
    myExtensions = [".jpg", ".jpeg", ".eps", ".ps", ".pdf", ".tif", ".tiff", ".gif", ".psd", ".ai"]
    //Display the folder browser.
    var myFolder = Folder.selectDialog("Select the folder containing the images", "");
    //Get the path to the folder containing the files you want to place.
    if(myFolder != null){
       if(File.fs == "Macintosh"){
        myFilteredFiles = myMacOSFileFilter(myFolder);
       else{
        myFilteredFiles = myWinOSFileFilter(myFolder);
       if(myFilteredFiles.length != 0){
         myDisplayDialog(myFilteredFiles, myFolder);
         alert("Done!");
    //Windows version of the file filter.
    function myWinOSFileFilter(myFolder){
    var myFiles = new Array;
    var myFilteredFiles = new Array;
    for(myExtensionCounter = 0; myExtensionCounter < myExtensions.length; myExtensionCounter++){
      myExtension = myExtensions[myExtensionCounter];
            myFiles = myFolder.getFiles("*"+ myExtension);
      if(myFiles.length != 0){
       for(var myFileCounter = 0; myFileCounter < myFiles.length; myFileCounter++){
        myFilteredFiles.push(myFiles[myFileCounter]);
    return myFilteredFiles;
    function myMacOSFileFilter(myFolder){
    var myFilteredFiles = myFolder.getFiles(myFileFilter);
    return myFilteredFiles;
    //Mac OS version of file filter
    //Have to provide a separate version because not all Mac OS users use file extensions
    //and/or file extensions are sometimes hidden by the Finder.
    function myFileFilter(myFile){
    var myFileType = myFile.type;
    switch (myFileType){
      case "JPEG":
      case "EPSF":
      case "PICT":
      case "TIFF":
      case "8BPS":
      case "GIFf":
      case "PDF ":
       return true;
       break;
      default:
      for(var myCounter = 0; myCounter<myExtensions.length; myCounter++){
       var myExtension = myExtensions[myCounter]; 
       if(myFile.name.indexOf(myExtension)>-1){
        return true;
        break;  
    return false;
    function myDisplayDialog(myFiles, myFolder){
    var myLabelWidth = 112;
    var myStyleNames = myGetParagraphStyleNames(app);
    var myLayerNames = ["Layer 1", "Labels"];
    var myDialog = app.dialogs.add({name:"Image Catalog"});
    with(myDialog.dialogColumns.add()){
      with(dialogRows.add()){
       staticTexts.add({staticLabel:"Information:"});
      with(borderPanels.add()){
       with(dialogColumns.add()){
        with(dialogRows.add()){
         staticTexts.add({staticLabel:"Source Folder:", minWidth:myLabelWidth});
         staticTexts.add({staticLabel:myFolder.path + "/" + myFolder.name});
        with(dialogRows.add()){
         staticTexts.add({staticLabel:"Number of Images:", minWidth:myLabelWidth});
         staticTexts.add({staticLabel:myFiles.length + ""});
      with(dialogRows.add()){
        staticTexts.add({staticLabel:"Options:"});
      with(borderPanels.add()){
       with(dialogColumns.add()){
        with(dialogRows.add()){
         staticTexts.add({staticLabel:"Number of Rows:", minWidth:myLabelWidth});
         var myNumberOfRowsField = integerEditboxes.add({editValue:3});
        with(dialogRows.add()){
         staticTexts.add({staticLabel:"Number of Columns:", minWidth:myLabelWidth});
         var myNumberOfColumnsField = integerEditboxes.add({editValue:3});
        with(dialogRows.add()){
         staticTexts.add({staticLabel:"Horizontal Offset:", minWidth:myLabelWidth});
         var myHorizontalOffsetField = measurementEditboxes.add({editValue:12, editUnits:MeasurementUnits.points});
        with(dialogRows.add()){
         staticTexts.add({staticLabel:"Vertical Offset:", minWidth:myLabelWidth});
         var myVerticalOffsetField = measurementEditboxes.add({editValue:24, editUnits:MeasurementUnits.points});
        with (dialogRows.add()){
         with(dialogColumns.add()){
          staticTexts.add({staticLabel:"Fitting:", minWidth:myLabelWidth});
         with(dialogColumns.add()){
          var myFitProportionalCheckbox = checkboxControls.add({staticLabel:"Proportional", checkedState:true});
          var myFitCenterContentCheckbox = checkboxControls.add({staticLabel:"Center Content", checkedState:true});
          var myFitFrameToContentCheckbox = checkboxControls.add({staticLabel:"Frame to Content", checkedState:true});
        with(dialogRows.add()){
          var myRemoveEmptyFramesCheckbox = checkboxControls.add({staticLabel:"Remove Empty Frames:", checkedState:true});
      with(dialogRows.add()){
        staticTexts.add({staticLabel:""});
      var myLabelsGroup = enablingGroups.add({staticLabel:"Labels", checkedState:true});
      with (myLabelsGroup){
       with(dialogColumns.add()){
        //Label type
        with(dialogRows.add()){
         with(dialogColumns.add()){
          staticTexts.add({staticLabel:"Label Type:", minWidth:myLabelWidth});
         with(dialogColumns.add()){
          var myLabelTypeDropdown = dropdowns.add({stringList:["File name", "File path", "XMP description", "XMP author"], selectedIndex:0});
        //Text frame height
        with(dialogRows.add()){
         with(dialogColumns.add()){
          staticTexts.add({staticLabel:"Label Height:", minWidth:myLabelWidth});
         with(dialogColumns.add()){
          var myLabelHeightField = measurementEditboxes.add({editValue:24, editUnits:MeasurementUnits.points});
        //Text frame offset
        with(dialogRows.add()){
         with(dialogColumns.add()){
          staticTexts.add({staticLabel:"Label Offset:", minWidth:myLabelWidth});
         with(dialogColumns.add()){
          var myLabelOffsetField = measurementEditboxes.add({editValue:0, editUnits:MeasurementUnits.points});
        //Style to apply
        with(dialogRows.add()){
         with(dialogColumns.add()){
          staticTexts.add({staticLabel:"Label Style:", minWidth:myLabelWidth});
         with(dialogColumns.add()){
          var myLabelStyleDropdown = dropdowns.add({stringList:myStyleNames, selectedIndex:0});
        //Layer
        with(dialogRows.add()){
         with(dialogColumns.add()){
          staticTexts.add({staticLabel:"Layer:", minWidth:myLabelWidth});
         with(dialogColumns.add()){
          var myLayerDropdown = dropdowns.add({stringList:myLayerNames, selectedIndex:0});
            var myResult = myDialog.show();
            if(myResult == true){
       var myNumberOfRows = myNumberOfRowsField.editValue;
       var myNumberOfColumns = myNumberOfColumnsField.editValue;
       var myRemoveEmptyFrames = myRemoveEmptyFramesCheckbox.checkedState;
       var myFitProportional = myFitProportionalCheckbox.checkedState;
       var myFitCenterContent = myFitCenterContentCheckbox.checkedState;
       var myFitFrameToContent = myFitFrameToContentCheckbox.checkedState;
       var myHorizontalOffset = myHorizontalOffsetField.editValue;
       var myVerticalOffset = myVerticalOffsetField.editValue;
       var myMakeLabels = myLabelsGroup.checkedState;
       var myLabelType = myLabelTypeDropdown.selectedIndex;
       var myLabelHeight = myLabelHeightField.editValue;
       var myLabelOffset = myLabelOffsetField.editValue;
       var myLabelStyle = myStyleNames[myLabelStyleDropdown.selectedIndex];
       var myLayerName = myLayerNames[myLayerDropdown.selectedIndex];
       myDialog.destroy();
       myMakeImageCatalog(myFiles, myNumberOfRows, myNumberOfColumns, myRemoveEmptyFrames, myFitProportional, myFitCenterContent, myFitFrameToContent, myHorizontalOffset, myVerticalOffset, myMakeLabels, myLabelType, myLabelHeight, myLabelOffset, myLabelStyle,  myLayerName);
      else{
       myDialog.destroy();
    function myGetParagraphStyleNames(myDocument){
    var myStyleNames = new Array;
    var myAddLabelStyle = true;
    for(var myCounter = 0; myCounter < myDocument.paragraphStyles.length; myCounter++){
      myStyleNames.push(myDocument.paragraphStyles.item(myCounter).name);
      if (myDocument.paragraphStyles.item(myCounter).name == "Labels"){
       myAddLabelStyle = false;
    if(myAddLabelStyle == true){
      myStyleNames.push("Labels");
    return myStyleNames;
    function myMakeImageCatalog(myFiles, myNumberOfRows, myNumberOfColumns, myRemoveEmptyFrames, myFitProportional, myFitCenterContent, myFitFrameToContent, myHorizontalOffset, myVerticalOffset, myMakeLabels, myLabelType, myLabelHeight, myLabelOffset, myLabelStyle,  myLayerName){
    var myPage, myFile, myCounter, myX1, myY1, myX2, myY2, myRectangle, myLabelStyle, myLabelLayer;
    var myParagraphStyle, myError;
    var myFramesPerPage = myNumberOfRows * myNumberOfColumns; 
    var myDocument = app.documents.add();
    myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;
    myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;
    var myDocumentPreferences = myDocument.documentPreferences; 
    var myNumberOfFrames = myFiles.length;
    var myNumberOfPages = Math.round(myNumberOfFrames / myFramesPerPage);
    if ((myNumberOfPages * myFramesPerPage) < myNumberOfFrames){ 
      myNumberOfPages++;
    //If myMakeLabels is true, then add the label style and layer if they do not already exist.
    if(myMakeLabels == true){
      try{
       myLabelLayer = myDocument.layers.item(myLayerName);
       //if the layer does not exist, trying to get the layer name will cause an error.
       myLabelLayer.name;
      catch (myError){
       myLabelLayer = myDocument.layers.add({name:myLayerName});
      //If the paragraph style does not exist, create it.
      try{
       myParagraphStyle = myDocument.paragraphStyles.item(myLabelStyle);
       myParagraphStyle.name;
      catch(myError){
       myDocument.paragraphStyles.add({name:myLabelStyle});
    myDocumentPreferences.pagesPerDocument = myNumberOfPages; 
    myDocumentPreferences.facingPages = false; 
    var myPage = myDocument.pages.item(0); 
    var myMarginPreferences = myPage.marginPreferences;
    var myLeftMargin = myMarginPreferences.left; 
    var myTopMargin = myMarginPreferences.top; 
    var myRightMargin = myMarginPreferences.right; 
    var myBottomMargin = myMarginPreferences.bottom; 
    var myLiveWidth = (myDocumentPreferences.pageWidth - (myLeftMargin + myRightMargin)) + myHorizontalOffset
    var myLiveHeight = myDocumentPreferences.pageHeight - (myTopMargin + myBottomMargin)
    var myColumnWidth = myLiveWidth / myNumberOfColumns
    var myFrameWidth = myColumnWidth - myHorizontalOffset
    var myRowHeight = (myLiveHeight / myNumberOfRows)
    var myFrameHeight = myRowHeight - myVerticalOffset
    var myPages = myDocument.pages;
    // Construct the frames in reverse order. Don't laugh--this will 
    // save us time later (when we place the graphics). 
    for (myCounter = myDocument.pages.length-1; myCounter >= 0; myCounter--){ 
      myPage = myPages.item(myCounter);
      for (var myRowCounter = myNumberOfRows; myRowCounter >= 1; myRowCounter--){ 
       myY1 = myTopMargin + (myRowHeight * (myRowCounter-1));
       myY2 = myY1 + myFrameHeight;
       for (var myColumnCounter = myNumberOfColumns; myColumnCounter >= 1; myColumnCounter--){ 
        myX1 = myLeftMargin + (myColumnWidth * (myColumnCounter-1));
        myX2 = myX1 + myFrameWidth;
        myRectangle = myPage.rectangles.add(myDocument.layers.item(-1), undefined, undefined, {geometricBounds:[myY1, myX1, myY2, myX2], strokeWeight:0, strokeColor:myDocument.swatches.item("None")}); 
    // Because we constructed the frames in reverse order, rectangle 1 
    // is the first rectangle on page 1, so we can simply iterate through 
    // the rectangles, placing a file in each one in turn. myFiles = myFolder.Files; 
    for (myCounter = 0; myCounter < myNumberOfFrames; myCounter++){ 
      myFile = myFiles[myCounter]; 
      myRectangle = myDocument.rectangles.item(myCounter);
      myRectangle.place(File(myFile));
      myRectangle.label = myFile.fsName.toString();
      //Apply fitting options as specified.
      if(myFitProportional){
       myRectangle.fit(FitOptions.proportionally);
      if(myFitCenterContent){
       myRectangle.fit(FitOptions.centerContent);
      if(myFitFrameToContent){
       myRectangle.fit(FitOptions.frameToContent);
      //Add the label, if necessary.
      if(myMakeLabels == true){
       myAddLabel(myRectangle, myLabelType, myLabelHeight, myLabelOffset, myLabelStyle, myLayerName);
    if (myRemoveEmptyFrames == 1){ 
      for (var myCounter = myDocument.rectangles.length-1; myCounter >= 0;myCounter--){ 
       if (myDocument.rectangles.item(myCounter).contentType == ContentType.unassigned){
        myDocument.rectangles.item(myCounter).remove();
       else{
        //As soon as you encounter a rectangle with content, exit the loop.
        break;
    //Function that adds the label.
    function myAddLabel(myFrame, myLabelType, myLabelHeight, myLabelOffset, myLabelStyleName, myLayerName){
    var myDocument = app.documents.item(0);
    var myLabel;
    var myLabelStyle = myDocument.paragraphStyles.item(myLabelStyleName);
    var myLabelLayer = myDocument.layers.item(myLayerName);
    var myLink =myFrame.graphics.item(0).itemLink;
    //Label type defines the text that goes in the label.
    switch(myLabelType){
      //File name
      case 0:
       myLabel = myLink.name;
       break;
      //File path
      case 1:
       myLabel = myLink.filePath;
       break;
      //XMP description
      case 2:
       try{
        myLabel = myLink.linkXmp.description;
        if(myLabel.replace(/^\s*$/gi, "")==""){
         throw myError;
       catch(myError){
        myLabel = "No description available.";
       break;
      //XMP author
      case 3:
       try{
        myLabel = myLink.linkXmp.author
        if(myLabel.replace(/^\s*$/gi, "")==""){
         throw myError;
       catch(myError){
        myLabel = "No author available.";
       break;
    var myX1 = myFrame.geometricBounds[1];
    var myY1 = myFrame.geometricBounds[2] + myLabelOffset;
    var myX2 = myFrame.geometricBounds[3];
    var myY2 = myY1 + myLabelHeight;
    var myTextFrame = myFrame.parent.textFrames.add(myLabelLayer, undefined, undefined,{geometricBounds:[myY1, myX1, myY2, myX2], contents:myLabel});
    myTextFrame.textFramePreferences.firstBaselineOffset = FirstBaseline.leadingOffset;
    myTextFrame.parentStory.texts.item(0).appliedParagraphStyle = myLabelStyle;   

    "Scripting Forum Conduct
    While this forum is a great place to get scripting help, it's also very easy to misuse it. Before using this forum, please read this post!"

Maybe you are looking for