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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Start functions AFTER model load from repository

GianVal
15-Moonstone

Start functions AFTER model load from repository

Hello, 

I'm getting the pvz file for my AR experience from an HTTPS repository (experience service).

I want to execute the rest of the javascript functions I wrote into vuforia studio source code (e.g. metadata load, button customization through metadata ecc.) only AFTER the model load is complete.

How to perform this task? Any advice? many thanks

1 ACCEPTED SOLUTION

Accepted Solutions
whity
16-Pearl
(To:GianVal)

Did you try this:

$rootScope.$on('modelLoaded', function() {
$scope.yourFunctions();
});

View solution in original post

2 REPLIES 2
whity
16-Pearl
(To:GianVal)

Did you try this:

$rootScope.$on('modelLoaded', function() {
$scope.yourFunctions();
});

Hi @GianVal ,

when you load a file from repository (TWX or other) - this will not add the metadata to the download folder. 

At the current time when you import the data using the UI this will - allow to  select the option  in UI to add the meta data

 

2022-02-18_14-24-10.jpg

 

So far I know PTC dev planned to create an offline procedure which will allow to extract the metadata from pvz outside Studio but I have no information what this tool will be available. 

When a model is imported to Studio folder with the option allow metadata - in this case Studio will extract he data to a file >modelName>.json and will add this file to the model folder. Based on this json file we can use the metadata API or access it directly as json object.

 

For your case the workaround will be , to extract the json file for each model which is added to repository and to upload this json on the server. So that when you load a model from a repository you have then also to load the corresponding json file (which was previously extracted by Studio UI. I hope that soon we will be able to extract the model via offline tool in batch mode

==

my answer here is more related to the post  

Top Tags