Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hello everyone,
is possible to open file and write text into? I am trying something like this, but of course it does not work:
$scope.writeToLogFile = function (text){ var txtFile = "Uploaded/log.html"; var file = new File([''], txtFile); file.open('w'); // open file with write access file.writeln(text); file.close(); }
My idea is about creating a log file for viewing changes.
Thanks for every tip
Tomas
Solved! Go to Solution.
I have not tried this but given other things i have tried and run into security restrictions i don't think this is going to be possible. It doesn't seem there is any persistent storage available.
I have used a text area 2D widget as a debugger window in the past when i needed debugging on a device.
I more elaborate solution would be to push your messages out to a server with a POST call.
I have not tried this but given other things i have tried and run into security restrictions i don't think this is going to be possible. It doesn't seem there is any persistent storage available.
I have used a text area 2D widget as a debugger window in the past when i needed debugging on a device.
I more elaborate solution would be to push your messages out to a server with a POST call.
Thank you jmikesell,
The Text Area is the best way for me. It enable use tabs \t end of line and \r\n for creating a structure in "log console".
Tomas
We have done some capturing of info from an AR experience by writing this back into ThingWorx as it's kind of designed to work this way. From there we could then display this data in a mashup or export it out to disk. Obviously this way adds more components to the system (and $) but it works quite well just using some of the services that you create in ThingWorx.
In our example we were capturing the time taken for each step as a user follows an AR service instruction to generate a report on how long they took.