Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to detect if Fusion360 is installed on Client Desktop

3 REPLIES 3
Reply
Message 1 of 4
sho
Participant
620 Views, 3 Replies

How to detect if Fusion360 is installed on Client Desktop

Hi, 

 

We would like to use Fusion 360 protocol to launch and open the software through a browser (Chrome, Firefox, Opera and IE).

 

We want to enable the feature only if the user has installed Fusion360. How to detect that the protocol is available on each of these browser?

 

Thanks for your help.

Tags (2)
3 REPLIES 3
Message 2 of 4
ekinsb
in reply to: sho

Is this for Windows or Mac or both?  And where is your code running that wants to know?  In a browser or a desktop app?


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 3 of 4
sho
Participant
in reply to: ekinsb

Hi,

 

Thanks for your reply.

 

It is for Windows. The code runs on the client side (on a browser).  The process is the following :

 

  • The user connects to our website.
  • He selects a model and an output format (Fusion360).
  • He clicks on a HTML button.
  • This action triggered a JavaScript method to call "fusion360:// protocol. Below an implementation example :
<!DOCTYPE html>
<html>
<body>
file URN or path: <input id='fileinput' type='text'/><br>
<button type='button' onclick='window.location.href = "fusion360://command=open&file="
+ encodeURIComponent(document.getElementById("fileinput").value)'>Open in
Fusion360</button>
<button type='button' onclick='window.location.href =
"fusion360://command=insert&file=" +
encodeURIComponent(document.getElementById("fileinput").value)'>Insert in
Fusion360</button>
</body>
</html>

I would like to detect if fusion360 is installed prior to launch the insert or open command, so far I haven't found any generic solution. 

For instance, in case the software is not installed, Opera triggers an error message, Chrome does not do anything. 

 

Do you have a solution?

 

Thanks for your help,

Message 4 of 4
ekinsb
in reply to: sho

If you were running from the desktop on Windows there are some registry keys you could check for but running from within a browser is much more difficult because you don't have access to the registry or the file system.  I did some searching and apparently there isn't a good way to check for the existence of a protocol handler.  I found several possible solutions posted but it seemed like people experienced mixed results when using them.  Here are some of the links I found.

 

http://stackoverflow.com/questions/2872090/how-to-check-if-a-custom-protocol-supported

http://stackoverflow.com/questions/836777/how-to-detect-browsers-protocol-handlers

http://stackoverflow.com/questions/24779312/simplest-cross-browser-check-if-protocol-handler-is-regi...

 

 


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report