Incompatible default style names

Hello

Developing a plugin for InDesign CS5 and we using ActionScript (extension generator) to build the user interface.

On the side of ActionScript, the object

com.adobe.csawlib.indesign.InDesign.app.activeDocument.allObjectStyles

contains a named style

[Graphic basic block]

We would like to be able to get the UIDRef of this style on the side of the plugin. However, the following code:

GHS IStyleGroupHierarchy * = styleGroupMgr-> GetRootHierarchy();

UIDList styleList(::GetDataBase(styleGroupMgr));)

GHS-> GetDescendents (& styleList, IID_IOBJECTSTYLEINFO);

for (int itemIndex = 0; itemIndex < styleList.Length (); itemIndex ++) {}

UIDRef currentItemRef = styleList.GetRef (itemIndex);

ObjectStyleInfo InterfacePtr < IObjectStyleInfo > (currentItemRef, UseDefaultIID());

print objectStyleInfo-> GetName()

}

never print the name above. However, he finds a named style

[Normal chart block]

that is a problem, if we assume that a style is identified by its name.

Is our assumption regarding the unique name incorrect, or is this a bug? If our hypothesis is false, what is the right way to uniquely identify a style?

The initial default style names are localized.

In scripting, you can use the localizable names with a special prefix:

app.objectStyles.itemByName("$ID/[Normal Graphics Frame]") .name "

Result: [graphic basic block]

app.translateKeyString ("$ID / [Normal graphic block]")

Result: [graphic basic block]

app.findKeyStrings ("[basic graphic block]")

Result: $ID / [normal chart block]

Remember that the default style is a choice of the user (preferably) rather than these names to find the style of hard wiring.

On the plugin side, take a look at the getters UID of IStyleNameTable or IStyleGroupManager.

Dirk

Tags: InDesign

