How to make text unconditional

Hi.
I am writing a program to delete condition tag.
But if any text is tagged with the tag I'm deleting,
I need to make the text unconditional.
Can some one tell me how to do this?
Best regard
erieru

Hi erieru103,
This seems like it should be a simple task, but it reality it is very complex. The problem is that (to my knowledge) there is no built-in way to do this with the FDK. All you have to work with are objects and properties. With conditional text, it is particularly difficult because conditional settings can differ from one character to the next.
Here is a function that I use to remove a condition from a document; that is, remove any place that it is applied (the condition remains as part of the template). It works; however, it is technically incomplete because it might remove other conditions as well. Basically, it seeks out any instance of the condition and makes that text completely unconditional. Then, it steps through every table row in the document and un-conditionalizes it. It may not be exactly what you want, but perhaps it will give you some kind of lead on where you really want to achieve.
Russ
// REMOVE A CONDITION TAG FROM THE DOCUMENT
VoidT ssp_RemoveConditionFromDoc(F_ObjHandleT docId,
                                 StringT conditionName)
  F_ObjHandleT flowId,
    tableId,
    rowId,
    frameId,
    pgfId;
  F_PropValT prop;
  F_PropValsT findParams;
  IntT counter = 0;
  F_IntsT tempInts;
  F_TextRangeT tr;
  //show all conditions.         
  F_ApiSetInt(FV_SessionId, docId, FP_ShowAll, True);
  //Set up the find parameters for the search
  findParams = F_ApiAllocatePropVals(1);
  findParams.val[0].propIdent.num = FS_FindCondTextInCondTags;
  findParams.val[0].propIdent.name = F_StrCopyString("");
  findParams.val[0].propVal.valType = FT_Strings;
  findParams.val[0].propVal.u.ssval.len = 1;
  findParams.val[0].propVal.u.ssval.val =
    (StringT *)
    F_Alloc(1*sizeof(StringT), NO_DSE);
  findParams.val[0].propVal.u.ssval.val[0] = F_StrCopyString(conditionName);
  //Step through the flows and remove the condition
  flowId = F_ApiGetId(FV_SessionId, docId, FP_FirstFlowInDoc);
  while(flowId)
    //Get the first pgf in the the flow to use as a starting place for the search.
    frameId = F_ApiGetId(docId, flowId, FP_FirstTextFrameInFlow);
    if(frameId) pgfId = F_ApiGetId(docId, frameId, FP_FirstPgf);
    else pgfId = 0;
    if(pgfId)
      //initialize the error flag
      FA_errno = FE_Success;
      //do an initial find, to make the next loop work right
      tr.beg.objId = pgfId;
      tr.beg.offset = 0;
      tr = F_ApiFind(docId, &tr.beg, &findParams);
      //while we have found text with the offending condition, let's remove it.
      while(FA_errno == FE_Success)
        //Allocate a textprop structure for conditions, then clear the list
        //and reset the property to the whole range.
        prop = F_ApiGetTextPropVal(docId, &tr.beg, FP_InCond);
        F_ApiDeallocateInts(&prop.propVal.u.isval);
        prop.propVal.u.isval.val = (IntT *)
          F_Alloc(0*sizeof(IntT), NO_DSE);
        prop.propVal.u.isval.len = 0;
        F_ApiSetTextPropVal(docId, &tr, &prop);
        F_ApiDeallocatePropVal(&prop);
        //and keep searching
        tr = F_ApiFind(docId, &tr.beg, &findParams);
      //The only error we should receive is "not found", when every instance
      //has been found.  If this is not the case, let's warn.
      if(FA_errno != FE_NotFound)
         //handle error here
    flowId = F_ApiGetId(docId, flowId, FP_NextFlowInDoc);
  //done with this
  F_ApiDeallocatePropVals(&findParams);
  //now, we have to do all the table rows, because they don't get
  //found by the find.
  tempInts.val = (IntT *) F_Alloc(0*sizeof(IntT), NO_DSE);
  tempInts.len = 0;
  tableId = F_ApiGetId(FV_SessionId, docId, FP_FirstTblInDoc);
  //step through all the tables in the doc
  while(tableId)
    rowId = F_ApiGetId(docId, tableId, FP_FirstRowInTbl);
    //step through all the rows in the current table
    while(rowId)
      //remove conditions, with this structure we allocated earlier
      F_ApiSetInts(docId, rowId, FP_InCond, &tempInts);
      rowId = F_ApiGetId(docId, rowId, FP_NextRowInTbl);
    tableId = F_ApiGetId(docId, tableId, FP_NextTblInDoc);
  //hopefully that's it.
  F_ApiDeallocateInts(&tempInts);

