Community
Showcase Forum
Welcome to Autodesk’s Showcase Forums. Share your knowledge, ask questions, and explore popular Showcase topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

html UI problems

20 REPLIES 20
Reply
Message 1 of 21
Anonymous
779 Views, 20 Replies

html UI problems

Hello everyone!
I'm new here so in the beginning i apologize if this was already asked, but i surfed the forum a bit and didn't find answers..

I have a problem with the html ui option..
I'm using sc13 and an html generated by hand via notepad (right now i don't own a dreamweaver license on my job pc)..
I have a few porblem with the "on click" tag used to send more than one message with one click, as suggested by the sc guide..
Problem is that, while with my workstation it works fine, with my boss' laptop it doesn't..
Any message sent via onclick does not execute.
It's big deal since we use the laptop for the presentations..
I've copyed all the configuration files and plugins used on the ws on the laptop, still not working, i guess it' a browser related problem..
What browser does sc use? It's an internal one or just IE? If it'internal where can i find properties and configuration?

Sorry for any typo, writing from mobile browser
20 REPLIES 20
Message 2 of 21
Anonymous
in reply to: Anonymous

another thing i noticed is that internet explorer blocks the scripts too, giving the following message
http://www.maxi-pedia.com/web_files/images/Explorer_Error_Scripts_are_usually_safe.png

i've tryed several options in the internet security setups, but nothing has changed..
using the workstation, where this problem does not happens, this message does not show, and IE settings seems to be the same.
could the problem be related to this IE filter?
or, again, SC uses an integrated browser?

______________________________
edit:
since the laptop was the boss' one, i was loged with his user..
so i've tryed to log in with mine (company network ❤️ ), since the operation was supposed to load my IE user settings..
this correctly happened and the script error in IE stopped to appear, and, therefore, also the problem in showcase got solved..

so, yes, SC uses IE for the HTML interface, and it's user settings..
now i need to understand how to solve my boss' IE problems, but it is probably related to the fact that IE writes the settings in the registry and our windows users have the registry edit option disabled by the administrator 😐

p.s.
asking question and self answering is always cool
8-)
Message 3 of 21
MarionLandry
in reply to: Anonymous

Hi,
I will suggest few things here. Since it is working on your computer but not on the other computer (your boss), that forces me to think that the file is fine but the computer uses different parameters.

So, on the computer where the file is not working, try the following:

1- delete the user preference file : Documents\Autodesk Showcase 2013. Delete the complete folder.
2- Update the internet explorer to the latest browser.

Hope this does the trick!
Marion
Message 4 of 21
Anonymous
in reply to: Anonymous

Hi,

I'm having a go at a custom interface (html). I have got it doing everything I want within showcase (changing alternatives, playing slides etc etc...) but I also want to have links to technical information for my products in there - These would be PDF's either saved locally or on the server.

I firstly tried doing this just through a standard html link but I'm not having any luck ( it works when testing in my internet browser but not in the showcase ui browser).
So I have now started looking at the command messages, BROWSER_NAVIGATE_URL in particular to see if I can get showcase to open the files for me. Again I'm not having any luck, but I freely admit to being an absolute beginner in both HTML and showcase customization.

If someone could point me on the right path I would be massively appreciative.

Thanks,

EDIT-------------

I managed to get it working using the BROWSER_NAVIGATE_URL method after lots of playing around with my syntax.
Happy now!

Thanks
Mike
Message 5 of 21
msreckovic
in reply to: Anonymous

Out of curiosity, when specifying the custom UI in the Showcase dialog, are you using file:// or http://localhost:5555/ syntax? Both work, but use different syntax inside the html file. The benefit of going with the http approach is that you can then take the same custom UI html file and run it on a separate browser, outside of Showcase, or for that matter on another device completely.
Message 6 of 21
Anonymous
in reply to: Anonymous

Hi,

I'm having a go at a custom interface (html). I have got it doing everything I want within showcase (changing alternatives, playing slides etc etc...) but I also want to have links to technical information for my products in there - These would be PDF's either saved locally or on the server.

I firstly tried doing this just through a standard html link but I'm not having any luck ( it works when testing in my internet browser but not in the showcase ui browser).
So I have now started looking at the command messages, BROWSER_NAVIGATE_URL in particular to see if I can get showcase to open the files for me. Again I'm not having any luck, but I freely admit to being an absolute beginner in both HTML and showcase customization.

If someone could point me on the right path I would be massively appreciative.

Thanks,

