Get total number of comps that are used in the opened project?

Hi everyone!
Does anyone know how i can get the total number of comps in the project-panel or the total number of comps that are used in the opened project?
This is what i have so far, however it's not exactly what I am looking for:
for (var i = 1; i <= app.project.numItems; i++) {
    if (app.project.item(i) instanceof CompItem) {
        alert(i);
JesB

You can get the total number of comps with pretty much what you have
var numComps = 0;
for (var i = 1; i <= app.project.numItems; i++) {
    if (app.project.item(i) instanceof CompItem) {
        numComps++;
You could look at the usedIn attribute of each comp to see how many comps appear in other comps, but that won't identify your top-level comp. I'm not sure how you would do that unless you just bump the count by 1:
var numUsedComps = 0;
var numComps = 0;
for (var i = 1; i <= app.project.numItems; i++) {
    if (app.project.item(i) instanceof CompItem){
        numComps++;
        if (app.project.item(i).usedIn.length > 0) {
            numUsedComps++;
if (numComps > 0) numUsedComps++;
alert("number of comps = " + numComps + "\rnumber of used comps = " + numUsedComps);
Dan

Similar Messages

  • How do I get files from multiple DVDs that are using thesame file names?

    How do I get files from multiple DVDs that are using thesame file names? Message says "file already exists in catalog"
    Message was edited by: marcr56

    marcr56
    I am viewing your question from different perspective, that is, the issue that you face when you are ripping VOBs from a second DVD-VIDEO on DVD disc using Premiere Elements,
    It is best to give the Premiere Elements version and computer operating system that it is running on. In the absence of that, I will generalize.
    Assuming that you are using
    Premiere Elements 12
    Add Media
    "DVD Camera or Computer Drive"
    Video Importer
    Typically the Video Importer Save In: is C:\Users\Owner\Videos
    Each of your DVD discs is going to have the same names for the ripped VOBs (VTS_01_1.VOB and so on depending on the duration of the movie). Consequently, after the ripping of the first DVD's VOBs and their save to Videos, you will end up with that "files already existing..." block for the ripping of the VOBs from the second DVD.
    The answer is, for each DVD disc VOB ripping, to plan ahead and create and set for different folders in Videos in the Save In field of the Video Importer.
    Please review and then let us know if that works for you. Please do not hesitate to ask if you need clarification on anything that I have written.
    Thank you.
    ATR.

  • To get all the objects that are used inside the class

    Hi All,
    All i wanna know is to get all the objects that are used inside the class.
    Ex :
    Class A{
    Emp e;
    public add(Dept d){
    e.deptid = d.deptId;
    in this class i have two objects, one Emp obj and another Dept object.
    I wanna get the details abt this class Emp and Dept by simply parsing the file and by not loading this class in JVM.
    Could any pls hel me out.??
    thx.

    I wanna get the details abt this class Emp and Dept
    by simply parsing the file and by not loading this
    class in JVM.Your problem statement is vague and the constraint is IMO hypothetical.

  • Editing a movie that was already cut together without transcoding .h264 footage to proresslt. I want to transcode full clips that are used in the edit, but not any of the leftovers.

    Editing a movie that was already cut together without transcoding .h264 footage to proresslt. I want to transcode full clips that are used in the edit, but not any of the leftovers. Is there an efficient way to this?
    I'm thinking I can convert the files with Compressor and place them in a new folder with their original file names (not sure how to get compressor to do this yet) and then do a major "Reconnect Clip" afterwards.
    Not sure if there's a more efficient way to get all the clips in the timeline to compressor. I want the full files, not a sequence export. I can go through one clip and a time and add the master file. I'd rather not.
    The more automated processes the better.
    Thank you. I'm currently working so I don't have the time to scour the forums. Help or links to help would be greatly appreciated.
    B

    yeah Media reconnect can be an issue.
    Will Media Manager convert files? Another thing I was thinking was to Media Manage the sequence out, copying all the used files to a new folder, and then running that through compressor. But it still leads to a massive reconnect. Fine tuning all those edits would be less involved than re-editing the whole thing, I hope.

  • Where can I find the Tables script that are used in the Documentation

    Hello All,
    Where can I find the Tables script that are used in the Documentation, Like Sales, Customers, employee, department.......
    Appreciate any Help
    Thanks & Regards
    Madhu K

    10g
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14198/scripts.htm#sthref77
    9i
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96539/scripts.htm#4216

  • The files/project listed below are linked to the open projects may require exporting

    Guys, I'm having this error "$ not a valid integer".
    I have five modules..all in .exe format. 3 of these modules are working fine with the links, 2 modules are not..
    I have 1 .exe as a menu, when I publish this slied..it would say "the files/project listed below are linked to the open projects may require exporting"
    3  modules are having this
    [title.htm,title.swf or title.exe}
    and the remaining 2 are having the full address of the file "c:\documents and settings\ so on and so on"
    what can't be like the 3 modules? I used the same procedure, what could be the problem?

    oopps..this is ok already..done with the updates. thanks

  • How to identify clips in finder that are used in the timeline?

    Heya, this is my first post to this forum and an issue ive been struggeling with for a while...
    i am trying to archive my footage and reduce the amount of HDD space old projects are taking up. I have LOADS of footage i'm never going to use again saved in folders that i want to easily identify and get rid of. Is there any way in premier pro to 'tag' files that have been used in the timeline or even the project and then i can simply go and delete those that aren't. Similar to the feature in after effects that removes unused clips from the project (though that still leaves them on the drive).
    this would also make transcoding the correct files much easier as i currently have to identify each one individually by using the show in finder option...
    some help on this would be much appreciated
    I'm using CS5 on a macbook to edit canon DSLR footage, is there any more information that you guys need?
    Cheers
    Rich

    In the Project Panel, click the flyout menu; that's the little stack o' pancakes thing in the upper right corner of the panel. Select "Metadata Display." In the search box, type "usage"--this will reveal the Video Usage and Audio Usage metadata labels. Check those to add them, and hit OK; they'll now be added to the columns in the Project Panel. Now, you can sort on those columns to filter by usage--the unused clips won't have a number associated with that column. Select them all, and if you really want to purge them from the drive, hit Ctrl/Cmd+Delete--that will remove the media from the drive.
    If you just want to get rid of the clips, Project > Remove Unused will do that.

  • Is it possible to get a 3g iPhone for $200? "used" on the open market?

    After I called to check i could get an iPhone for $200 like 4 times, I sold my blackberry last night and went into the store today to buy one but apparently I am not "eligble" to get an iPhone for 200 and they want double.
    I'm not paying that price, A) because I cant afford it, and B) I was told I was eligible but they dont care (obviously)
    So is it possible for me to find a "used" but new, 3g iPhone for aroudn $200?
    If they always go for 300-500 on the open market, I'm not going to waste my time and just switch carriers.
    please tell me that i can.
    Thanks guys.
    This is really disappointing.
    Message was edited by: PsychedelicWonders

    PsychedelicWonders,
    Anybody selling an iPhone 3G that is carrier locked to AT&T is probably going to be asking for at least somewhere around $400.
    Even if they live in a state that has overturned the Early Termination Fee, if you cancel in the first month or so you may still have to payback the subsidy that AT&T paid toward the cost if you don't return the phone. If you cancel after the first month or so, you will still have to pay the activation fee / first bill, and Early Termination Fee in most cases. That is going to add up.
    Hope this helps,
    Nathan C.

  • Why do SQL sample programs work when there is no entry for the data sources in the ODBC Data Source Administrator that are used by the sample program?

    Hi,
    I am trying to understand how to access an SQL database from CVI.  
    I don't understand how the sample programs shipped with the toolkit can access the database they use if it is not listed in the ODBC Data Source Administrator.
    In the code, I see the line:
    hdbc = DBConnect ("DSN=CVI SQL Samples");
    However, there is not an entry that I can find in the ODBC Administrator for "CVI SQL Samples."
    The SQL help suggests there should be a User DSN named, "CVI32_Samples", but I don't see that entry in the ODBC Administrator on my win-7 system.
    I believe the sample program is accessing a database file named, "C:\Users\Public\Documents\National Instruments\CVI\Samples\sql\samples.mdb".
    Exactly how is the call to DBConnect() translated to the file, "samples.MDB", if there is no entry in the ODBC Administrator?
    Regards,
    Mark 

    I figured it out.  There is a 32 bit ODBC administrator and a 64 bit ODBC administrator.  The ODBC administrator I run through the control panel is the 64 bit ODBC administrator. To access the 32 bit administrator I need to run, "C:\Windows\SysWOW64\odbcad32.exe".
    I am running the samples in 32 bit mode, so I need to use the 32 bit ODBC administrator.
    Best,
    Mark

  • Will X-rays that are used in the airport kill my ipod?

    Yup, the subject is my question. So will it kill my ipod? Or it is safe?

    I am a frequent traveller and bring my iPod all the time and I have never had any problems. Never heard of any problems from others.

  • SQ02 InfoSet Get Count of Total Number of Records that will be processed

    I am developing a query (SQ01) and am currently working on building an InfoSet (SQ02). 
    The Infoset was set up using a 'Direct read of table'.  Next, I'm adding some various fields and then going to Extras and trying to define some code to get the total number of records that my query will be processing.  I'm not sure if SAP pulls a filtered result set into a temporary table (by default - if so how could I reference it?) that I can reference or is just pulling in a row at a time in the record processing code, but my question is in regards to getting a record count of how many records are returned in my result set PRIOR TO going through all of the records.
    Overall, I'd like to be able to have a field that says Record X of Y.  I can get the X part for each line, but cannot get 'Y' until the very end.  Any help or ideas would be much appreciated.  I've looked around a bunch, but haven't found anything like what I'm requesting.
    Query Output would look something like:
    Record X1 of Y | Title1 | Amount1
    Record X2 of Y | Title2 | Amount2

    Hi Subin,
         I have tossed around this idea in my head, but am trying to figure out how to get the values and selection options from the query screen to incorporate into my Select statement within my infoset.  The problem I'm running into is that my user enters a group of account numbers and an ending date that has to be pulled from the SQ01 query screen to the SQ02 infoset code.  I've looked around for examples on pulling the data from the query screen, but have been unsuccessful thus far.  Say for instance I have 15 specific accounts that the user is entering in and they want any records that have been submitted prior to the end of the current month and the start of the business year.
         On my query screen they would enter in something like
    Business Year:  2011
    Reporting End Date:  <= 31.03.2011 (Which equates to all records between 01.01.2011 AND 31.03.2011)
    Account #s:  0000, 0001, 0003, 0005, ..., 9999  (These are a variable amount of accounts entered and could include options such as not equal to or even between ranges etc)
    In my START-OF-SELECTION code I would need a select like:
    NOTE:  This is just a pseudo code format, not checked for syntax here
    SELECT count(*)
    FROM TABLE
    WHERE BusinessYear = '2011' AND
        RecordDate Between 01.01.2011 AND 31.03.2011 AND
        Accounts IN (0000, 0001, 0003, 0005, ..., 9999).
    So In this select I need to reference the values in the SQ01.  How would I reference the account #'s and whether or not the user has entered an account number and said Not Equal on it etc.  This select statement would have to be built on the fly, since it's not guaranteed to be the same for each run.
    Thanks,
    Mark

  • HT4410 I have just installed Windows 7 64-bit full version Home Premium using Bootcamp and cannot get access to the internet. I installed on a Macbook Air Mid 2012 with Mountain Lion. Are there some drivers that are missing from the Windows 7

    Dear Apple. I have just installed Windows 7 64-bit full version Home Premium using Bootcamp and cannot get access to the internet. I installed on a Macbook Air Mid 2012 with Mountain Lion. Are there some drivers that are missing from the Windows 7 bootcamp install download from Apple

    It is a Total Misconception that the Support files are installed when you are installing Windows, even if the USB drive that holds them is inserted in the system when doing the Windows install.
    You must always Run the Setup.exe files from the support files or run the drivers individually once Windows has finished installing and booted to the desktop.
    Also you really need to run the Boot Camp Control Panel Applet and check for updates as not all the newest drivers for full function of all the hardware is included with the original support download. That download is basically a generic version to get the system working and without doing the updates not everything will work properly.

  • I recently purchased the newest nano. I have 3 other nano's and iPad   iPhone, oh and iPod touch. When I plug in nano to my mac I get the message "iPod cannot update because it contains files that are used by another application. How can manage this?

    I recently purchased the newest nano. I have 3 other nano's and iPad   iPhone, oh and iPod touch. When I plug in nano to my mac I get the message "iPod cannot update because it contains files that are used by another application. How can manage this?

    dedonred wrote:
    "iPod cannot update because it contains files that are used by another application.
    It means that nano was used on a third-party software or synced from different computer to sync music. Does that nano show in iTunes? If yes, then restore completely. If not, then you may need to head to Apple Store and see what they can do.

  • How to get total number of nodes in a JTree?

    Hi,
    I am trying to get total number of nodes in a JTree, and cannot find a way to do it.
    The current getRowCount() method returns the number of rows that are currently being displayed.
    Is there a way to do this or I am missing something?
    thanks,

    How many nodes does this tree have?
    import java.awt.EventQueue;
    import javax.swing.*;
    import javax.swing.event.TreeModelListener;
    import javax.swing.tree.*;
    public class BigTree {
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable() {
                public void run() {
                    TreeModel model = new TreeModel() {
                        private String node = "Node!";
                        @Override
                        public void valueForPathChanged(TreePath path,
                                Object newValue) {
                            // not mutable
                        @Override
                        public void removeTreeModelListener(TreeModelListener l) {
                            // not mutable
                        @Override
                        public boolean isLeaf(Object node) {
                            return false;
                        @Override
                        public Object getRoot() {
                            return node;
                        @Override
                        public int getIndexOfChild(Object parent, Object child) {
                            return child == node ? 0 : -1;
                        @Override
                        public int getChildCount(Object parent) {
                            return 1;
                        @Override
                        public Object getChild(Object parent, int index) {
                            return node;
                        @Override
                        public void addTreeModelListener(TreeModelListener l) {
                            // not mutable
                    JFrame frame = new JFrame("Test");
                    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
                    frame.getContentPane().add(new JScrollPane(new JTree(model)));
                    frame.pack();
                    frame.setLocationRelativeTo(null);
                    frame.setVisible(true);
    }But for bounded tree model using DefaultMutableTreeNode look at bread/depth/preorder enumeration methods to walk the entire tree. Or look at the source code for those and adapt them to work with the TreeModel interface.

  • How to get total number of licenses

    Hi everyone,
    Who knows how to get the total number of licenses, I am using SBO 2005 PL07+VB.Net. from SDK help file I saw there is a SAP Business One License API, but I cann't find this API from object browse, who knows which file contents the license API.
    Thanks in advance!
    Kathy

    Hi Kathy,
    Since (un-?)fortunately the license server has been moved from DCOM to CORBA, this information is currently obsolete (I still hope we will get this information through the SDK some time in future...).
    As an interim solution you will have to get this information from the B1LicenseFile.txt file through some small application you write (you could have e.g. a service that writes the information you are interested in into some table in some database - and retrieve this information through a SQL statement).
    HTH,
    Frank

Maybe you are looking for

  • Perl problem? Run postflight script

    Yesterday my USB mobile internet aircard wouldn't mount in OS X (10.5.6). I spent hours on the phone with the ISP's tech support, and they ultimately had me download and reinstall the software. When I attempted to install that software, it failed wit

  • Computer wont recognize any cd I put in it.

    I have a M55-S3293 and the computer will not recognize any cd, Why? [email protected] pljames

  • Searching mails in TM backup on TC

    Hi everyone, here's a very weird problem I never encountered before. When searching for mails in a Time Machine backup on a Time Capsule there are no results. I can use the +space interface+ and see/restore mails without a problem. In Finder I see th

  • Error playing movie on slow connection

    I get the following error when I load a movie with slow connection: Cannot read property 'symbolData' of undefined I've managed to find the cause: Movie_edgeActions.js file is invoked with autonomous function as soon as it loads. Unfortunately, the M

  • Lost Sound After an update

    i have lost the sound , except with headphones, after new automatic update from HP.  My model is HP Pavilion dv7 notebook PC Windows 7 Home premium The message error is ''Windows Media Player encountered a problem while playing the file.''