Similar Messages

  • How to make text start at the top of a page in livecycle 9

    Hi, How can I get the text in a large text field to start at the top left of the field rather than at the center of the field? In addition, may one know how to make text wrap in the form as well?
    Thanks,
    David

    To set the Text alignment properties use "Paragraph" pallet you can make it visible by selecting Window>>Paragraph or Shift+F5
    And to allow text wrapping you need to select "Allow Multiple Lines" checkbox under "Object" pallet and "Field" tab. You can make Object pallet visible by selecting Window>>Object or Shift+F7.
    Good Luck,

  • How to make text columns with adobe muse

    Hi,How to make text columns with adobe muse (like InDesign)?

    Multiple columns can be acheived with CSS - http://www.w3schools.com/css/css3_multiple_columns.asp
    div
    -moz-column-count:3; /* Firefox */
    -webkit-column-count:3; /* Safari and Chrome */
    column-count:3;
    I'm surprised that Muse does not support text columns yet, but perhaps the custom CSS can be added in style tags on page properties. Haven't tried it, but don't see why it wouldn't work.

  • How to make text/objects move nonlinear speed on AE CC?

    Hi,
    I was wondering two questions:
    1) how to make "text holders" that has small animation. Here is an example from a video http://www.youtube.com/watch?v=5oSWt84VoAg (0:41).
    2) how to move objects with increasing speed and soft slow down. I know how to change speed, but how to make it so that it is only accelerating and slowing down? Same examle can be found from the clip above with the place holders and texts.
    Thank you for your help. If there is same kind of discussion going on please let me know. I could not find it.

    All of what you want to do comes down to the fine art of learning how to magle curves in the graph editor, which is nothing you can learn from just watching totorials. You learn it by doing and collecting experience.
    Mylenium

  • Converted file is pic not text - how to make text?

    Converted file is pic not text - how to make text?

    Hi,
    I am moving your posting to Adobe ExportPDF forum as you posted this at Acrobat.com forum.
    It seems that you did not turn on "OCR" when you convert your PDF file or your PDF file contains too small text/graphics/complex layout. 
    Please send your file to us if possible using below site so that we can look into the problem:
    https://adobeformscentral.com/?f=qJiclooYWGGNFtWfj8g3wg#
    Thank you.
    Hisami

  • How to make text stop wrapping around an image?

    Hello:
    I am using RoboHelp HTML 10 on Windows 7, generating PDF and webhelp.
    My project includes some images with text wrapping to the right of the image. I would like to allow a certain amount of the text to appear next to the image, then force the wrapping to stop at a specific sentence. I want the next paragraph to be aligned with the left margin instead of continuing to wrap around the image.
    This is the effect I want:
    I want paragraph A to appear next to the image, and paragaph B to be aligned with the left edge of the topic. It is OK for there to be some white space below paragraph A.
    Is there a way to make this happen?
    Regards,
    Juliette Curtis

    Thanks for the quick reply Peter.
    I was able to create an image style that makes the text wrap to the right of the image. However, I can't work out how to make the text stop wrapping in a specific place. This image shows what is happening:
    I want to allow paragraph A to appear to the right of the image and force B to appear below the image, as shown in the first image. The problem is that I don't know how to make B do what I want. Is there a way to do this?
    Thanks again for your help.
    Regards,
    Juliette

  • How to make Text filed Grayed out / disabled

    Hi,
    I have a text field and I have set the following property..
    HTML Form Element Attributes:- readOnly=trueThis field is read only now.
    HOW to make this field looks like a disabled field, some thing like filling the background with light gray color.
    Thanks,
    Deepak

    Thanks Andy..it worked..but one clarification.
    when I am using the following code as suggested by you, I am getting the text box border, as well as gray color in the box...THIS is perfectly fine which I wanted.... (This will make that field always read only)
    Element Type - Text
    HTML Form Element Attributes - readOnly=true style="background-color:gray"NOW I want my field to be read only based on condition.
    So I am using the following code, This is displaying the gray color, but the border of the text box is gone, so it doesn't look good. How can I keep the border too..
    Element Type - Text
    Read Only Condition Type (condition - Expression1=Expression2)
    Read Only Element Table Cell(s) Attributes - style="background-color:gray"Also, How to make FONT bold, I am using - font-weight: bold; - but it's not working.
    and finally , can I define this style in custom.css file and then how to call that stylesheet here...????
    Thanks,
    Deepak
    Edited by: Deepak_J on Oct 8, 2009 11:28 AM

  • How to make text selection in RTL direction?

    In my application, user need to highlight the text by mouse for arabic language. So how could I make the selection direction as RTL? Already my text aligned in 'right'. which component should I use?

    So thanks, I did it, it works. How now to make next: I selected Id from list and in the next column appears name with ID from DB. so how to make ondemand process i know (thanks to you), but how to get value from LOV that I selected to give it to Dynamic Action.
    Thanks

  • Smartform: How to make text height 1.5 times  than width?

    Let say, I want to output "Sales Order", how to make its height 1.5 times then width?
    Thanks a lot

    Hi,
    Create paragraph with the font size you want then apply this font to the Text that you want to  print.
    Thanks,
    Aditya

  • How to make text clicks go with the volume?

    My old iPod 3G used to make text typing sounds according to my volume. So if my volume was off there would be no text noises but with my new iPod touch the texting sounds are there regardless.  What do I do?

    Roxpat wrote:
    I'm beginning to consider learning other applications (Dreamweaver and/or specific languages), so feel free to offer those up as well.
    roxpat ~ Since your web site content is community oriented, you may be interested in this free, web-based site builder for social networks:
    http://about.ning.com/product.php
    ...Their Events feature lets members know about upcoming playgroups, coffee mornings, etc. related to your social network's theme. Read more here.
    You may want to consider hyperlinking from your iWeb site to a Ning site to provide some specific feature that iWeb doesn't offer.

  • How to make text field in tabular form as List of value (LOV)

    So the problem is next:
    I should to make field in tabular form as LOV(list of value (combobox)) to load there data form db. Could smb take me an advise how to make it.
    Thanks.

    So thanks, I did it, it works. How now to make next: I selected Id from list and in the next column appears name with ID from DB. so how to make ondemand process i know (thanks to you), but how to get value from LOV that I selected to give it to Dynamic Action.
    Thanks

  • How to make text formatting stick on book cover when sent to Apple or to PDF?

    In iPhoto '11 (version 9), one can format text on book covers and in text blocks by selecting the text and right clicking.  Font, size, color, and shadowing can be selected and changed.  All of this displays correctly and sticks when the book is saved, etc.  However, if the book is "previewed" or exported to a PDF (which I believe is the format sent to Apple for actual printing) some of the formatting is lost, permanently.  It just goes away.  Why?  And, more importantly, how can I make this formatting stick?  I'm mainly interested in shadowing as it gives the text a 3d look.  All shadowing is lost - font and size do stick.  I have successfully done this shadowing in several previous releases of iPhoto, and actually had it printed by Apple.  Any ideas out there?  Or is this another wonderful "feature" ?
    Thanks for playing.

    Sorry LN, but that is the problem.  When I do either the preview or the export to PDF, the shadow formatting disappears.  There is another forum discussion where some person discovered this only after receiving their three hard cover books.  I'm pretty sure it is a bug.  I have Snow Leopard and iPhoto '11 (v9) both with latest updates.
    One other note - when applying the text shadow, anytime I adjust either of the three shadow sliders, the shadow disappears and I must click on the main shadow button to make the adjusted shadow reappear.   As I said, it does then stick until I do either the preview or PDF as described in the article you referenced.  Very, very, very annoying.
    Will try to contact Apple today, although I have had very poor luck with ever getting them to admit to any problem in the past.  ( pride goeth before the fall....). Hope they will listen, but I have a close deadline on this book.

  • How to make text scroll in a chart/graph

    I am trying to make a small example labview app.
    I need to show a graph/chart with continuous data measurements, plotted over time. So far I have been using charts, since they suit my needs. I have seen though, that graphs are also a possibility. So if a solution calls for that, it might be ok.
    Now I have two things that i dont know how to do. I have attached a picture of what i want to do.
    I need to have time on the x axis, but i can only get it in the end points of the scale, can this be fixed (see the attached picture example)
    I also need to mark phase starts endings. This means I need to have text scrolling along with the plot, keeping a white marker line at the starte point of the phase. Can thios be done somehow? I have already looked into Annotations, but I dont think thats it. (see the attached picture.)
    If further explanation is needed, I would be happy to supply it.
    Kind regards Daniel
    Attachments:
    labview_example.JPG ‏27 KB

    One option with graphs is to right click the graph when the code is running, select "Create Annotation". This will add a label to the graph that moves as the graph updates.
    An alternative, and probably prettier approach, was discussed recently here;
    http://forums.ni.com/t5/LabVIEW/Two-background-colors-for-the-same-waveform-graph/td-p/1139000
    Hope that helps,
    Ian

  • How to make text messages pop up on screen?

    Hi...
    I used to have an iphone (sorry for swearing), and I used to love how text messages would pop up on the screen when the phone was in 'sleep' mode.
    Is there any way I can get my Z2 to do this?
    Thanks...

    Hi Sherratthead,
    Welcome to the community! Since you're new please be sure that you have checked out our Discussion guidelines.,
    You could also Try Handcent, this allows a POP up window that also acts as a Messenger window.
    https://play.google.com/store/apps/details?id=com.handcent.nextsms&hl=en
     - Official Sony Xperia Support Staff
    If you're new to our forums make sure that you have read our Discussion guidelines.
    If you want to get in touch with the local support team for your country please visit our contact page.

  • How To Make Text Disappear When Mouse is On a Button?

    Hello,  I'm completely new to Flash and well I need some help. I created a page that has static text in the center.
    The page has buttons on side and when I rollover a button text appears, but the problem is that when I rollover a button, the static text in the center is there and I want to hide it as I can't read anything because the texts are overlapped.
    How do I make the text in the center disappear/hide when I rollover a button and how do I make it reappear when the the mouse is off the button?
    I hope what I am explaining makes sense.

    You can assign onRollOver and onRollOut code to the buttons to make the text dispappear, but you'll need to make the text a movieclip with an instance name that you can use to target it to turn it invisible.  In the simple example below, the button has an instance name of "btn" and the text movieclip has an instance name of "text_mc"
    btn.onRollOver = function(){
          text_mc._visible = false;
    btn.onRollOut = function(){
          text_mc._visible = true;

Maybe you are looking for