Sample a color and add to swatch

This is proably very simple, but I'm just not getting it. I want to add a color from a photo into my swatches. I hit the eyedropper and click on the color. I then go to a new swatch - and it's white. I click on the color again, and nothing. What am I doing wrong?

Make sure the dropper is empty—it points to left and is white and not pointing to the right and half black. If it's half balck hold down your Option key:
The color gets added to the Color panel not the Swatches panel. You can drag it into the Swatches:

Similar Messages

  • Custom color-palette keeps becoming read-only and will not let me add new swatches

    I need to make a custom colour palette for work that i can open on different adobe programs, share with others and add new swatches to as I go. I create a custom palette, save it a custom name but whenever I re-open it, it has become a read-only palette and I can no longer add custom swatches to it. How do I get around this problem if I need to keep adding colours to my custom palettes?
    Thanks

    In case you need to keep swatches from the ASE:
    create a new document
    empty the swatches panel
    add all the swatches from the ASE into that document's swatches panel
    add new colors as swatches
    from the swatches panel's menu select "save library"
    Also see the manual on creating swatches.

  • How do I change the color of font in a fillable form in Adobe Reader? How can I check if the writer of the document has given permission to edit color and not just add text?

    How do I change the color of font in a fillable form in Adobe Reader? How can I check if the writer of the document has given permission to edit color and not just add text? Please help! I'm technologically challenged.

    Most forms (99% or more) are created for simple text input, where you cannot change anything.
    The creator of the form could allow Rich Text input (which allows you to change font, text size, color, etc.), but frankly I have never seen such a form, and I wouldn't know how they look.  But I'm sure they would show some kind of controls to alter the text appearance.

  • PS CC - I have a B/W background which I flattened - Then, change to RGB and add an RGB color graphic - print out makes background a greenish color - Can't figure out how to adjust.

    PS CC - I have a B/W background which I flattened - Then, change to RGB and add an RGB color graphic - print out makes background a greenish color - Can't figure out how to adjust.
    Thanks,
    Dave

    If the grayscale looks ok on screen, you are probably not setting up your print correctly. What OS? What printer?

  • Sampling HSL Color in 3D vector scope and matching in color wheel

    I am attempting to match two clips together. I have already adjusted luma and rgb values with the still shot comparison. I would now like to sample a color in the still shot get those values and then attempt to secondary grade with the HSL values. Now what's confusing me is that when I look at the sampled hue values (3d vectorscope set to HSL) they are like 217.7, 218.3, 218.8 etc. How do I match those hue values on the main color wheels when the hue values on the color wheel can only be adjusted from .00 to 1?

    Yikes. That is a difficult one (for me at least). Luckily I have not had to work much with issues like that.
    I had one project that was shot in a desert on two different days under different cloud conditions. What a pain. I have much less hair now. So I can kind of understand what you are going through.
    I guess depending on the shot, if the sky is unobstructed, it might just be quicker to composite in a new sky and then try to match up the rest of the shot via the secondaries in Color. Of course if you do that, then you get into more than likely having to do a reconform to replace the clip with the clip that has the new sky.
    I'm not as seasoned as others on here, maybe they can provide better suggestions than me.
    Good luck!
    P.S. I would be interested in knowing what you solution ends up being.

  • What' s different between color and swatches?

    what' s different between color and swatches?

    1.What's different between OWB9i and Discorver4i?
    OWB9i is a tool used to create data marts or data warehouses. You would use it to create the ETT Extraction, Transformation,
    and Transfer or Load (ETL). Discoverer is a reporting tool.
    2.Discorver4i is ROLAP or MOLAP or HOLAP
    Discoverer 4i is a ROLAP tool. Relational OLAP.
    Christopher
    www.iloveapple.com

  • Products(Page 3) and Add/Modify Products(Page 6) of Sample Application

    I would like to create Products(Page 3) and Add/Modify Products(Page 6) of Sample Application .
    I would like to get manual/ instruction/ with complete documents.
    Thanks in advance.

    hope this will help:
    http://www.oracle.com/technology/products/database/application_express/pdf/2.2.1_advanced_tutorials.pdf

  • Sample a color from gradient

    Hi guys,
    1 - How do i sample a color from a gradient in a text? Here is the sample
    http://www.pixentral.com/show.php?picture=1TDDZ2kv0TRFDgJ1nNqSVQm25lapV
    I keep getting a white circle, like the color is not there. I put a gradient in a circle following this tutorial,
    http://vectips.com/tutorials/quick-tutorial-adding-gradients-to-text/
    maybe is ok to place the gradient inside the text but then i cannot sample color. How can i do it?
    2 - How can i make a beautiful gradient/layer effect like this logo?
    http://www.pixentral.com/show.php?picture=17CZROx3OiS23A8jq2WVsfXkY88RHr
    Thanks for any info!
    Cheers,
    S.-

    And another way is to simply create a normal blend from 2 rectangles, with your choice of start and end colors from your swatches. The same ones you used in your gradient. This creates a color ramp with as many complimentary blends as you need. In my illustration I used 25.
    Now, choose Menu -> Object -> Expand, say OK to the dialog. You can now use the Eyedropper tool to select the colors you would like to add to your swatches. Move the blend outside of the Artboard for future use, or delete it when finished.
    TIP:  if you want only a certain subset of colors, ungroup the blend after expanding it, choose the colors you want (or all), and then in the swatches pallette, from the top right drop down menu, choose "Add Selected Colors".
    Menu -> Object -> Blend Options: choose your steps, then choose Menu -> Object -> Blend -> Make, or Cmd-Alt-B/Ctr-Alt-B
    SORRY -- The graphic should say "25 Steps"... I changed it, which you can too, by going back to the Blend Options dialog. Check Preview to see what you're doing, and actually fit the blend directly under your chosen dot over the "i".
    Message was edited by: DocPixel-BMW

  • [JS CS3] Can't add a swatch to some documents

    Hello,
    I have the following script:
    var myDoc = app.activeDocument;
    colorIt(myDoc, "lime",cmykRatios =[40,0,80,0]);
    function colorIt(docRef,colorName,cmykRatios){
        docRef.colors.add({colorValue:cmykRatios, colorModel:ColorModel.process, colorSpace:ColorSpace.cmyk,name:colorName});
        }//end colorIt
    For some documents this script works as it should. But for others I get the error message in ESTK "An incorrect number of color values was given."
    The error message is telling me that I cannot add CMYK swatches. If I change the colorSpace to ColorSpace.rgb and have only three values in the array cmykRatios, then the script works in the document that before would not accept it.
    But then trying to add an RGB swatch to the documents that previously accepted the new CMYK swatch gives me the very same error message:  "An incorrect number of color values was given."
    Obviously there is some difference between these documents but I cannot see one. Why would one ID file accept CMYK colors but not RGB colors and vice versa? Any clues as to what might be wrong here?
    Thanks,
    Tom

    Hey Tom!
    I just tested your script, and it's working fine on new documents. Then, I created swatch with same name but in RGB space, and received same error. Are you sure that you don't have swatch with same name already in document? But, on the other side, why would it work after you change script to RGB. I added one row into your script, so you can test it.
    var myDoc = app.activeDocument;
    colorIt(myDoc, "lime",cmykRatios =[40,0,80,0]);
    function colorIt(docRef,colorName,cmykRatios){
        if(app.activeDocument.swatches.itemByName(colorName).isValid != true){
            docRef.colors.add({colorValue:cmykRatios, colorModel:ColorModel.process, colorSpace:ColorSpace.cmyk,name:colorName});
    tomaxxi
    http://indisnip.wordpress.com/

  • Coloring a Font with a RGB etc. without adding the color to the document swatches.

    Is there a way of coloring a font with a RGB, Lab or CMYK color without adding the color to the document swatches.
    The only way I know is to add a color to the swatches or use one that already exists.
    like
       app.selection[0].characters[0].fillColor=document.colors.add({colorValue: [255, 53, 160], space: ColorSpace.RGB});}
    This has the undesired effect of cluttering up the swatches when using a lot of colors.
    any ideas?

    Good Morning Uwe!
    After 3am by me 2am by you
    I had tried the link and it did download but I have cs5 cs6 and cc but not cs5.5 and all the scripts worked on them may because of the file conversion.
    So it looks like the following summary is all correct
    All documents new contain
    Swatches (Black, Registration, Paper and None) the index order will be the order that the swatches appear in the swatches panel
    And colors in an alphabetical index order
    named color "A" first "Z" last and then the unnamed colors.
    A such all new documents colors[-1] will be an unnamed color which we can duplicated to produce other unnamed colors taking note that the duplication must be process and not spot colors.
    So far so good, (not for long )
    Unnamed colors are not read only so if we make a positive effort to remove them we can do that.
    while (app.activeDocument.colors[-1].name == "") app.activeDocument.colors[-1].remove()
    We now won't have any unnamed swatches to duplicate and will have to resort to John's tagged text file method in 3 above.
    If there were no unnamed swatches and we try to duplicate colors[-1] and it was a color like "Yellow" then it seem's to crash indesign.
    Anyway the below method should always work (for regular non tint etc. type colors).
    // optimized for easy of use but not efficiency !!!
    var doc = app.documents.add();
    var p = doc.pages[0];
    p.textFrames.add({contents: "RGB", geometricBounds: ["0mm", "0mm", "30mm", "30mm"], fillColor: addUnnamedColor([0, 0,255])}); // will be a RGB
    p.textFrames.add({contents: "RGB", geometricBounds: ["0mm", "30mm", "30mm", "60mm"], fillColor: addUnnamedColor([0, 255,0], 1666336578)}); // will be a RGB because of value
    p.textFrames.add({contents: "RGB", geometricBounds: ["0mm", "60mm", "30mm", "90mm"], fillColor: addUnnamedColor([65, 50, 102], ColorSpace.RGB)}); // will be a RGB
    p.textFrames.add({contents: "RGB", geometricBounds: ["0mm", "90mm", "30mm", "120mm"], fillColor: addUnnamedColor([84, 90,40],"r")}); // will be a RGB
    p.textFrames.add({contents: "RGB", geometricBounds: ["0mm", "120mm", "30mm", "150mm"], fillColor: addUnnamedColor([232, 0, 128],1)}); // will be a RGB
    p.textFrames.add({contents: "Lab", geometricBounds: ["30mm", "0mm", "60mm", "30mm"], fillColor: addUnnamedColor([29.5, 67.5, -112])}); // will be a Lab because of -
    p.textFrames.add({contents: "Lab", geometricBounds: ["30mm", "30mm", "60mm", "60mm"], fillColor: addUnnamedColor([100, -128, 127], 1665941826)}); // will be a Lab because of value
    p.textFrames.add({contents: "Lab", geometricBounds: ["30mm", "60mm", "60mm", "90mm"], fillColor: addUnnamedColor([24.5, 16, -29], ColorSpace.LAB)}); // will be a Lab
    p.textFrames.add({contents: "Lab", geometricBounds: ["30mm", "90mm", "60mm", "120mm"], fillColor: addUnnamedColor([36.8, -9, 27],"l")}); // will be a Lab
    p.textFrames.add({contents: "Lab", geometricBounds: ["30mm", "120mm", "60mm", "150mm"], fillColor: addUnnamedColor([51, 78, 0], -1)}); // will be a Lab because of the 1
    p.textFrames.add({contents: "CMYK", geometricBounds: ["60mm", "0mm", "90mm", "30mm"], fillColor: addUnnamedColor([82, 72, 0, 0])}); // will be a CMYK because there are 4 color values
    p.textFrames.add({contents: "CMYK", geometricBounds: ["60mm", "30mm", "90mm", "60mm"], fillColor: addUnnamedColor([60, 0, 100, 0], 1129142603)}); // will be a CMYK because of value
    p.textFrames.add({contents: "CMYK", geometricBounds: ["60mm", "60mm", "90mm", "90mm"], fillColor: addUnnamedColor([84, 90,40, 0], ColorSpace.CMYK)}); // will be a CMYK
    p.textFrames.add({contents: "CMYK", geometricBounds: ["60mm", "90mm", "90mm", "120mm"], fillColor: addUnnamedColor([67, 53, 97.6, 21.7], "c")}); // will be a CMYK
    p.textFrames.add({contents: "CMYK", geometricBounds: ["60mm", "120mm", "90mm", "150mm"], fillColor: addUnnamedColor([0, 100, 0, 0], 0)}); // will be a CMYK
    function addUnnamedColor (cValue, space, docToAddColor) {
        docToAddColor = app.documents.length && (docToAddColor || (app.properties.activeDocument && app.activeDocument) || app.documents[0]);
        if (!docToAddColor) return;
        var lastColor = docToAddColor.colors[-1];
        if (!cValue) cValue = [0,0,0,0];
        if (space == 1129142603 || cValue && cValue.length == 4) space = ColorSpace.CMYK;
        else if ((space && space < 0) ||  space && space == 1665941826 || (space && /L|-/i.test(space.toString())) || (cValue && /-/.test(cValue ))) space = ColorSpace.LAB;
        else if ((space && space > 0) || space && space == 1666336578 || (space && /R/i.test(space.toString())) || (cValue && cValue.length == 3)) space = ColorSpace.RGB;
        else space = ColorSpace.CMYK;
        app.doScript (
            var newUnnamedColor = (lastColor.name == "") ? lastColor.duplicate() : taggedColor();
            newUnnamedColor.properties = {space: space, colorValue: cValue};
            ScriptLanguage.javascript,
            undefined,
            UndoModes.FAST_ENTIRE_SCRIPT
         function taggedColor() { // need to use this if no unnamed exists
                 var tagString = "<ASCII-" + ($.os[0] == "M" ? "MAC>\r " : "WIN>\r ") + "<cColor:COLOR\:CMYK\:Process\:0.1\,0.95\,0.3\,0.0><cColor:>"; // would make more sense to apply the correct value in the tagged text file but I can't be bothered !
                 var tempFile = new File (Folder (Folder.temp) + "/ " + (new Date).getTime() + ".txt");
                 tempFile.open('w');
                 tempFile.write(tagString);
                 tempFile.close();
                 var tempFrame = docToAddColor.pages[-1].textFrames.add();
                 $.sleep(250);
                 tempFrame.place(tempFile);
                 tempFrame.remove();
                 tempFile.remove();
             return docToAddColor.colors[-1];
        return newUnnamedColor;
    Shall apply the function to delete and replace swatch on the other thread at a more sane time
    Regards
    Trevor

  • [ALV] Text in color and bold

    Hello,
    I have an ALV Grid and I would like one cell, with text color in red and in bold.
    I'm in OOP's with CL_GUI_ALV_GRID.
    I've tried like that :
    CONSTANTS :
                c_bold(4)           TYPE x       VALUE '00000020',
                c_red(4)            TYPE x       VALUE '00000017'.
    *-LAYOUT
      fe_layout-cwidth_opt = c_x.
      fe_layout-no_rowmark = c_x.
      fe_layout-info_fname = 'ROW_COLOR'.
      fe_layout-stylefname = 'CELLS_STYLES'.
    *-OUTTAB
      clear we_style.
      we_style-fieldname = 'XXXXX'.
      we_style-style = c_bold.
      we_style-style = c_red.
      insert we_style into table we_outtab-cells_styles.
    It doesne't work. The bold put the text color in black.
    There is a solution ?
    Thank you.

    Hello Bernard
    I checked my sample report and it shows that '00000037' yields the text in bold and red.
    '00000037' = '00000020' + '00000017'   !!!
    Below you find a modified version of the sample report:
      BREAK-POINT.
      CONSTANTS :
          c_bold(4)           TYPE x       VALUE '00000020',
          c_red(4)            TYPE x       VALUE '00000017'.
      CLEAR: ls_outtab2.
      REFRESH: lt_celltab.
      ls_outtab2-maxlen = 0.
      ls_outtab2-style  = c_bold.
      ls_outtab2-style2 = c_red.
      ls_style-style = c_bold + c_red.
      INSERT ls_style INTO TABLE lt_celltab.
      ls_outtab2-celltab = lt_celltab.
      INSERT ls_outtab2 INTO gt_outtab2 INDEX 1.
    ENDFORM.                    " FILL_OUTTAB2
    Entire report:
    *& Report  ZUS_SDN_ALV_STYLE_LIST
    *& Thread: [ALV] Text in color and bold
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1191290"></a>
    *& Thread: color alv list display
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1072435"></a>
    *& Thread: Hiliting the Specific rows in ALV grid
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1062831"></a>
    *& Thread: Reg... coloring of rows
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1041516"></a>
    *& Thread: Painting cell in alv with objects
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1029759"></a>
    *& Thread: styles
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="830498"></a>
    *& Thread: Is it possible to assign color to manually modified record in tabcontrol?
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="878289"></a>
    *& The report generates style values and shows their effect in ALV grid.
    REPORT  zus_sdn_alv_cell_style_2.
    TYPE-POOLS: abap.
    TYPES: BEGIN OF ty_s_outtab.
    INCLUDE TYPE knb1.
    TYPES: celltab TYPE lvc_t_styl. " cell style
    TYPES: END OF ty_s_outtab.
    TYPES: ty_t_outtab TYPE STANDARD TABLE OF ty_s_outtab
    WITH DEFAULT KEY.
    TYPES: BEGIN OF ty_s_outtab2.
    INCLUDE TYPE lvc_s_styl.
    TYPES: celltab TYPE lvc_t_styl. " cell style
    TYPES: END OF ty_s_outtab2.
    TYPES: ty_t_outtab2 TYPE STANDARD TABLE OF ty_s_outtab2
    WITH DEFAULT KEY.
    DATA:
    gs_layout TYPE lvc_s_layo,
    gs_variant TYPE disvariant,
    gt_fcat TYPE lvc_t_fcat.
    DATA:
    gt_outtab TYPE ty_t_outtab,
    gt_outtab2  TYPE ty_t_outtab2.
    PARAMETERS:
      p_rows    TYPE i DEFAULT 200.
    START-OF-SELECTION.
      SELECT * FROM knb1 UP TO 100 ROWS
      INTO CORRESPONDING FIELDS OF TABLE gt_outtab
      WHERE bukrs = '1000'.
    **  data: gr_kunnr    type RANGE OF kunnr.
    **  SELECT kunnr as low from knb1 into CORRESPONDING FIELDS OF TABLE gr_kunnr
    **    WHERE bukrs = '1000'.
      PERFORM set_layout_and_variant.
      PERFORM set_cell_style.
    **  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    **    EXPORTING
    **      i_structure_name = 'KNB1'
    **      i_grid_title     = 'Cell Styles'
    **      is_layout_lvc    = gs_layout
    **      i_save           = 'A'
    **      is_variant       = gs_variant
    **    TABLES
    **      t_outtab         = gt_outtab
    **    EXCEPTIONS
    **      program_error    = 1
    **      OTHERS           = 2.
    **  IF sy-subrc = 0.
    **  ENDIF.
      PERFORM fill_outtab2.
    **  PERFORM fill_fieldcatalog_2.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
          i_structure_name = 'LVC_S_STYL'
          i_grid_title     = 'Cell Styles'
          is_layout_lvc    = gs_layout
          i_save           = 'A'
          is_variant       = gs_variant
    *      IT_FIELDCAT_LVC  = gt_fcat
        TABLES
          t_outtab         = gt_outtab2
        EXCEPTIONS
          program_error    = 1
          OTHERS           = 2.
      IF sy-subrc = 0.
      ENDIF.
    END-OF-SELECTION.
    *& Form SET_LAYOUT_AND_VARIANT
    FORM set_layout_and_variant .
      CLEAR: gs_layout,
      gs_variant.
      gs_layout-cwidth_opt = abap_true.
      gs_layout-stylefname = 'CELLTAB'.
      gs_variant-report = syst-repid.
      gs_variant-handle = 'STYL'.
    ENDFORM. " SET_LAYOUT_AND_VARIANT
    *&      Form  set_cell_style
    *       text
    FORM set_cell_style .
    * define local data
      CONSTANTS:
      lc_style_bold TYPE int4 VALUE '00000121',
      lc_style_red TYPE int4 VALUE '00000087',
      lc_style_cursive TYPE int4 VALUE '00008700',
      lc_style_underline_faint TYPE int4 VALUE '00008787',
      lc_style_underline TYPE int4 VALUE '00008707',
      lc_style_underline_red TYPE int4 VALUE '00008007'.
      DATA:
      ls_outtab TYPE ty_s_outtab,
      ls_style TYPE lvc_s_styl,
      lt_celltab TYPE lvc_t_styl.
      CLEAR: ls_style.
      ls_style-fieldname = 'BUKRS'.
      ls_style-style = '00000011'.    " make contents invisible
      INSERT ls_style INTO TABLE lt_celltab.
    **  CLEAR: ls_style.
    **  ls_style-fieldname = 'BUKRS'.
    **  ls_style-style = lc_style_bold.
    **  INSERT ls_style INTO TABLE lt_celltab.
    **  CLEAR: ls_style.
    **  ls_style-fieldname = 'KUNNR'.
    **  ls_style-style = lc_style_red.
    **  INSERT ls_style INTO TABLE lt_celltab.
    **  CLEAR: ls_style.
    **  ls_style-fieldname = 'ERDAT'.
    **  ls_style-style = lc_style_cursive.
    **  INSERT ls_style INTO TABLE lt_celltab.
    **  CLEAR: ls_style.
    **  ls_style-fieldname = 'ERNAM'.
    **  ls_style-style = lc_style_underline.
    **  INSERT ls_style INTO TABLE lt_celltab.
      ls_outtab-celltab = lt_celltab.
      MODIFY gt_outtab FROM ls_outtab
      TRANSPORTING celltab
      WHERE ( bukrs = '1000' ).
    ENDFORM. " SET_CELL_STYLE
    *&      Form  FILL_OUTTAB2
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM fill_outtab2 .
    * define local data
      DATA: ls_outtab2  TYPE ty_s_outtab2,
            ld_num8(8)  TYPE n,
            ld_idx      TYPE i,
            ld_fname    TYPE fieldname,
            ld_perc     TYPE i,
            ld_text(50) TYPE c.
      DATA:
      ls_style TYPE lvc_s_styl,
      lt_celltab TYPE lvc_t_styl.
      FIELD-SYMBOLS: <ld_style>  TYPE lvc_style.
      ld_num8 = 0.
      DO p_rows TIMES.
        WRITE syst-index TO ld_text NO-ZERO.
        CONDENSE ld_text NO-GAPS.
        ld_perc = ( syst-index * 100 ) / p_rows.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
          EXPORTING
            percentage = ld_perc
            text       = ld_text.
        CLEAR: ls_style,
           ls_outtab2.
        REFRESH: lt_celltab.
        ls_outtab2-maxlen = syst-index.
        MOVE ld_num8 TO ls_outtab2-style.
        ls_style-style = ls_outtab2-style.
        INSERT ls_style INTO TABLE lt_celltab.
        ls_outtab2-celltab = lt_celltab.
        APPEND ls_outtab2 TO gt_outtab2.
        ADD 1 TO ld_num8.
      ENDDO.
      BREAK-POINT.
      CONSTANTS :
          c_bold(4)           TYPE x       VALUE '00000020',
          c_red(4)            TYPE x       VALUE '00000017'.
      CLEAR: ls_outtab2.
      REFRESH: lt_celltab.
      ls_outtab2-maxlen = 0.
      ls_outtab2-style  = c_bold.
      ls_outtab2-style2 = c_red.
      ls_style-style = c_bold + c_red.
      INSERT ls_style INTO TABLE lt_celltab.
      ls_outtab2-celltab = lt_celltab.
      INSERT ls_outtab2 INTO gt_outtab2 INDEX 1.
    ENDFORM.                    " FILL_OUTTAB2
    *&      Form  FILL_FIELDCATALOG_2
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM fill_fieldcatalog_2 .
    * define local data
      DATA: ls_fcat TYPE lvc_s_fcat,
            lt_fcat TYPE lvc_t_fcat.
      DATA: ld_fname  TYPE fieldname.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_BUFFER_ACTIVE              =
          i_structure_name             = 'LVC_S_STYL'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
    *     I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = lt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 2
          OTHERS                       = 3.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      DELETE lt_fcat WHERE ( fieldname NE 'STYLE' ).
      READ TABLE lt_fcat INTO ls_fcat INDEX 1.
      DO 16 TIMES.
        ls_fcat-fieldname = 'STYLE'.
        ls_fcat-col_pos = syst-index.
        WRITE syst-index TO ld_fname NO-ZERO.
        CONDENSE ld_fname NO-GAPS.
        CONCATENATE ls_fcat-fieldname ld_fname INTO ls_fcat-fieldname.
        APPEND ls_fcat TO gt_fcat.
      ENDDO.
    ENDFORM.                    " FILL_FIELDCATALOG_2
    Regards
      Uwe

  • Add "Add to Swatch" in gradient mode

    Why in the gradient palette removed for either Add a swatch? Instead, the hare is a creation I have to leave to go back and add a gradient to add a swatch.
    1. Why cut off two to three additional options?
    2. Why removed last option used color?
    3. Overall, there is no possibility for the rapid use of the recent elections — concerns not only the color.

    In case anyone looked, I was missing the commit.
    Thanks anyway.

  • Saving Color and Depth data as png to filestream

    I try to save both color and depth data to separate files as PNGs using PngBitmapEncoder but I get much less depth frames saved than color.
    If I save color as Jpeg with JpegBitmapEncoder and depth as PNG using PngBitmapEncoder I get the same amount of frames from both streams.
    Can anyone explain me why?
    private void myKinectSensor_ColorFrameReady(object sender, ColorImageFrameReadyEventArgs e)
    using (ColorImageFrame color = e.OpenColorImageFrame())
    if (color != null)
    colorbits = new byte[color.PixelDataLength];
    color.CopyPixelDataTo(colorbits);
    PngBitmapEncoder enc = new PngBitmapEncoder();
    enc.Frames.Add(BitmapFrame.Create(BitmapSource.Create(color.Width, color.Height, 96, 96, PixelFormats.Bgr32, null, colorbits, color.Width * color.BytesPerPixel)));
    if (StartSavingFrames)
    string temppath = System.IO.Path.Combine(@"../output/kinect1/color/", colorcnt.ToString() + ".jpeg");
    FileStream fs = new FileStream(temppath, FileMode.Create);
    enc.Save(fs);
    fs.Close();
    fs = null;
    colorcnt++;
    else { colorcnt = 0; }
    private void myKinectSensor_DepthFrameReady(object sender, DepthImageFrameReadyEventArgs e)
    using (DepthImageFrame depth = e.OpenDepthImageFrame())
    if (depth != null)
    frame = new short[depth.PixelDataLength];
    depth.CopyPixelDataTo(frame);
    for (int i = 0; i < depth.PixelDataLength; i++)
    frame[i] = (short)(((ushort)frame[i]) >> 3);
    PngBitmapEncoder enc = new PngBitmapEncoder();
    enc.Frames.Add(BitmapFrame.Create(BitmapSource.Create(depth.Width, depth.Height, 96, 96, PixelFormats.Gray16, null, frame, depth.Width * depth.BytesPerPixel)));
    if (StartSavingFrames)
    string temppath = System.IO.Path.Combine(@"../output/kinect1/depth/", cnt.ToString() + ".png");
    FileStream fs = new FileStream(temppath, FileMode.Create);
    enc.Save(fs);
    fs.Close();
    fs = null;
    cnt++;
    else { cnt = 0; }

    performance of the write operations and the operations of the system at the time you are calling them. You need to ensure your functions are returning and releasing(disposing) of the frames faster than the callback times. When you hold onto data to
    long, that just prevents your application from getting new data.
    Have a look at the coordinate mapping sample from the toolkit for a way to copy both the depth and color at the same time. From there you need to create a new thread to save that data since write speeds are very slow.
    Carmine Sirignano - MSFT

  • Change color and line weight

    Hi,
    I am trying to create a script who could act as an Autocad plot (ie convert each color to black, with a different lineweight). I did some research, and tried to mix some scripts found here to create my own, but there is a lot of things I don't understand yet… If anyone could give an eye at these, it would be great!
    Here is the first script I melted, who create my Black swatch
    if ( app.documents.length > 0 ) {
    var myDoc = app.activeDocument;
    //add Black swatch
    var newSwatch = app.activeDocument.swatches.add()
    var newColor = new GrayColor();
    newColor.gray = 100;
    newSwatch.name = "Black"
    newSwatch.color = newColor
    //Sélectionner les lignes par spot color
    var findColor = swatch.getByName("AutoCAD Color 2").color;
    var replaceColor = swatch.getByName("Black").color;
    //pathItem.strokeColor
    var idoc = app.activeDocument;
    var itext = idoc.textFrames[0];
    //alert(itext.textRange.characterAttributes.fillColor);
    var fillColor = itext.textRange.characterAttributes.fillColor;
    var strokeColor = itext.textRange.characterAttributes.strokeColor;
    filled = stroked = "yes";
    if (fillColor=="[NoColor]")
            filled = "No";
    if (strokeColor=="[NoColor]")
            stroked = "No";
    alert("Filled: " + filled + "\n" + "Stroked: " + stroked);
    And here is the second one, who replace one color by Black (it don't change the text, nor the lineweight yet…
    if ( app.documents.length > 0 ) {
    //test de dialogue
    function csDialog() {
         var fabGroup = app.activeDocument.swatchGroups.getByName('Fabrics');
         var allFabs = fabGroup.getAllSwatches();
         var fabNames = Array();
         for (var i = 0; i < allFabs.length; i++) {
              fabNames.push(allFabs[i].name);
              if (i < allFabs.length-1) fabNames.push('-');
         var csdlg = new Window('dialog', 'Tim\'s Fabric Picker…',[0,0,300,205]);
         // Standard Buttons    
         csdlg.cancelBtn = csdlg.add('button', [15,164,125,186], 'Cancel', {name:'cancel'});
         csdlg.okBtn = csdlg.add('button', [175,164,285,186], 'OK', {name:'ok'});
         // Button call back
         csdlg.okBtn.onClick = function() {
              csdlg.close(1);
              colourSwapper('Black','Black'); // Here call the process
         csdlg.center();
         csdlg.show();
    // Main active document commands go here
    function colourSwapper(a,b) {
         var uIL = app.userInteractionLevel;
         app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
         var docRef = app.activeDocument;
         recurseLayers(docRef.layers);
         alert('Now run Action:\r"Delete Unused Panel Items"');
         app.userInteractionLevel = uIL;
    // Main active document check function
    function activeDoc() {
         if (app.documents.length == 0) {
              alert('NO document open?');
              return;
    activeDoc();
    function recurseLayers(objArray) {
         for (var i = 0; i < objArray.length; i++) {
              var l = objArray[i].locked;
              if (l) objArray[i].locked = false;
              var v = objArray[i].visible;
              if (!v) objArray[i].visible = true;
              changeText(objArray[i].textFrames);
              changeColours(objArray[i].pathItems);
              if (objArray[i].layers.length > 0) {
                   recurseLayers(objArray[i].layers)
              if (objArray[i].groupItems.length > 0) {
                   recurseGroups(objArray[i].groupItems)
              if (objArray[i].compoundPathItems.length > 0) {
                   loopCompounds(objArray[i].compoundPathItems)
              objArray[i].locked = l;
              objArray[i].visible = v;
    function recurseGroups(objArray) {
         for (var i = 0; i < objArray.length; i++) {
              var l = objArray[i].locked;
              if (l) objArray[i].locked = false;
              var h = objArray[i].hidden;
              if (h) objArray[i].hidden = false;
              changeText(objArray[i].textFrames);
              changeColours(objArray[i].pathItems);
              if (objArray[i].groupItems.length > 0) {
                   recurseGroups(objArray[i].groupItems)
              if (objArray[i].compoundPathItems.length > 0) {
                   loopCompounds(objArray[i].compoundPathItems)
              objArray[i].locked = l;
              objArray[i].hidden = h;
    function loopCompounds(objArray) {
         for (var i = 0; i < objArray.length; i++) {
              var l = objArray[i].locked;
              if (l) objArray[i].locked = false;
              var h = objArray[i].hidden;
              if (h) objArray[i].hidden = false;
              changeColours(objArray[i].pathItems);    
              objArray[i].locked = l;
              objArray[i].hidden = h;
    function changeColours(objArray) {
         for (var i = objArray.length-1; i >= 0; i--) {
              var l = objArray[i].locked;
              if (l) objArray[i].locked = false;
              var h = objArray[i].hidden;
              if (h) objArray[i].hidden = false;
              if (objArray[i].strokeColor instanceof SpotColor) {
                   if (objArray[i].strokeColor.spot.name == 'AutoCAD Color 11') {
                        objArray[i].strokeColor = app.activeDocument.swatches.getByName('Black').color;
                   if (objArray[i].strokeColor.spot.name == 'AutoCAD Color 23') {
                        objArray[i].strokeColor = app.activeDocument.swatches.getByName('Black').color;
              objArray[i].locked = l;
              objArray[i].hidden = h;
    function changeText(objArray) {
         for (var i = objArray.length-1; i >= 0; i--) {
              var l = objArray[i].locked;
              if (l) objArray[i].locked = false;
              var h = objArray[i].hidden;
              if (h) objArray[i].hidden = false;
              if (/Primary/.test(objArray[i].contents)) {
                   objArray[i].contents = objArray[i].contents.replace('AutoCAD Color 11', 'Black')
              if (/Secondary/.test(objArray[i].contents)) {
                   objArray[i].contents = objArray[i].contents.replace('AutoCAD Color 23', 'BLack')
              objArray[i].locked = l;
              objArray[i].hidden = h;

    Gernouille
    Did you ever get this resolved?  I have a similar situation and would like to see final code if you have a working solution.

  • Report Generation broken after deployment - Excel Set Cell Color and Border.vi

    Upon deployment, the Excel Set Cell Color and Border.vi became broken.  After installing LV2010 SP1 to view the VIs in the deployment, I noticed that in the second case structure where the code draws the border using the BorderAround invoke node, there is an extra variant input parameter named 'Parameters'.  Upon right-clicking, an option to 'Relink Invoke Node' appeared and after selecting this, the extra input disappeared and the VI was no longer broken.
    Why does "Relink Invoke Node" appear?  How do I create a deployment with this issue?  Has anybody else experienced this?  Why is the TestStand deployment so buggy?  

    Hi Ching-Hwa,
    I have set up a test deployment here where I am deploying a workspace that contains a sequence file.  This sequence file has a LabVIEW Action Step calling a VI that opens a new Excel file and simply calls the Excel Set Cell Color and Border VI.  After deploying this, both the VI and my test sequence ran on the deployment machine without error.  Therefore, I do have some more questions to more accurately reproduce what you are seeing.
    First, what operating systems are you developing on and deploying to?  Also, what license do you have for TestStand on the machine you are deploying to?  If you have a development version, can you manually take the sequence file and VI to this machine and run it?  I know you now have LabVIEW 2010 SP1 on your development machine, but if you have the development version of TestStand as well, it would be interesting to see if you copy the files over if you still see this behavior.  Are you including the TestStand Engine in the deployment?
    Can you open a blank VI on the deployment machine and add the Excel Set Cell Color and Border VI?  It would also be interesting to see if this is not a product of the deployment, but rather an issue with something on the deployment machine itself.  What version of the Report Generation Toolkit do you have on each machine?  Also, what versions of Excel are you using on the development and deployment machine?  Again, it would be helpful for me to know exactly what versions you have installed on both the development and deployment machines so that I can reproduce this as accurately as possible.
    One last thing to try, too, would be to try deploying the VI by itself just to see if it also has the same behavior.  Do you have the Application Builder in LabVIEW?  If so, could you also try building an executable from the VI, create an installer, and deploy this to the deployment machine?  
    In regards to the "freezing" of code by removing the block diagrams, I do not believe this will be a proper work around in this case.  While this removes the block diagram from actually being deployed along with the VI and restricts users from editing the code on the deployment machine, if something is getting changed in the compiled code upon deployment, this will not stop this from happening.  This option is available more as a memory option to lower the size of the deployment as well as prohibit any users on the development machine from editing the block diagram themselves.    
    Thanks, Ching-Hwa!  I look forward to your response so that I can continue trying to reproduce this issue.  Have a great day! 
    Taylor G.
    Product Support Engineer
    National Instruments
    www.ni.com/support

Maybe you are looking for