the number of object layer

How can I find the number of text objects on a layer applied style frame

var myDoc = app.activeDocument; 
var myLayer = myDoc.layers.item("Katman 1"); 
for (var i = 0; i < myDoc.allPageItems.length; i++) {
var myObj = myDoc.allPageItems[i];
if(myObj instanceof TextFrame && myObj.appliedObjectStyle == "tmc"){
var myCount = myLayer.pageItems.length; // ???   only "tmc" must count style
}
}
alert(myCount);

Hello

Try this...

var myDoc = app.activeDocument;
var myLayerObj = app.activeDocument.layers.item("Katman 1").allPageItems;
var myArray = new Array();

for (var i = 0; i < myLayerObj.length; i++) {
    var myObj = myLayerObj[i];
    if(myObj instanceof TextFrame &&  myObj.appliedObjectStyle.name == "tmc"){
        myArray.push(myObj);
    }
}
alert(myArray.length);

Concerning

Tags: InDesign

Similar Questions

  • See the number of object &amp; gravity...

    I created a dashboard by using the icon object County & gravity.  That means the number indicate? Received or active alerts?  I am attaching a jpeg file of what I see.

    Great!

    Please mark it as "answered".

    All the best,

    Brian Wheeldon

  • How to display the file size and the number of files in the folder

    I have a laptop and a desktop at home. When I open a folder on my laptop, my laptop display size (on the bottom right corner) and the number of objects (at the corner of bootom left hand) of this file the bottom of the window.  But I don't see this information on my desk. I tried to play with the Option - view folders... but always in vain.  Can I know what is the correct way of doing things?

    Hello cscs77, welcome.

    The option that you are referring to I think would be the bar of "Status". This gives a test:

    1. open 'My Documents '.
    2. at the top, click on view > status bar

    That should solve your problem. Let us know,

    Thank you! Ryan Thieman
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Read the dynamically created objects

    Hello

    I get my feet wet with development of Cascades, and I was hoping someone here could answer some questions I had.

    I am defining a container that contains a drop-down list and a zone of textfield and I need to repeat this containing three more times. I thought by using the ControlDelegate class to create three instances without writing the code three times. However, I don't know how I'd read the value of each instance of the drop-down list and the ControlDelegate textfield.

    Any Suggestions?

    If you instantiate the like this:

    Container {
        property variant control1
        property variant control2
        property variant control3
    
        id: rootContainer
        Label  {
            text: "Example Component Definition"
        }
        Button  {
            text: "Click to create dynamic component"
            onClicked :  {
                // Create the component and add it to the Container
                control1 = compDef.createObject();
                rootContainer.add(control1);
                control2 = compDef.createObject();
                rootContainer.add(control2);
                control3 = compDef.createObject();
                rootContainer.add(control3);
            }
        }
        attachedObjects: [
            ComponentDefinition {
                id: compDef
                textfield { id: text }
            }
        ]
    }
    

    Then components are accessible as control1.text, control2.text etc.

    If the number of objects is constant, then ControlDelegate might be more convenient.

    For ListView, you can use ArrayDataModel or GroupDataModel (for more complex models with sorting) and fill it with any type of data. Any kind of items can be added, it's just a picture of QVariantMaps. It is not necessarily Xml or SQL wrapper, but specialized models also exist for this. It is even possible to create a subclass of DataModel custom c++ to expose existing data objects.

  • How do you add a 3D object in a dynamic 3D object layer?

    Sorry if this is a duplicate. I asked this before, but it seems to have disappeared into the ether...

    I created a layer to smart object 3D with a Cup, handle, coffee and steam, all in the same scene. Later, I created a saucer, but I did it on a normal 3D layer, and not on the smart object layer. I can't understand how to move the saucer in the dynamic 3D object layer, so I can add it to the stage. Copy / paste does nothing and I can't merge the layers.

    Thank you!

    I don't know if you can.  You can double-click on of course on the layer to smart object to reopen the 3d layers in Photoshop add the 3d saucer layer then merge the layers 3d, restore their coordinated 3d object then positioning and resizing the parent to another. When record you the dynamic object works the original smart object layer file will be updated by Photoshop and now contain the saucer.

  • Number of objects - log miner scalability?

    We have been the consolidation of several departmental databases in a database of big CARS. In addition, in the databases of tests we are cloning of red blood cell tests (for example, an application schema is cloned 100 times so that our users can test independently of each other).

    Thus, our database of test meaning now have about 500,000 items in there. We have databases with objects more of 2 million in it.

    We use water courses. Currently, we use a local capture, but our architecture is designed to use downstream capture soon... We are concerned about the resources needed for the build log miner Dictionary data.

    We currently use not the DBMS_LOGMNR_D.build directly, but rather indirectly through the DBMS_STREAMS_ADM.add_table_rule. We want only to reproduce about 30 tables.

    We are surprised to discover that the log always minor build a dictionary of complete data for all objects in the database (tables, partitions, columns, users and so on).

    Apparently there is no way to create a dictionary of partial data, even directly using DBMS_LOGMNR_D.BUILD...

    More recently, it took over 2 hours just to build the log data dictionary of the minor on a busy system! And we ended with an error ORA-01280. So we did it again...

    We just increase our size of log redo recently. I did have the chance to test after the change. Our redo log was only 4 MB, it has increased to 64 MB to reduce the activity of control point. This will no doubt help...

    Everyone has met with slow log miner dictionary build?

    Any advice?

    Thanks in advance.

    Jocelyn

    Hi Jocelyn,

    In the middle of the stream, logminer dictionary is built using DBMS_CAPTURE_ADM. BUILD procedure. You should not use DBMS_LOGMNR_D.BUILD for that.

    In the middle of water courses, DBMS_STREAMS_ADM. ADD_TABLE_RULE will dump the dictionary only on the first time when you call it, given that the capture process has not yet been created and it will be created only when you call DBMS_STREAMS_ADM. ADD_TABLE_RULE and a dictionary dump as well. LogMiner dictionary will have the information about all objects such as tables, partitions, columns, users and etc... The dump of the dictionary will take time depends on the number of objects in the database because if the number of objects is very high in the database then the data dictionary itself will be great.

    The size of your recovery 64 MB and it's too small for a production system, you should consider having a size of log roll forward of at least 200M.

    You can have a complete using DBMS_CAPTURE_ADM logminer dictionary build. BUILD and then create a capture process using the FIRST_SCN returned by the BUILD procedure.

    Let me know if you have more doubts.

    Thank you
    Florent

  • How can I find number of objects in a layer?

    I have a document with hundreds of layers. I want to delete the specific purpose of layers. I iterate through all the layers, but I couldn't iterate over objects within a single layer to find that specific object.

    I there a way I can go through all objects in the layer?

    or

    How can I find number of objects in a layer?

    I'm going through the API documents but could not find.

    Here is the code I wrote,

    var artLayer = undefined;
            if(app.documents.length == 0)
            {
                app.documents.add();
            }
            var myDocument = app.activeDocument;
            var layerCount = myDocument.layers.length;
            
            
            for (var index = layerCount - 1; index >= 0; index-- ) 
            {
                var targetLayer = myDocument.layers[index];
                var layerName = new String( targetLayer.name );
                if(layerName == "Colorways")
                {
                    artLayer = myDocument.layers[index];
                   
                    //Can I iterate through objects in a layer??
    //                for(var newIndex = 0; newIndex < artLayer.items.length;newIndex++)
    //              {
    //                    Need something like this
    //                }
    
    
                    break;
                }
            }
    

    instead of points, you should use "pageItems.

    for (newIndex var = 0; newIndex)< artlayer.items.length;newindex++)="" there="" is="" no="" "items"="">

    for (newIndex var = 0; newIndex)<>

    or as in your second post, instead of the activeDocument, target your layer

    index

    index

  • size of the lowest lowest PSD document: dynamic object layer nef raw remains imperturbable?

    If we have a document psd with a smart object layer, a component of camera raw as. Enlarged the nave,

    and then we cut the size of the document to 50% for the archiving of the space, I noticed the camera raw

    element retains its number of pixels. So now if I enlarge document (X 2) to return to

    the original size, maintain the sharpness of the original image quality? In addition to the size of 1/2,

    is that what we can export the object layer dynamics .nef to an enlarged image?

    The NEF file embeeded in the parent document is not affected by resizing the parent - you can still export it, and it still retains its full quality.

  • Basic conditional script based on the number of lines in a text layer?

    Just received help here to write a conditional script by using the font size of a text layer. Thank you all for this.

    The next hurdle is a conditional script using the number of lines in a text layer in the differential. Far as I can tell it not the layer details which specify the number of lines. Just '\r' for a return in the idTxt descriptor. Nothing seems to stand for a soft return as far as I can tell. I'll probably have to be able to count the lines with soft and hard returns.

    Any thoughts?

    I was playing around with this a bit and here is a small script to determine the number of rows. This is based on the self in the head, that I calculated to environ.108 times the size of the font.

    #target photoshop
    app.preferences.rulerUnits = Units.POINTS;
    var doc = activeDocument
    var tL = doc.activeLayer
    var h = tL.bounds[3]-tL.bounds[1]
    var per = ((h/5)-(tL.textItem.size))/tL.textItem.size
    var num = h/(tL.textItem.size *1.108)
    
    alert(Math.round( num))
    
  • get the number of layer of selectedLayers array

    I have "app.project.activeItem.selectedLayers", which returns an arbitrary collection of layers of the model. It can be layer 2, 5, 6 etc in the chronology of the model. However in my collection of selectedLayers they are referenced by index IE. 0,1,2 or 3. Is there a method to get the number of layers in the comp? for example, if selectedLayers [0] refers to the layer 2 How can I access the layer number.

    I think that's what you hear:

    app.project.activeItem.selectedLayers [0] .index

    Dan

  • OGG-01028 object with the number of the object 80673 is compressed. Compression of the table is not supported.

    (1) I received an email like this:

    Event_alert

    2013-09-17 22:00:16 ERROR OGG - 01028 Oracle GoldenGate Capture for Oracle, ext_1.prm: object with the number of the object 80673 is compressed. Compression of the table is not supported.

    2013-09-17 22:00:16 ERROR OGG - 01668 Oracle GoldenGate Capture for Oracle, ext_1.prm: PROCESS ABENDING.

    (2) I have not found the OBJ

    SQL > select OBJECT_ID, OBJECT_NAME from dba_objects where object_id = 80673;

    no selected line

    (3) change a few times the process EXT recover;

    (4) my excerpt settings

    Cat ext_1.prm

    EXTRACT ext_1

    Ogg, ogg PASSWORD USERID

    TRANLOGOPTIONS EXCLUDEUSER ogg

    SETENV (NLS_LANG = AMERICAN_AMERICA. ZHS16GBK)

    -SETENV (NLS_LANG = AMERICAN_AMERICA. AL32UTF8)

    EXTTRAIL ./dirdat/t1

    DYNAMICRESOLUTION

    TABLE YBK.*;

    This is a bug that has been fixed

    Excerpt from abending with Table of Compression is not supported, even if the database has no tables compressed. (Doc ID 1510691.1)

    event text: Oracle GoldenGate Capture for Oracle, ext_1.prm: object with the number of the object 86173 is compressed. Compression of the table is not supported.

    tableexclude *. DBMS_TABCOMP_TEMP *.

  • Expression to determine the number of effects on a layer?

    Hello

    I'm writing an expression that takes into account the number of effects has a of the layers.  In a perfect world, it would be nice to get a count of only some effects (ex: how many Slider controls are applied)... but I prefer to start at base and make my way up to that (if we can do it at all).


    So... did someone done something like this before / is it possible?

    ~ pemling

    Oh, and I use (as of today, at least) the most recent version of the AE: 13.2.0.49

    I think this will give you the number of effects:

    numEffects = thisComp.layer ("Layer 1")("Effects").numProperties;

    Getting the number of controls Slider might be difficult, if they have been renamed year is no longer "Cursor" in the name.

    Dan

  • How to determine the number of pixels of an object in a digital photograph?

    Hello world. I want to determine the number of pixels in an object that is part of a digital photo. I use cameras to film of ice pieces, breaking with tide glaciers or ice cliffs. I want to know the size of the ice segment that capture my digital photos. I know that the width and height of the cliff of ice in metres already, so I thought that I could convert the equivalent of 1 pixel:? m is really what I want to do. This way, whenever I see a block of ice, breakup, I can pull up the photo, describe the piece, calculate how many pixels to fill the area of ice removed by piece break and convert into zone meters 2 - giving me my order of size. If anyone has any ideas on how to do really, I would appreciate it thanks so much community. I thought Photoshop or Fireworks might help me with this, Ricky

    Make your selection

    Select the histogram tab, and then click the symbol at the top right.

    Choose expanded view

    See this:

  • Unable to update the number of lines in the physical layer... connection failed in OBIEE 11 g

    Hi guys,.

    I am not able to make the number of rows updated in the physical layer, I get an error message failed to connect. It comes to OBIEE 11 g Linux approx.

    I put the tnsnames.ora file in the following path:

    / * / pkgs/linux/intel/OBIEE_DIT/MW_HOME/Oracle_BI1/network/admin /.

    I have no admin under

    / * / pkgs/linux/intel/OBIEE_DIT/MW_HOME/oracle_common/network /.

    But if I enter all TNS in Data Source name, I am able to connect:

    (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = xxx.xxx.com) (PORT = 1671)) (CONNECT_DATA = (SERVICE_NAME = US1OBIEE)))

    I am not able to understand the question...

    Thank you

    Amit

    It seems that the RPD is looking for local tns config... try to use as hostname: port / ServiceName

    It should work, just in case where does not! stop to do so since it is question.

    If brand aid

  • To apply the edges of the poster to a smart object layer, but the filters Gallery is greyed out?

    Work a Photoshop tutorial on an image.  I want to apply the edges of the poster to a smart object layer, but the filters Gallery is greyed out.  Gallery of filters is also grayed out for all other layers in this project.  (PhotoShop CC)

    Hi filter Gallery,

    Please, click on the tab of the image above and choose 16-bit/channel to 8 bits/channel mode.

    Then check if the filters Gallery is always grayed out.

    Please post on the Adobe Forums.

Maybe you are looking for