On Tuesday the 23rd I had the opportunity to present to an incredible variety of attendees at, a Meetup group called Innovation Guatemala, where different topics of Technology Innovation are discussed. I spent a couple of weeks talking to the organizers and had the chance to become the main speaker for that day, and show a bunch of Architects, Developers, Civil Engineers and Designers who code, what the Autodesk View and Data API is, and how cool would it be to start thinking in 3D for their mobile and web applications. The most interesting part was, even that I’m a native Spanish speaker, to give the presentation in Spanish was a bit challenging but they had such a great response to the technology I shared with them that night.
I started the presentation showing them who Autodesk was, since people don’t tend to be aware of all the great involvement Autodesk has in today’s technological industry. Their attention raised when I started showing what the capabilities the LMV (large model viewer) currently has. I showed and talked about the different uses of the API, from VR samples, Construction web applications, to real time collaboration using some of the attendees mobile devices so they can interact with it.
Filled of questions, the night went by so fast, after a talk that got carried away for 1 hour and a half, the networking with the different attendees started and after sharing a drink and some food the event was a wrap and a total success. Many thanks to the organizers of the Innovation Guatemala Meetup for making this possible.
Back to Revit API, I had a chance to work on a case a couple of weeks back and I wanted to share with you guys the solution for the developer.
Question: I'm trying to use the ConvertToInternalUnits() method in the Revit 2015 API to convert angles in degrees to internal units, which I assume are radians.
double degAngle = 45;
UnitType uType = UnitType.UT_Angle;
double intAngle = ConvertToInternalUnits(doc, degAngle, uType);
When I run the code above intAngle is set to 0.14763779527559054, but converting 45 degrees to radians should turn into 0.785398163. Where is this 0.14 number coming from?
Answer:Thank you for your query, For obtaining the Radians something like this will work better.
double degAngle = 45;
DisplayUnitType uType = DisplayUnitType.DUT_DECIMAL_DEGREES;
double intAngle = UnitUtils.ConvertToInternalUnits(degAngle, uType);
Let me know how it goes.
Response: Thanks a lot, that works perfect.
Thank for reading guys and until next time.