EDIT-------------

I managed to get it working using the BROWSER_NAVIGATE_URL method after lots of playing around with my syntax.
Happy now!

Thanks
Mike


just use the "onlick" syntax instead of the simple href one..
it allows multiple commands and get urls.

(a href="#" onClick=
"document.location = 'autodesk:MESSAGE1:param1,param2';
document.location = 'autodesk:MESSAGE2:param1,param2';
document.location = 'autodesk:MESSAGE3:param1,param2';"
Click me to send three messages.)
(/a)

(manually replace parenthesis with the needed <> )
in one of the message you can put document.location='yourfile.pdf'
and your file will open in the showcase browser window, i think..
you'd better translate your pdfs into html pages.

i use this to create hypertextual interfaces
Message 7 of 21
Anonymous
in reply to: msreckovic

ahhhh... I was completely unaware of that so thank you very much. I can imagine big smiles with this, a smartboard, and the bosses who like to get their ipads out for no reason whatsoever.

Cheers
Message 8 of 21
Anonymous
in reply to: Anonymous

oh yeah, no need for the BROWSER_NAVIGATE at all. Thanks.
Message 9 of 21
Anonymous
in reply to: Anonymous

Hi,

 

I have just got back to showcase after quite a long time. I used your suggestion previously and had showcase running full screen with my interface working from my phone.

Unfortunately, after the long break I'm back to square one with this web talk stuff!! 

 

Lets say for example my custom UI is at C:/Showcase/Interface/Index.html.

What path do I need to add within showcase after the http://localhost:5555/?

and what do I stick in the browser?

I have the default blue page working where I can switch to wireframe etc... just cannot for the life of me remember how to change that for my own.

Any help appreciated.

Thanks

Mike

Message 10 of 21
cikho
in reply to: Anonymous

hi, this is still me! 😛

 

you have 2 possibilities.

 

1. move your interface to documents/showcase/webroot or something like that, which is basically the default location..

 

2. set an environment variable and select the path you want:

 

  • right click on "computer" from start menu
  • on the right you'll find advanced option
  • in the window opened, select environment variables, on the bottom right corner
  • create a new variable (if it's only related to your user, create this in the user variables, if it's for everyone using the pc, create it in the system variables)
  • type these:

                 name -    Showcase_WEB_ROOT

                 value -     your path (without the file html, so for example c:/interface/ )

 

at this point in both cases just type localhost:5555 from the same pc or ipadress:5555 for remote control (ipadress is something like 192.168.1.1) as you probably know you can check it in cmd with the ipconfig command

 

 

_________________________________________________________

almost a showcase PRO user 😛

if you find my post useful, please give kudos or mark as solution 😄
Message 11 of 21
Anonymous
in reply to: Anonymous

Thanks a lot, that's got my page up - but I have no recollection of ever doing either of those things last time... I'm losing my marbles!

 

My issue now is that showcase is not responding to any of my clicks on the interface (these all work fine when running in the showcase window)

I'm baffled again as this is the same interface that did work a year ago. I might possibly have been using 2012 then and I'm on 2013 now - possible reason?

 

In any case, I think the external interface might be on the scrapheap as I just tried setting it up on the laptop which will only have showcase viewer, and it's looking like that feature is not included/supported. The interface works fine within viewer though so it's not the end of the world, just would have been nice to maximise screen space for the demo.

 

Cheers

Message 12 of 21
cikho
in reply to: Anonymous

yes, the showcase viewer does not have the ajax server module that makes the UI able to communicate with showcase.

 

also external and embed UIs does not share the same coding, so the page you're using in an external UI should not work in the embed and vice versa.

the embed one, uses the autodesk protocol which is something dedicated to showcase.

the external UI needs a javascript function send_message() which is contained in the xmlhttp.js file, which must be recalled in the <head> tag of every web page of the UI

_________________________________________________________

almost a showcase PRO user 😛

if you find my post useful, please give kudos or mark as solution 😄
Message 13 of 21
Anonymous
in reply to: cikho

OK, thanks for the pointers. Looks like I have a lot to get my head around. I thought it was simple but must have been dreaming... or drunk??!!....
Message 14 of 21
cikho
in reply to: Anonymous

maybe this can help to figure out what to do

 

 

https://dl.dropboxusercontent.com/u/14639924/ShowcaseHowto.zip

_________________________________________________________

almost a showcase PRO user 😛

if you find my post useful, please give kudos or mark as solution 😄
Message 15 of 21
Anonymous
in reply to: cikho

