You are not logged in.

Fernando

Intermediate

  • "Fernando" started this thread

Posts: 330

Location: Habana, Cuba

Occupation: Architect, Photographer.

  • Send private message

1

Thursday, May 24th 2018, 1:59am

[solved] Problem using calc with loadpano

Hi, this works ok:
loadpano(html/hosp_hlibre/tour.xml,null,MERGE|REMOVESCENES,null);
but it doesn't:

Source code

1
loadpano(calc('html/'+get(data[1].content)+'hosp_hlibre/tour.xml,null,MERGE|REMOVESCENES,null'));


I even tried this just to be sure, but it doesn't work either:
loadpano(calc('html'+'/hosp_hlibre/tour.xml,null,MERGE|REMOVESCENES,null'));

What is wrong in my code?

Thank for your help,

Fernando

edit:
the code real was: loadpano(calc('html'+'/hosp_hlibre/tour.xml,null,MERGE|REMOVESCENES,null'));

This post has been edited 3 times, last edit by "Fernando" (May 24th 2018, 3:56pm)


spacerywirtualne

Professional

Posts: 1,117

Location: Poland, Europe

Occupation: krpano developer : virtual tours : the cms4vr owner

  • Send private message

2

Thursday, May 24th 2018, 9:22am

Have you tried without a GET?

loadpano(calc('html/'+get(data[1].content)+'hosp_hlibre/tour.xml,null,MERGE|REMOVESCENES,null'));

in a way

Source code

1
loadpano(calc('html/'+data[1].content+'hosp_hlibre/tour.xml,null,MERGE|REMOVESCENES,null'));



Piotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

3

Thursday, May 24th 2018, 10:18am

Hi,

calc() or get() could be only used for ONE parameter, but not for ALL parameters at once.

And right - get() is not necessary there.

Here correct:

Source code

1
loadpano(calc('html/'+data[1].content+'hosp_hlibre/tour.xml'),null,MERGE|REMOVESCENES);


But also note because trying to load a tour.xml - the default vtourskin.xml is NOT designed for loading other tours.

Best regards,
Klaus

Fernando

Intermediate

  • "Fernando" started this thread

Posts: 330

Location: Habana, Cuba

Occupation: Architect, Photographer.

  • Send private message

4

Thursday, May 24th 2018, 12:37pm

Thanks very much Piotr and Klaus, i see my error with "(get..." but it no works yet:

If this works fine:


loadpano(html/hosp_hlibre/tour.xml,null,MERGE|REMOVESCENES,null);

loadscene(get(scene[0].name));

Why this not?

loadpano(calc('html/'+data[1].content+'/tour.xml'),null,MERGE|REMOVESCENES,null);


data[1].content was created from:

Source code

1
<action name="crealistalugares">for(set(i,0), i LT hotspot.count, inc(i), if(hotspot[get(i)].grupo == lugares,set(data[get(hotspot[get(i)].name)].content,get(hotspot[get(i)].name));  trace(data[get(hotspot[get(i)].name)].content););); </action>




The trace was ok:
INFO: hosp_hlibre


The error is:
FATAL ERROR:
html/undefined/tour.xml loading failed! (404)

*confused* What is wrong now?

Best regards,
Fernando

This post has been edited 1 times, last edit by "Fernando" (May 24th 2018, 1:19pm)


Fernando

Intermediate

  • "Fernando" started this thread

Posts: 330

Location: Habana, Cuba

Occupation: Architect, Photographer.

  • Send private message

5

Thursday, May 24th 2018, 3:43pm

solved

Source code

1
txtadd(myfolder, 'html/', get(data[0].content), '/tour.xml');loadpano(get(myfolder),null,MERGE|REMOVESCENES,null);loadscene(get(scene[0].name));


The solution is to use txtadd instead calc, inspired in this klaus answer: https://krpano.com/forum/wbb/index.php?p…58337#post58337

txtadd(myfolder, 'html/', get(data[0].content), '/tour.xml');
loadpano(get(myfolder),null,MERGE|REMOVESCENES,null);
loadscene(get(scene[0].name));


Best regards,
Fernando

This post has been edited 1 times, last edit by "Fernando" (May 24th 2018, 3:55pm)