You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

jeromebg

Professional

  • "jeromebg" started this thread

Posts: 803

Location: Angers - France

Occupation: Photographer

  • Send private message

1

Monday, January 5th 2015, 9:17am

addhotspot(auto);

Maybe it's already possible but I didn't found how ?
addhotspot with an automatic name ?

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

2

Monday, January 5th 2015, 4:06pm

You can simply postpend a number to a predefined text string using an action and variable to keep your order.
Any reason for this? It may be helpful to provide better advice.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

jeromebg

Professional

  • "jeromebg" started this thread

Posts: 803

Location: Angers - France

Occupation: Photographer

  • Send private message

3

Monday, January 5th 2015, 4:18pm

Thanx Sacha, yes that's an idea !
I'm trying to "make" a hotspot editor for a client with add hotspot, select hotspot style between 5 predefined styles, and the possibility to remove hotspot...
No one has a code ready for this ?
Thanx !!!

4

Monday, January 5th 2015, 5:06pm

Hi,

just an automatic name doesn't make sense - there would be no way to access the new hotspot when it's name isn't know.

You could do something like this - use a custom text plus the number of current hotspots as new name:

Source code

1
2
3
4
5
6
txtadd(hsname, 'autohs_', get(hotspot.count));
addhotspot(get(hsname));
set(hotspot[get(hsname)].url, ...);
set(hotspot[get(hsname)].ath, ...);
set(hotspot[get(hsname)].atv, ...);
...


Best regards,
Klaus

jeromebg

Professional

  • "jeromebg" started this thread

Posts: 803

Location: Angers - France

Occupation: Photographer

  • Send private message

5

Monday, January 5th 2015, 5:09pm

Great Klaus, I was just missing hotspot.count !
Thanx a lot !!!