Problem with typecasting function

Hello world

I have a problem with the conversion in labview function. I want to save my data in a binary format, so I use the conversion feature to convert data types to string format. Subsequently, these files must be read into Matlab and other software. Everything works directly in labview but is not with other software. For example, if I want to save a value of 1 (U16) I can only read a value of 256 in Matlab. I guess it has something to do with the effects of Mismatching described in help. But how can I fix? Can someone help me, that would be great?

Thank you very much!

Johannes

I want to save the value 1 (U16), I can read only instead of a value of 256 in Matlab

You have a problem (as said Mercurio, "Boutien") byte order.

A U16 takes 16 bits, or two bytes.

When sending two bytes in the meantime, both parties must agree on which one comes first.

For many years, the standard was "big-endian", that is, the byte the most signiificant came first.

Intel came and went against the standard byte, i.e. 'little-endian' or less important first.

LabVIEW has 'Big-Endian' as the standard for the transfer (he was born on non-Intel architectures).

If both sides of the Exchange do not agree on the method, you will get the symptoms you describe,

If the two bytes are 00 01, one side which will see as 00 01 = an and the other side will see it as 01 00 = 256.

Tags: NI Software

Similar Questions

  • Kalonline-works until I get the anti-piracy icon so stop saying: there is a problem with the function of anti-hacking

    I play kalonline (RPG game), when to start the game it works up until I get the anti-piracy icon so stop saying: there is a problem with the function of anti-hacking. the program stops. I am the admin of it say kal computer run it in administrator mode and I did and I delete and reinstall the game. Solve the problem in win 7 by a right click and run as administrator, they wanted to work in win xp it all fits on how to solve this problem. These are the things, I was told to do to fix it.
    Hello

    It comes to KalOnline.

    Your error message can be corrected by following these steps:

    1. run KalOnline in Administrator Mode.

    2 uninstall KalOnline d_lete the entire Inixsoft folder, then reinstall the game.
    I did it and and it has not worked. then I was told that this was causing the problem

    Please check your computer system.

    This problem has occurred by a kind of problem of piracy.

    And if you have used a kind of memory-editing program, it could be happen too.

    So if your receipt similar to, then please remove it.
    I have none of these things on my computer. All I know is that people who have not updated windows xp can play the game and people who win 7 can play the game if they right click icon and run as administrator, that I still say side here but no way to prove it.

    Hello

    I suggest you to get in touch with the manufacturer of games and see if there are any other fix for this problem.

  • Having the problem with the function on SG300 Dhcp / 500?

    Having the problem with the function on SG300 Dhcp / 500? now I can use the dhcp server on the two model, but have a problem.

    My problem is when I create

    VLAN 1: 192.168.0.1/24 dhcp pool 192.168.0.10 - 250

    VLAN 10: 192.168.10.10 - 250 192.168.10.1/24 dhcp pool

    case 1

    I plug the pc to vlan 1 can I get ip 192.168.0.11. But when I change this pc to a new port in vlan 2 I always get the same ip address. why I can not get IP of vlan2.

    case 1

    I plug the pc to vlan 2 I can get ip 192.168.10.11. But when I change this pc to a new port in the vlan 1 I always get the same ip address. why I can not get IP of vlan1.

    but when I have access to the switch and remove the link after that that i will get correct IP.

    I think this is the bug of this firmware. Could you help this case.

    This is a known bug that is the setting of Cisco

    Sent by Cisco Support technique iPad App

  • Problem with analytical function for date

    Hi all

    ORCL worm:
    Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    "CORE 11.2.0.2.0 Production."
    AMT for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production

    I have a problem with the analtical for the date function. I'm trying to group records based on timestamp, but I'm failing to do.
    Could you please help me find where I'm missing.
    This is the subquery. No issue with this. I'm just posting it for reference. 
    select sum(disclosed_cost_allocation.to_be_paid_amt) amt,
        substr(reference_data.ref_code,4,10) cd,
        to_char(external_order_status.status_updated_tmstp, 'DD-MON-YYYY HH24:MI:SS') tmstp,
        DISCLOSED_CLOSING_COST.DISCLOSED_CLOSING_COST_ID id
      FROM Deal.Fee_Mapping_Definition ,
        Deal.Fee_Index_Definition ,
        Deal.Fee_Closing_Cost_Item,
        Deal.Closing_Cost,
        Deal.Document_Generation_Request,
        deal.PRODUCT_REQUEST,
        deal.External_Order_Request,
        deal.External_Order_Status,
        deal. DISCLOSED_CLOSING_COST,
        deal.DISCLOSED_COST_ALLOCATION,
        deal.reference_data
      WHERE Fee_Mapping_Definition.Fee_Code                    = Fee_Index_Definition.Fee_Code
      AND Fee_Index_Definition.Fee_Index_Definition_Id         = Fee_Closing_Cost_Item.Fee_Index_Definition_Id
      AND Fee_Closing_Cost_Item.Closing_Cost_Id                = Closing_Cost.Closing_Cost_Id
      AND CLOSING_COST.PRODUCT_REQUEST_ID                      = Document_Generation_Request.Product_Request_Id
      AND closing_cost.product_request_id                      = product_request.product_request_id
      AND Product_Request.Deal_Id                              = External_Order_Request.Deal_Id
      AND external_order_request.external_order_request_id     = external_order_status.external_order_request_id
      AND external_order_request.external_order_request_id     = disclosed_closing_cost.external_order_request_id
      AND DISCLOSED_CLOSING_COST. DISCLOSED_CLOSING_COST_ID    = DISCLOSED_COST_ALLOCATION.DISCLOSED_CLOSING_COST_ID
      AND Fee_Index_Definition.Fee_Index_Definition_Id         = Disclosed_Closing_Cost.Fee_Index_Definition_Id
      AND Fee_Mapping_Definition.Document_Line_Series_Ref_Id   = Reference_Data.Reference_Data_Id
      AND Document_Generation_Request.Document_Package_Ref_Id IN (7392 ,2209 )
      AND External_Order_Status.Order_Status_Txt               = ('GenerationCompleted')
      AND Fee_Mapping_Definition.Document_Line_Series_Ref_Id  IN ( 7789, 7788,7596 )
      AND FEE_MAPPING_DEFINITION.DOCUMENT_TYPE_REF_ID          = 1099
      AND Document_Generation_Request.Product_Request_Id      IN
        (SELECT PRODUCT_REQUEST.PRODUCT_REQUEST_id
        FROM Deal.Disclosed_Cost_Allocation,
          Deal.Disclosed_Closing_Cost,
          DEAL.External_Order_Request,
          DEAL.PRODUCT_REQUEST,
          Deal.Scenario
        WHERE Disclosed_Cost_Allocation.Disclosed_Closing_Cost_Id = Disclosed_Closing_Cost.Disclosed_Closing_Cost_Id
        AND Disclosed_Closing_Cost.External_Order_Request_Id      = External_Order_Request.External_Order_Request_Id
        AND External_Order_Request.Deal_Id                        = Product_Request.Deal_Id
        AND product_request.scenario_id                           = scenario.scenario_id
        AND SCENARIO.SCENARIO_STATUS_TYPE_REF_ID                  = 7206
        AND product_request.servicing_loan_acct_num              IS NOT NULL
        AND product_request.servicing_loan_acct_num               = 0017498379
          --AND Disclosed_Cost_Allocation.Disclosed_Cost_Allocation_Id = 5095263
        )
      GROUP BY DISCLOSED_CLOSING_COST.DISCLOSED_CLOSING_COST_ID,
        External_Order_Status.Status_Updated_Tmstp,
        Reference_Data.Ref_Code,
        disclosed_cost_allocation.to_be_paid_amt
      order by 3 desc,
        1 DESC;
    
    Result:
    2000     1304-1399     28-JUL-2012 19:49:47     6880959
    312     1302     28-JUL-2012 19:49:47     6880958
    76     1303     28-JUL-2012 19:49:47     6880957
    2000     1304-1399     28-JUL-2012 18:02:16     6880539
    312     1302     28-JUL-2012 18:02:16     6880538
    76     1303     28-JUL-2012 18:02:16     6880537
    
    
    But, when I try to group the timestamp using analytical function,
    
    
    select amt 
            ,cd 
            ,rank() over(partition by tmstp order by tmstp desc) rn 
    from 
    (select sum(disclosed_cost_allocation.to_be_paid_amt) amt,
        substr(reference_data.ref_code,4,10) cd,
        to_char(external_order_status.status_updated_tmstp, 'DD-MON-YYYY HH24:MI:SS') tmstp,
        DISCLOSED_CLOSING_COST.DISCLOSED_CLOSING_COST_ID id
      FROM Deal.Fee_Mapping_Definition ,
        Deal.Fee_Index_Definition ,
        Deal.Fee_Closing_Cost_Item,
        Deal.Closing_Cost,
        Deal.Document_Generation_Request,
        deal.PRODUCT_REQUEST,
        deal.External_Order_Request,
        deal.External_Order_Status,
        deal. DISCLOSED_CLOSING_COST,
        deal.DISCLOSED_COST_ALLOCATION,
        deal.reference_data
      WHERE Fee_Mapping_Definition.Fee_Code                    = Fee_Index_Definition.Fee_Code
      AND Fee_Index_Definition.Fee_Index_Definition_Id         = Fee_Closing_Cost_Item.Fee_Index_Definition_Id
      AND Fee_Closing_Cost_Item.Closing_Cost_Id                = Closing_Cost.Closing_Cost_Id
      AND CLOSING_COST.PRODUCT_REQUEST_ID                      = Document_Generation_Request.Product_Request_Id
      AND closing_cost.product_request_id                      = product_request.product_request_id
      AND Product_Request.Deal_Id                              = External_Order_Request.Deal_Id
      AND external_order_request.external_order_request_id     = external_order_status.external_order_request_id
      AND external_order_request.external_order_request_id     = disclosed_closing_cost.external_order_request_id
      AND DISCLOSED_CLOSING_COST. DISCLOSED_CLOSING_COST_ID    = DISCLOSED_COST_ALLOCATION.DISCLOSED_CLOSING_COST_ID
      AND Fee_Index_Definition.Fee_Index_Definition_Id         = Disclosed_Closing_Cost.Fee_Index_Definition_Id
      AND Fee_Mapping_Definition.Document_Line_Series_Ref_Id   = Reference_Data.Reference_Data_Id
      AND Document_Generation_Request.Document_Package_Ref_Id IN (7392 ,2209 )
      AND External_Order_Status.Order_Status_Txt               = ('GenerationCompleted')
      AND Fee_Mapping_Definition.Document_Line_Series_Ref_Id  IN ( 7789, 7788,7596 )
      AND FEE_MAPPING_DEFINITION.DOCUMENT_TYPE_REF_ID          = 1099
      AND Document_Generation_Request.Product_Request_Id      IN
        (SELECT PRODUCT_REQUEST.PRODUCT_REQUEST_id
        FROM Deal.Disclosed_Cost_Allocation,
          Deal.Disclosed_Closing_Cost,
          DEAL.External_Order_Request,
          DEAL.PRODUCT_REQUEST,
          Deal.Scenario
        WHERE Disclosed_Cost_Allocation.Disclosed_Closing_Cost_Id = Disclosed_Closing_Cost.Disclosed_Closing_Cost_Id
        AND Disclosed_Closing_Cost.External_Order_Request_Id      = External_Order_Request.External_Order_Request_Id
        AND External_Order_Request.Deal_Id                        = Product_Request.Deal_Id
        AND product_request.scenario_id                           = scenario.scenario_id
        AND SCENARIO.SCENARIO_STATUS_TYPE_REF_ID                  = 7206
        AND product_request.servicing_loan_acct_num              IS NOT NULL
        AND product_request.servicing_loan_acct_num               = 0017498379
          --AND Disclosed_Cost_Allocation.Disclosed_Cost_Allocation_Id = 5095263
        )
      GROUP BY DISCLOSED_CLOSING_COST.DISCLOSED_CLOSING_COST_ID,
        External_Order_Status.Status_Updated_Tmstp,
        Reference_Data.Ref_Code,
        disclosed_cost_allocation.to_be_paid_amt
      order by 3 desc,
        1 DESC);
    
    Result:
    312     1302            1
    2000     1304-1399     1
    76     1303            1
    312     1302            1
    2000     1304-1399     1
    76     1303            1 
    
    
    Required output:
    312     1302            1
    2000     1304-1399     1
    76     1303            1
    312     1302            2
    2000     1304-1399     2
    76     1303            2
    THX
    Rod.

    Hey, Rod,

    My guess is that you want:

    , dense_rank () over (order by  tmstp  desc)  AS rn 
    

    RANK means you'll jump numbers when there is a link. For example, if all 3 rows have the exact same last tmstp, all 3 rows would be assigned number 1, GRADE would assign 4 to the next line, but DENSE_RANK attributes 2.

    "PARTITION x" means that you are looking for a separate series of numbers (starting with 1) for each value of x. If you want just a series of numbers for the entire result set, then do not use a PARTITION BY clause at all. (PARTITION BY is never required.)
    Maybe you want to PARTITIONNER IN cd. I can't do it without some examples of data, as well as an explanation of why you want the results of these data.
    You certainly don't want to PARTITION you BY the same expression ORDER BY; It simply means that all the lines are tied for #1.

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.
    Explain, using specific examples, how you get these results from these data.
    Simplify the problem as much as possible.
    Always tell what version of Oracle you are using.
    See the FAQ forum {message identifier: = 9360002}

    Published by: Frank Kulash, August 1, 2012 13:20

  • Problem with counting function, passing VARs between functions.

    Hi guys, I have a problem with this section of code...

    Could anyone suggest how to fix the function at the bottom so that when the button forward_btn with label "go to next Point training" when you click on recalculate the fields created in the function fileLoaded

    var xmlData:XML = new XML ();
    var theURL_ur:URLRequest = new URLRequest ("xml.xml");
    var loader_ul:URLLoader = new URLLoader (theURL_ur);
    var more: RegExp = / \ + / g;
    var t:Number = 0;
    var tmax:Number = 0;

    loader_ul.addEventListener ("complete", fileLoaded);

    function fileLoaded(e:Event):void {}
    xmlData = XML (loader_ul.data);
    Tmax = xmlData.Record.length ();
    trace (tmax);

    trace (unescape (xmlData));
    trace (xmlData.Record.length ());


    var title_tp:String = unescape(xmlData.Record.TP.Title[t]).replace (, "");
    Title_TP_txt. Text = title_tp;

    var intro_tp:String = unescape(xmlData.Record.TP.Introduction[t]).replace (, "");
    Intro_TP_txt. Text = intro_tp;

    static_tp_intro.y = Title_TP_txt.y + Title_TP_txt.textHeight + 10;
    Intro_TP_txt.y = sta_tp_intro.y + sta_tp_intro.textHeight + 5;

    Title_TP_txt. AutoSize = TextFieldAutoSize.LEFT;
    Intro_TP_txt. AutoSize = TextFieldAutoSize.LEFT;
    }

    forward_btn.label = "go to the next Point training";
    forward_btn.addEventListener (MouseEvent.CLICK, next_if);

    function next_if (me: MouseEvent): void {}


    If (t == tmax) {play();  }


    else {t = t + 1;
    fileLoaded () ;}
    }

    I don't see where you have a question from vars between functions because you do not pass everything.  Maybe that's your problem.  The function fileLoaded expects an argument, but you are not providing one.  To get around that you should provide any argument being sent in the first function...

    function fileLoaded(e:Event=null):void {}

    Another option would be to separate features and put a quick end to the function fileLoaded and create another function that holds the rest of the code...

    function fileLoaded(e:Event):void {}
    xmlData = XML (loader_ul.data);
    Tmax = xmlData.Record.length ();

    processXMLData();

    }

    function processXMLData (): void {}
    trace (tmax);

    trace (unescape (xmlData));
    trace (xmlData.Record.length ());

    var title_tp:String = unescape(xmlData.Record.TP.Title[t]).replace (, "");
    Title_TP_txt. Text = title_tp;

    var intro_tp:String = unescape(xmlData.Record.TP.Introduction[t]).replace (, "");
    Intro_TP_txt. Text = intro_tp;
      
    static_tp_intro.y = Title_TP_txt.y + Title_TP_txt.textHeight + 10;
    Intro_TP_txt.y = sta_tp_intro.y + sta_tp_intro.textHeight + 5;
      
    Title_TP_txt. AutoSize = TextFieldAutoSize.LEFT;
    Intro_TP_txt. AutoSize = TextFieldAutoSize.LEFT;
    }

    forward_btn.label = "go to the next Point training";
    forward_btn.addEventListener (MouseEvent.CLICK, next_if);

    function next_if (me: MouseEvent): void {}

    If (t == tmax) {}

    Play();

    } else {}

    t = t + 1;
    processXMLData();

    }
    }

  • Problem with double FUNCTION

    Hi guys:

    I have a problem with the DUPLICATE FUNCTION.  What happens is that I have create a few BUTTONS on the stage that has been used on difference scence througth... these buttons has same action that particular point to scence page.  And that's when I found the issue of the DUPLICATE FUNCTION.

    I found that I could get out by changing the name of the FUNCTION, but as I have quite a good number of these buttons, so I really don't think not this method is handy and organized.  If anyone has a better idea how this can be solved?

    Thank you very much!

    Remove your duplicate function definitions.  There is no need of two named functions have the same name.  you only need one placed on a chassis, which plays not later than a framework where we could call this function.  That is to say, put a function named on frame 1 of the main timeline always works (so that you use the correct path of the call, if you are calling from a different timeline).

  • Problem with the function keys

    Hi a few days ago my computer did an automatic update of windows.  This combination of time keyboard shortcuts in my Microsoft Flight Simulator 2004 have changed.  For example, ctrl + any Fkey and shift-several different keys do not work.  Some commands are not options in games keyboard assignments.

    Is there a way to restore my original keyboard settings?

    Thank you...

    Are you sure that Windows Update caused this?

    Restore your computer (by using the system restore) to a previous state - before you install the updates and see if it restores the 'fn' and other features with FS 2004.

    See http://support.microsoft.com/kb/306084 (assuming you are using Windows XP, because the game is compatible with XP and legacy OS)

    If restore fixed the problem with the keys on the keyboard and FS2004, manually install the updates one: after the installation of each update, restart the computer, try to play the game and check if the problem reappears at all.

    This, until you have installed all Windows updates.

    MRI!

  • Problem with 'Less' function in LabVIEW 2015

    Hi guys,.

    I create a VI that will allow me to record data at intervals of time du.1.2.3,.4,.5,.6,.7,.8,.9, 1, 2, 3, seconds etc 4 or 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20 or 30 seconds etc. According to my my main VI entry.

    In VI I joined, I maintain a case down and a case of rocker. I went through the case maintain down with execution of climax, and it seems to be ok. My problems begin when you use the rocker case. If I start time Stress control to 0, it increments a.1.2.3,.4,.5,.6,.7,.8.9 and 1 as expected. However, when he goes from ajouter.1 in the structure of cases where it is supposed to start adding 1, he eventually add un.1 and a 1 for the first time, then continue to add 1 as expected. I go back into the code and when I turn on highlight execution with a 1 coming from the shift register is to enter the function ' below to "in the structure of the bottom case and it generates a real when it must produce a fake. My case top of page structure also produces a zero when it should start out 1.

    Can someone please run this code and see if the problem exists for them to preserve my sanity? Or am I just being a fool and lack of something obvious because of a crossover cable or something?

    Thanks for your help

    Basically, you have several choices:

    • Make sure the floats an 'accurate' (= whole) value (for example, by multiplying by 10, and by changing the result to I32, the last step is necessary because only the integer representation allows accurate digital comparisons
    • do the strings of floats with defined accuracy
    • write (and use) a "almost equal" function (subtract the value you are testing of the float, take the absolute value and see if)<0.0001, or="" whatever="" precision="" you="">

    Of these, the last is likely to be (by far) the fastest and "" will remind you that decimal values generally are 'approximations' (you can represent 0.25, 0.5, 0.125, etc. exactly, but not 0.1, for example).

    Bob Schor

  • Help for problems with the functionality of Capture from Adobe

    Hello

    I recently installed Adobe Capture on my Smartphone (Android device) and the app is very cool.  However, after a few weeks of use, the software stops working.  I uninstalled the software and reinstalled to see if that would help solve the problem.  Unfortunately, it has not solved the problem.  Adobe does not provide an over-the-phone technical support for this product, so I hope someone here can help.

    Recreation of question:

    When you start the application, there are four 4 functions:

    1. Colors
    2. Forms
    3. Brushes
    4. Looks like

    In the lower right corner of the screen, we see a sign '+', which, depending on which function you select, invite the user to 1) select from the cloud or 3) take a new photo 2) select a picture in the camera.  When you select an option, Adobe Capture executes the designated function and the State final changes / outputs on the picture are visible.

    However, when you try to accept or to save changes / outputs, the screen seems to hang up and return to the initial splash screen.

    Can provide you any assistance?

    Thank you!

    Jerry

    Hi Jerry,

    I'm really sorry that capture does not work as it should. This is a known issue in the app and the team is working on a beta version with a fix. I hope that it will be available before the end of the week, but I'm not totally sure of the timeline.

    I know we'll get it on Adobe Android Apps - community - Google +, then join this page and you will be informed as soon as it is available.

    A couple of other things:

    It's an incredible description of the problem you are experiencing. Thank you very much for going into details so. It makes a huge difference when engineers are trying to understand what is happening.

    If please post here or contact us through the app (tap on the draw icon, then give us Feedback) whenever you need help. Sometimes on the weekends, I'm a little slow, but during the week, I'm trying to reach people as quickly as possible.

    I hope this helps.

    Sue.

  • I have a problem with the function of brush in Photoshop CC

    In recent weeks, I noticed decreases performance in Photoshop CC when you use the brush on the layer masks and adjustment.  It takes an extremely long time for changes to take place.  Please forgive my lack of terminology appropriate in trying to describe my problem, but, for example, I just used my brush on a layer mask.  After you move the brush on the parties of the photo I want to change, a circle of rotation appears as adjustment.  This last time, after having a past more than half of a picture, at 70% opacity, it took more than 4 minutes for the course ends.  All other functions in Photoshop, including all my plug-ins, seem to function normally.  My computer seems to work fine in all other respects, both in Photoshop when using any other program or software.  The problem seems to be limited exclusively to the brush functions in Photoshop.  I noticed it first on a 4 weeks ago, and it gets progressively worse.  I have an Asus gaming laptop computer with processor Quad Core i7, 24G of RAM.  I'm not super computer, savvy, then keep as simple as possible answers would be much appreciated!  Anyone have any ideas or have experienced this same problem?

    Thanks in advance for your answers.

    Trent

    Hi Trent,

    Greetings.

    • Do you use a Wacom?
    • Make sure that your PS is up-to-date.
    • Preferences open PS - - Performance - uncheck the box use a graphics card and then restart PS and see if this is the case for you.
    • Also try to reset tools

    • Try resetting the PS preferences

      • To restore preferences quickly by using a keyboard shortcut: press and hold Alt + Ctrl + Shift (Windows) or Option + command + shift (Mac OS) when you start Photoshop. You are prompted to delete the current settings. New preferences files are created the next time you start Photoshop.

    Let us know if this helps

    Concerning

    Rohit

  • Problem with SaveAs function using random paths.

    The installation program:

    Part 1) I have a script to the folder level that allows me to exercise a SaveAs function within forms. I'm doing this as a way to save the document quietly in the background. The effect is that the file is replaced with a copy of itself. The script is:

    var mySaveAs = app.trustedFunction (function (oDoc, cPath, cFlName)

    {

    app.beginPriv ();

    cPath = cPath.replace(/([^\/])$ /, ' $1 / ');

    try {}

    oDoc.saveAs (cPath + cFlName);

    } catch (e) {}

    App.Alert ("error during save it");

    }

    app.endPriv ();

    });

    Part 2) of my documents, I have to check by calling the function below:

    function runSave()

    {if (typeof (mySaveAs) == 'function') {}

    var pathArray = this.path.split("/"); "

    var myFileName = pathArray [pathArray.length - 1];

    cPath var = this.path.slice(0,myFileName);

    mySaveAs (this, cPath, myFileName);

    } else {}

    App.Alert ("Missing Save Function\n" + "Please contact forms administrator");

    }

    }

    Part 3) I have several large forms that use automatic recording to call save work according to a time interval of 5 minutes, using:

    app.setInterval (runSave (), 300000);

    The problem:

    Part 1) automatic backup function works very well and it works silently in the background. However, I started having problems when I open two forms at the same time. If, for example, I have a form of an open folder and open a form from a second folder, the save feature will sometimes save the active document in its original folder (as expected, crashing and creating an automatic registration) or sometimes save to original folder of the second document. This leaves me a copy update (automatic check) of the document in the right folder, and a copy not updated in the original folder. This seems to vary on what document I opened finally or document that is currently active. Although I can't find the right combination.

    It's like thinking what is to confuse the "this.path.

    Part 2) worse, if two documents have the same name, as is often the case with these forms, any incorrect saving deposit causes a crash of the second document and data loss.

    Part 3) makes it maddening, as sometimes happens when no record or the second second document is open. Instead, damaging it saves the active document in a recently viewed folder. For example, I'm going to open a local folder and open a Word doc, close the file and the doc, go to another folder in a different root (a folder in network), open the form and automatically saves it on the local computer in the folder with the Word doc. So now not only do I have a copy not updated in my folder, I have no idea where the updated copy was actually saved to until I met some time later.

    Part 4) once again, worse still, the previously viewed folder could happen which contains a document with the same name, and that the document is crushed by the automatic backup. I have no idea that the form was crushed until I sometimes open a little later and see that it contains a completely different form data.

    What is happening and how it stop?

    Adobe Acrobat X Pro on a PC.

    The code for this tutorial is unfortunately wasn't working, I discovered recently.

    This is my own personal code for a trust saveAs method. Note that it takes 2 parameters, not 3.

    safeSaveAs = {app.trustPropagatorFunction (function (doc, vPath)}

    app.beginPriv ();

    doc.saveAs({cPath:vPath});)

    app.endPriv ();

    });

    myTrustedSaveAs = {app.trustedFunction (function (doc, vPath)}

    app.beginPriv ();

    safeSaveAs (doc, vPath);

    app.endPriv ();

    });

    You call it like this:

    myTrustedSaveAs (this, "/ c/temp/test.pdf");

  • problem with the function 'higher Arc.

    Hello

    This is my first post here so I hope I'm doing this right...

    I added a screenshot to clarify my problem. As you can see in the picture, "Kick it up!" he shows a good top arch - only the upper part is passable and the lower part remains level. However, when I try to use the function 'Upper arch' to my own text, as you can see with the little 'dhfghfhj', the lower part is passable upward as well!

    When I try this on computers at school, it works correctly. So, what I'm doing wrong here? How to do the lower part remains unchanged? Is something wrong with my copy of Illustrator?

    Thanks in advance,

    koekedozekes

    koekedozekes,

    If you want the base to stay straight line, you can:

    (1) object > transform > rotate (180) or (vertically) reflect a copy and place so that baselines are equivalent;

    (2) set the opacity of the copy on 0 in the transparency palette.

    (3) group and apply the effect > Warp > bulge.

  • help - problem with a function

    There's a good scenario Kasyan here he prepared for one of my tasks / a special workflow:

    Imagine that you have a document with a hundred pages and all pages contain an image and a text box with individual photo credit / description.

    The script is paste each image text box in the description of the images via the bridge - great, fast xmp and I have never seen anything like this elsewhere

    Now, there's a problem: the script removes all forms of breakts hard/new line the credit, but I need sometimes.

    I'd like to get rid of the ReturnWithSpace function, but it seems that it is a bit more complex.

    Here is the complex function...

    function ReplaceReturnWithSpace (myString) {}
    myString = myString.replace (/ \n/g, "");
    myString = myString.replace (/ \r/g, "");
    return myString;
    }

    Here's the complete script - maybe someone can help you:

    indesign #target

    myDoc var = app.activeDocument;
    mySelection var = app.selection;

    If (mySelection.length == 0) {}
    ProcessPages();
    }
    Else if (mySelection.length == 1) {}
    Alert ("a picture and a textframe must be selected.");
    Exit();
    }
    Else if (mySelection.length == 2) {}
    try {}
    If (. constructor.name mySelection [0] == 'TextFrame' & &. images.length mySelection [1] == 1) {}
    var myTextFrame = mySelection [0];
    var myImage = .images mySelection [1] [0];
    var myCaption = ReplaceReturnWithSpace (myTextFrame.contents);
    var myPath is new file (myImage.itemLink.filePath) .absoluteURI;.
    }
    ElseIf (. constructor.name mySelection [1] == 'TextFrame' & &. images.length mySelection [0] == 1) {}
    var myTextFrame = mySelection [1];
    var myImage = mySelection .images [0] [0];
    var myCaption = ReplaceReturnWithSpace (myTextFrame.contents);
    var myPath is new file (myImage.itemLink.filePath) .absoluteURI;.
    }
    }
    {catch (e)}
    Alert ("something wrong with your selection. ("\nError:" + e.message);
    Exit();
    }

    CreateBridgeTalkMessage (myCaption, myPath);
    }
    ElseIf (mySelection.length > 2) {}
    Alert ("a picture and a textframe must be selected.");
    Exit();
    }

    UpdateAllOutdatedLinks();
    myDoc.save ();
    Alert ("All done.");

    //+++++++++++++++++++ FUNCTIONS ++++++++++++++++++++++

    function CreateBridgeTalkMessage (myCaption, myPath) {}
    var bt = new BridgeTalk();
    BT. Target = "bridge."
    var myScript = WriteCaption.toString () + "\r";
    myScript += ' WriteCaption (\ "" + myCaption + ' \ ", \"' myPath + "\"); ";
    BT. Body = myScript;
    BT. Send();
    }

    function WriteCaption (myCaption, myPath) {}
    If (xmpLib == undefined) {}
    If (Folder.fs == "Windows") {}
    var pathToLib = "/ C/Program Files/Adobe/Adobe Bridge CS3/AdobeXMPScript.dll";
    }
    else {}
    var pathToLib = "/ Applications/Adobe Bridge CS3/Bridge CS3.app/Contents/MacOS/AdobeXMPScript.framework";
    }
    libfile var = new file (pathToLib);
    var xmpLib = new ExternalObject ("lib:" + pathToLib);
    }
    var thumb = new thumbnail (file (myPath));

    If {(thumb.hasMetadata)
    var md = thumb.synchronousMetadata;
    var = new XMPMeta XMP (md.serialize ());
    xmp.deleteProperty (XMPConst.NS_XMP, "Description");
    xmp.setProperty (XMPConst.NS_XMP, "Description", myCaption);
    var updatedPacket = xmp.serialize(XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER |) XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
    Thumb.Metadata = new Metadata (updatedPacket);
    }
    }

    function ProcessPages() {}
    myPages var = myDoc.pages;
    for (i = 0; i < myPages.length; i ++) {}
    var myPage = myPages [i];
    If (myPage.textFrames.length == 1 & & myPage.rectangles.length == 1) {}
    If (myPage.rectangles [0].graphics.length == 1) {}
    var a = myPage.rectangles [0];
    var myImage = myPage.rectangles [0] .graphics [0];
    var myPath is new file (myImage.itemLink.filePath) .absoluteURI;.
    var myTextFrame = myPage.textFrames [0];
    var myCaption = ReplaceReturnWithSpace (myTextFrame.contents);
    CreateBridgeTalkMessage (myCaption, myPath);
    }
    }
    }
    }

    function ReplaceReturnWithSpace (myString) {}
    myString = myString.replace (/ \n/g, "");
    myString = myString.replace (/ \r/g, "");
    return myString;
    }

    function UpdateAllOutdatedLinks() {}
    for (var myCounter = myDoc.links.length - 1; myCounter > = 0; myCounter-) {}
    myLink var = myDoc.links [myCounter];
    If (myLink.status == LinkStatus.linkOutOfDate) {}
    myLink.update ();
    }
    }
    }

    If I can make a comment, the XMPScript API is separate from the bridge DOM, if your script could avoid to call bridge.

    InDesign is able to load the required library - new ExternalObject('lib:AdobeXMPScript') - and to deal directly with the XMP data.

    Then we can really simplify the code. Try this:

    TextFrame.prototype.getCaption = function()
    // Here you can customize the caption written in XMP
    {
    // old behavior :
    // return this.contents.replace( /[\n\r]/g , " " );
    
    // contents as it (keeping newlines) :
    return this.contents;
    }
    
    Document.prototype.getScope = function()
    { // return the array of {txf,img} objects to process
    var scope = [], pages = this.pages;
    for ( var pg, p = pages.length-1 ; p >= 0 ; p-- )
         {
        pg = pages[p];
         if ( pg.textFrames.length != 1 ) continue;
         if ( pg.rectangles.length != 1 ) continue;
         if ( pg.rectangles[0].images.length != 1 ) continue;
         scope.push({txf: pg.textFrames[0],img: pg.rectangles[0].images[0]});
        }
    return(scope);
    }
    
    Application.prototype.main = function()
    {
    if ( this.documents.length<=0 )
         {alert("Think to open a document!");return;}
    
    var scope, sel = this.selection;
    switch(sel.length)
         {
         case 0 :
              scope = this.activeDocument.getScope();
              break;
         case 2 :
              scope = ( function()
                   {
                   var t = (sel[0].constructor == TextFrame) ? 0 :
                        ( (sel[1].constructor == TextFrame) ? 1 : false );
                   if (t===false) return(null);
                   if ( sel[1-t].images.length != 1 ) return(null);
                   return [{txf: sel[t], img: sel[1-t].images[0]}];
                   } )();
              if (scope) break;
         default :
              alert("One image and one textframe should be selected.");
              return;
         }
    
    if (ExternalObject.AdobeXMPScript == undefined)
         {
         try {ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');}
         catch(ex) {alert("Unable to load the AdobeXMPScript library"); return;}
         };
    
    var txfImg, iLink, iFile, xmpFile, xmp;
    var err=0, cpt=0;
    while (txfImg=scope.pop())
         {
         iLink = txfImg.img.itemLink;
         try {iFile = new File(iLink.filePath);}
         catch(ex) {err++;continue;}
    
         xmpFile = new XMPFile(iFile.fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE);
    
         xmp = xmpFile.getXMP();
         xmp.deleteProperty(XMPConst.NS_XMP, "Description");
         xmp.setProperty(XMPConst.NS_XMP, "Description", txfImg.txf.getCaption());
    
         if (xmpFile.canPutXMP(xmp)) { xmpFile.putXMP(xmp); cpt++;} else err++;
         xmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);
    
         if (iLink.status == LinkStatus.linkOutOfDate) iLink.update();
         }
    
    alert(''+cpt+" image descriptions updated -- "+err+" errors.");
    
    try{this.activeDocument.save();}
    catch(ex){}
    }
    
    app.main();
    
  • Problem with print function

    Hello

    I have a clip I want to apply the function to draw lots to (so I can save an image of her). Everything works fine, but now, the problem comes when inside that movie clip I have another, with an image loaded and scaled.

    The draw function we will works perfectly, except for the fact that the clip that is inside one I do the draw did not go to bracts, it renders as it is on the library...

    I read something about using a matrix transformation to it, but can't make it work...

    Any help?

    Thank you

    Javier

    Yes, that would be solved if you have used the matix correctly:

  • Problems with a function replace

    May of you guys please tell me what I'm doing wrong here. I have 3 sets of characters that word product that I need to replace mine before getting into the DB. Here are the characters.

    & mdash; Delete this dashboard with -

    & rsquo; Remove the apostrophe with '

    & ldquo; "Remove the left quotation mark with.

    & rdquo; "Remove this double quote with."

    My problem is that the replace() function only gets the first occurrence and replaces. Not all occurrences. How can I replace all occurrences? Here is my code.

    I thought about it. Missed me the parameter ALL.


    Form.test = replace (#form.test #, "-","-", "ALL");
    Form.test = replace (#form.test #, "'", "" "," ALL");
    Form.test = replace (#form.test #, "" "," "", "ALL");
    Form.test = replace (#form.test #, "" "," "", "ALL");

Maybe you are looking for