Brilliant! That looks very useful. Thanks a lot
Message 16 of 21
Anonymous
in reply to: cikho

Hi again 😄

Do you know if it is possible to open a specified new file through an embedded interface?
I have been playing around with APPLICATION_LOAD_SCENE but the best I can get it to do is crash.
Thanks
Message 17 of 21
cikho
in reply to: Anonymous

sure you can!

first of all i sujest to run showcase in console mode, with the echomesagge plugin working.

this basically show every code showcas recive/uses in the console, so you know twhat happens when you lounch a command through the interface, or what command showcase uses when you do something inside the SC ui

__

 

1.open showcase, go to file -> add-in manager..

browse for the echomessagecustom add-in and select it.

as an additional option you can also add the internal message custom..

 

the first addin makes showcase show a sort of log file of every action it does into the console.

the second one can be usefull as a reference for messages you can send using the UI.

 

now close showcase.

 

2.run showcase in console mode..

go to c:/programs/autodesk/showcase/bin and find the showcaseconsole.exe.. create a link to desktop and run it..

 

this will basically open a small "dos like" consolle in which showcase shows all the messages it uses or recieve from an external UI. obviously only if you have take step 1.

 

__

after that, you need 2 things.

 

first, use the full path of the file and replace / with //.. this is quite important. so instead of c:/showcase/file.a3s the correct path will be c://showcase//file.a3s

 


the second thing you have to know, is that before opening a file, you first need to close the one you've opened (also if you don't have file opened)..

 

i was already using such code, so i'm sharing mine this time:

 

send_request('APPLICATION_CLOSE_SCENE||APPLICATION_LOAD_SCENE::C:\\configurator\\file.a3s');

 this works for the externa UI,not sure about the embed.

as you may noticed, i used both || and ::

this is because || determine the end of a command and the beginning of a new one, while the :: determine where the command statement ends and the command values start..

 

or, at least, this works good for me 🙂

 

this is usefull when you want to have commands happening one after another, using the DELAY_UNTIL_MESSAGE (or something like that) command..

but to do so, you need to specify what command showvcase has to wait for, and that why the console is useful 🙂

_________________________________________________________

almost a showcase PRO user 😛

if you find my post useful, please give kudos or mark as solution 😄
Message 18 of 21
Anonymous
in reply to: cikho

Wow, quick and thorough! thank you very much.
I have been using the console and it has helped as I have been working on my scene navigation etc.
As far as closing and opening scenes go though I can't gleam anything useful from it. If I close my scene for example (file-close or ctrl W) it tells me all the things it is doing while closing but if I scroll up I never see a copy of my command to close or open - so I'm still not sure what to do.

I had a go based on your code but still got a crash. I have then tried to break it down to hopefully identify the issue. As it stands I am just trying to get the APPLICATION_CLOSE_SCENE to work but nothing happens except in the console I get two messages (which annoyingly I can't copy and paste)
Traceback (most recent call last):
File "build/wrk/Release/runTime/bin\UIWindow.py, line 1077, in __onBeforeNavigate
File "build/wrk/Release/runTime/bin\UIWindow.py, line 1093, in __navigateTo
ValueError: need more than 2 values to unpack

I have run a search on this but it seems a common python error and therefore no specific help or pointers.

So here is the line that I am using

<a href="autodesk:APPLICATION_CLOSE_SCENE">close</a>

 

Given that the the console doesn't actually show me the close command and there isn't an example I can find in the showcase help I don't know if it should work on it's own or not.

 

Here was my take on both parts together based upon your code and and the embed cui help examples. I tried the slashes the other way round too - both crash it.

 

<a href="#" onclick="document.location = 'autodesk:APPLICATION_CLOSE_SCENE';
			document.location = 'autodesk:APPLICATION_LOAD_SCENE:C://Showcase//box.a3s';">Open next</a>

 

 

Message 19 of 21
cikho
in reply to: Anonymous

ok the close scene actually does not work for me neither.. maybe, but this is just an idea, you cannot close a scene from an embed UI.. but honestly, looks more like an error in the coding of the phyton file that runs the autodesk protocol

 

also, use \ not /

_________________________________________________________

almost a showcase PRO user 😛

if you find my post useful, please give kudos or mark as solution 😄
Message 20 of 21
Anonymous
in reply to: cikho

I was starting to suspect it wasn't going to happen!
Thanks again for all your help.
'til next time... 😄

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report