Similar Questions

  • Default user name and password on Stor.e Tv

    Hey,.

    I just bought a 2 TB stor.e TV set and switched all my files on it, I am trying to access the network and it asks me a username and password but I never put a!

    Do anyone knows the default user name and password OR do you know how I can create a?
    Also has there NEVER been an update of firmware for this thing?
    Best thing I can say, is that there has not been since 2010.

    Any help is greatly appreciated!

    Bravo guys,.
    John.

    To my knowledge the TV StorE is not secured with any passowords.
    I think you should try to Stor.E TV to factory default value.
    To do this, you must go to configuration-> General Setup-> default.
    But if it fails, and the store TV is not able to start, then this may be a malfunction of the equipment.

  • Default file name: Windows and scan Windows (Windows 7)

    How to change you the file name by default for a scan? I tried the method below:

    "To change the file name by default for a scanned document or photo, right click on the name of the file in the view of Scan and then click Rename."

    For me, this method only renames the current file and does not affect the value 'default'. Furthermore, is it possible to assign a unique number or the date (s) default file name? This is important when the follow-up documents.

    Thank you.

    That's what it's supposed to do, rename the current file.  There is no way to change the default name prior to his assignment to a digital file, however, I think that you can change the name before saving it.  No, there is no way to assign something unique default file name.

    HAL

    --

    HAL Hostetler, TCE

    Engineer senior/UPDATED--MS MVP-Print/Imaging - WA7BGX

    www.kvoa.com - KVOA television, Tucson, AZ.

    Live Hot Licks - www.badnewsbluesband.com

  • Cut and paste in Indesign style names

    Hello everyone, I'm new to this forum.

    I have a question about the cut and paste in Indesign: Let's say I have two documents.

    -In the first, I have several rules of paragraph style, let's say style1, style2, style3.

    -In the second document, I have exactly the same paragraph style (style1, style2, style3) names, but different formatting rules (for example in doc1 style1 is 13 times, the same style1 doc2 is Minion 11).

    What I want to do is to copy the text of document 1, the selected paragraph style name, but not the setting shaped styles. So when I did the copied text in document 2, can I get the text automatically style with rules of formatting of document 2.

    I can't find a way to do it: I cut & spent keeping the formatting, but not the names of the styles only.

    Did someone in the face of this problem or have a solution?

    Thanks in advance for your help.

    Hi everyone and thanks for your help.

    I finally found out why the cut & paste has not worked for me.

    The problem was that in doc1, I put all my styles in a folder, while in doc2 (take a guess!) No.

    That was the problem. Once I put in a folder with the same name as doc1 doc2 styles, everything worked magically.

    Thank you very much!

    Fabio

  • How can I return my default styles for simulation software?

    While trying to remove a custom style I have some successful how to remove the default styles provided with CS9 (even if I hit Cancel).  Now when I try to put in place the style for a software simulation settings I have all of the options and if I click on create new the software crash.  Same thing happens if I click on restore by default.  The software has been uninstalled and reinstalled, but I still have the issue.

    All styles (master slides and skin) are in a theme. What theme are you using? There is no "styles by default', each topic has its styles. Can you be more detailed? If you speak one of the themes included with Captivate, you work with those stored in the Layouts folder in the assets of e-learning in the Public (Windows) or shared documents (Mac). This file is a copy of the original file that you can find in the subfolder layouts in the gallery under the installation folder. You can return to define an original theme by copy/paste to this public folder that I pointed out. If you want to reset all of the original themes included with Captivate, you can also close Captivate, delete the Layouts folder in public documents (NOT in the gallery) and when you open copied CP a new folder will be created in the public documents with all of the original themes.

  • RoboHelp 2015 adapted HTML5: to topics can I assign a default style sheet?

    Hello

    Is there a way to define a stylesheet by default, when you create a topic in the default style sheet is already selected? One less thing to worry about.

    Thank you

    MDawn

    Create a topic and set the style sheet. It should be the case that when

    you create the following topic, it will use the same CSS. Not quite what you

    but there is no specific setting.

  • What is the default user name and password of the dynamically created edge NSX gateway?

    Hello

    I created a NAT device on request and as part of it, but an edge gateway. What is the default user name and password to connect to the edge device?

    Thank you

    Pankaj

    I do not know the password by default, but you can either define easily. Just go to the network security &--> NSX edges, select your edge, click actions and identification of Climate change information. You can also enable SSH from there.

  • Retrieves the paragraph formatting with style name

    All the

    kindly help me how to extract the name of definition with example.txt formatting:

    FOR EXAMPLE:

    Name of the style: "Body".

    Font = "15".

    head = "" 18"" "

    Aligh = "Left".

    etc...

    Concerning

    Hurix

    Change by Dave Saunders: something prevents the work answer button. I hope that this edition will reactivate it.

    Hi Hurix,

    Welcome.

    Please indicate the question as answered

    Add the properties you need by following the instructions in the 3rd line.

    Trevor

    // Export Specified Details of Documents ParagraphStyles By Trevor
    // http://forums.adobe.com/thread/1445961?tstart=0
    exportParagraphStyleDetails ("appliedFont pointSize spaceAfter spaceBefore"); // add property names separated by a space - The Style Name is included automatically
    // see http://jongware.mit.edu/idcs6js/pc_ParagraphStyle.html for a list of properties you can add
    
    function exportParagraphStyleDetails (props /* A string list of the desired properties */) {
        doc = app.activeDocument,
        ps = doc.paragraphStyles.everyItem().getElements().slice(0),
        l = ps.length,
        c = 0;
        props = props.replace(/\s+/g, " ").split(" ");
        pl = props.length;
            var styleDetails = [];
        while (l--) {
            var  myStyle = ps[l];
            styleDetails[c++] = "******************************************************************\rParagraph Style Name: " + myStyle.name + "\r******************************************************************"
            for (var n = 0; n < pl; n++) {
                styleDetails[c] = props[n] + ": " + myStyle[props[n]].toString();
                if (myStyle[props[n]].hasOwnProperty ("name")) styleDetails[c] = styleDetails[c].replace (/:.+/, ".name: " + myStyle[props[n]].name);
                c++;
            }
        styleDetails[c++] = "\r";
        }
    
        temp = new File (Folder (Folder.temp) + "/" + doc.name + " Paragraph Style Properties " + ("" + new Date).replace(/:/g,"\xB7").replace(/G\S+$/,"")+ ".txt");
        temp.encoding = "UTF-8";
        temp.lineFeed = ($.os[0]=="M") ? "Macintosh" :" Windows";
        temp.open('w');
        temp.write("\uFEFF" + styleDetails.join("\r"));
        temp.close();
        $.sleep(300);
        temp.execute();
    }
    
  • default login name

    I'm running on a server ESXi VIMA. I was talking with a colleague when I assigned the password and missed the default login name which I suppose was root.

    noob question, at the login prompt, which is the user name?

    The default user name is admin-vi.

    Chris

  • The combination of files with the same style name, different styles

    I'm writing a book and I saved every chapter in a separate file. I will now copy all of the pages in a single big file, basically. The problem is - and I would have thought about this before, I have used the same style names in each chapter, but made some settings for styles in the last chapters I want to apply to the previous chapters. If I combine these files in a new file, how can I make sure that the later styles are those that is used (IE, overwrite the previous styles with the same name). In other words, can I specify a 'master' style that overrides all "local" styles that are imported from a specific file (I'm not sure I used the master and local correctly, but I hope you know what I mean.)

    Also, just out of curiosity, if I wanted to keep these two styles that had the same name, is there a way to do it, too?

    Thanks in advance for any help!

    You prepare a book, use an Indesign 'book' of the to do!  This is exactly what you need, read all about it here.

  • Remove the paragraph style name space

    Hi all

    There is a space character at the end of my paragraph style name.

    How can we delete [space] after the end of the paragraph style name? I don't want to delete [space] if she came between paragraph style names.

    Please provide the js code.

    Thank you

    Tansk

    Please provide the js code.

    Oh sure, you hurry, right?

    You can not call the forum for all the subordinate tasks script? Please? In these six hours you were to twiddle their thumbs and nervously checking the forum every five minutes or so, you could do this by hand.

    Oh whatever:

    for (p=2; p		   
  • JS: Grep in the style names

    Dear all,

    Is there a way to gather and search under certain conditions paragraph styles? For example: paragraph Gather style names that start with the character 'H' in a table (as "H1", "H2", "Head", etc.).

    Kindly let me know the coding basis for it.

    Thanks in advance.

    concerning

    Lionel Messi

    Hey!

    It's really easy to get...

    myDoc var = app.activeDocument;
    var myStyles = myDoc.paragraphStyles;
    var foundStyles = Array();
    var searchString = String ("H"); You can enter more than one startng letter
    var tempName = String();
    for (i = 1; myStyles.length > i; i ++) {}
    tempName = myStyles [i] .name;
    If (tempName.substr (0, searchString.length) == searchString) {}
    foundStyles.push (tempName);
    }
    }

    List styles found
    var nameList = String ("/");
    for (i = 0; foundStyles.length > i; i ++) {}
    nameList += [i] foundStyles + ' / ';.
    }
    Alert (NameList);

    tomaxxi

  • Style inheritance custom default style

    I created a custom class that uses styles of Customs (i.e. underlineColor), I defined. I used the sample code to create a value of default style by the time classConstruct method.

    I noticed that the code example provided by adobe doesn't seem to work when you use a style tag to define only the part of the style parameter, I managed to fix the problem by checking each style setting in the construction and that those who if not existing.

    But I then hit another wall, this time the attempt use of style inheritance, according to the documents, the inherited styles are first of all check on the parent and then checked on the defined class styles, but I noticed that it doesn't seem to work, in fact if I use the classConstruct method to set the default values of style then inherited values are not used.

    I was wondering if anyone knows how to create styles with heritage values and how the method classConstruct is really used by default.

    Thank you

    Amy,

    Thanks for your help, the link you provided proves what I suspect me the class selector gets precedence on all other type selectors, witch means that if you use it to set values by default simple you break style inheritance system. It also means that the example provided by Adobe is totally false :( (I hope that someone from Adobe could confirm)

    Any ways I abandon it and tried something else, I don't know what this will do to the performance but it worked fine with legacy, what I did is to override the method value it will return values by default in the event that the super.getStyle method returns the value undefined.

  • HP Officejet Pro 8600 N911a: Default community names

    Hello could someody help me know if its possible to change the default community for all the printers?

    This is because it is considered as a vulnerability by CVE

    HP Color LaserJet CPImpresor. 3525

    HP Officejet Pro 8600 N911a

    Thank you very much

    I suspect that @jfba done refers to the SNMP community name, not the name of the printerto Windows .

    I have no idea if this can be changed on the Officejet Pro 8600 printers; LaserJet 400 Pro M475dn, the value can be changed via the Integrated Web server interface:

  • How to change the default directory names in Vista?

    I want to change my default directory:

    'C:\Documents and Settings\\My Documents' to 'C:\Documents and Settings\\My Documents.

    Hi kdukes1,

    There is no way to change the default directory of the user account name you mentioned since it is the design.

Maybe you are looking for