cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

I need load a content from xml doc in composer to vuforia studio

Nithin
11-Garnet

I need load a content from xml doc in composer to vuforia studio

Hi,

I aM exploring a new option to load content(possibly a xml file) from thingworx composer to vuforia studio.
I want a specific description of tag from xml to be depicted as a label in vuforia studio.
Can i get some help on this if above use case is possible.

Regards,
Nithin Kashyap
2 REPLIES 2

Hi @Nithin ,

 

I am not sure what is the exact goal in your application case.

So far you can pass a xml file (or any files) from a Thingworx repository witht the methods Load XML but also LoadJSON (json) LoadText (ascii chars), LoadImage (pictures) and LoadBinary (for any file format)

So this means if you have e.g. an xml file in a Thingworx repository you can sent it to Vuforia Studio and received it into memory variable.

When the data is not in repository you can:

- save the data first there e.g. for xml format SaveXML  (mehtod of a Thing which is inheriting the FileRepository Template) or SaveBinary (for any file format ... also xml)

Another option to define your own service which output xml - e.g. picture below:

So we can see that there are some options to sent the xml data to vuforia Studio  - it will be received in the ServiceName-complete event --> example:

 

2020-11-17_11-58-53.gif

 

We can see that there are some options to sent the xml data to Vuforia Studio  - the xml data will be received in the ServiceName-complete event --> example:

$scope.$root.$on('LoadXML-complete', function(event, args) {
 console.log("$scope.$root.$on('LoadXML-complete'");
  console.warn(args);
});
 

 

here the args will contains the whole xml file string. So, you can use any XML parse techniques to find the correct tags. e.g.:

 

https://community.ptc.com/t5/Vuforia-Studio/Read-XML-File/m-p/636378#M7126

and 

https://www.w3schools.com/xml/default.asp

 

 

Hi Roland,

I need one of the tags description to come over as a text of 3d label in VR and as in label in 2d panel for AR.
If it is possible . can you help me with the script with sample xml?
I am new to this xml.
Thanks for considering.

Regards,
Nithin

Announcements

Top Tags