The DevTech team here at Autodesk is working on becoming experts with cloud and mobile technologies. I am happy to say that recently I was able to spend some time working towards this goal. (For many years we have been mostly supporting desktop applications). As a training exercise I got an account on Amazon and set up a Windows 2008 server with IIS installed. (Other DevTech engineers have used Azure).
The idea was to get ETO Server running on this Amazon server and to access it using a WCF Service from a Windows phone application. Along the way I would publish the ETO Web Samples and make it a web site on my cloud server. (I also used the ETO Staircase application with the WCF service).
This screenshot shows the different parts of this experiment:
I am happy to say that it is all working now. Here are some of the training resources I used:
http://msdn.microsoft.com/en-us/library/ms735119(v=vs.90).aspx
http://channel9.msdn.com/Series/Windows-Phone-7-Development-for-Absolute-Beginners
I got the ETO Web sample source from Autodesk com, built and published it. To get the published files to the amazon server I used Dropbox. After I moved the folder to my Dropbox folder on my local machine it appeared on the server. (of course I needed to install Dropbox on the server).
A couple of other things I needed to do on the server was to use IIS to enable the Web site and the Web service. Accessing the server was easy using Remote Desktop. Using IIS was straight forward as well after I completed a tutorial on it. I also needed to use the Intent Services Configurator to make the ETO applications on that cloud system available to ETO server.
I used the WCF Application wizard in Visual Studio to create my project that would be the Service that I could use from a Windows phone application. I spent some time learning the basics of WCF and then added a function that connects to the ETO server using the ETO Server API. Here is the code:
public string GetNumberOfSteps
(double newFlToFlrHt, double newTreadRise)
{
try
{
IntentServicesClient client = new
IntentServicesClient(new Uri
("net.pipe://localhost/Autodesk/Intent/Services"));
client.SetApplication("stairCase");
string prtRefChain = null;
//Change the distance setting between
//the floors
client.SetValue(prtRefChain,
"FloorToFloorHeight", newFlToFlrHt);
// set the new value for new tread rise
client.SetValue
(prtRefChain, "TreadRise", newTreadRise);
string sTreadCountReport =
(string)client.GetValue
(prtRefChain, "TreadCountReport");
return sTreadCountReport;
}
catch (Exception ex)
{
Debug.Print(ex.ToString());
return ex.ToString();
}
}
After building and publishing the WCF Application I copied the published files to the Amazon server. I was able to add a reference to my service in a Windows phone application. When I tested it in the Win phone emulator I am able to get back the number of stairs that would be created for the new floor to floor height and the new tread rise. Here is a screen shot of Inventor and ETO to help explain what the code in the WCF service is doing:
Below you can see the rule that is used to get this string. This is in Inventor with ETO. The WCF service is accessing ETO server (does not have a UI) to get this string:
Here it is in the Windows Phone emulator:
-Wayne