Many of us have heard about Revit API and what magic it can do. In this issue we will give a small introduction to the History of programming and the relation between programming and API. This issue as well as future ones would be as much a resource for me as I hope it will be for others, a diary? can be assumed
So What is the Story ?
So far the world is in at an extreme increase of inter-connectivity, which demanded programming languages to set a solid foundation to the future.
Did you know that the first programming language is over 100 years old and was written by a woman, Ada Lovelace? In addition to outlining the history of languages and how each is traditionally used, Computers have a huge impact on our life, and computer programs tell those computers what to do and how to do it. It is to admit that computer programs have altered our existence. So, it is about time to learn something about them. originally, first mechanical computer, created by Charles Babbage in 1822.
The idea of inventing a computer was following the magnitude of information and the development of writing on paper, as away to provide a great time saving for the four arithmetic operations. Ultimately, the binary language is what the machine can understand and its total letter count is 2 (0,1) equivalent to human language (Yes or NO).
Did you know that the programming idea came from a loom machine ?
0,1 was extremely hard for human to read the code that was required to interpret this language to a human readable language and that was the start where the assembly language was invented in the 1940s. It was probably the first (vaguely) human-readable programming language, but by the 1950s computer engineers realised that assembly language was far too laborious and error-prone to build entire systems out of and thus in 1955 the first modern programming language was born:FORTRAN (Formula Translator). LISP (List Processor),ALGOL (ALGorithmic Language), and COBOL (Common Business oriented Language) would follow in the next few years and as they say, the rest is history.Almost every language today is a derived from one of these first four languages and indeed, FORTRAN, LISP,and COBOL are still actively used by large, lumbering institutions like the national Weather Service and the USPostal Service, and nevertheless Autocad addin is usingLISP.
by the time of assembly invention IBM was the leadcompany.IBM created its first operating system (OS). Operating System is a system software that manages computer hardware and software resources and provides common services for computer programs.The operating system is a component of the system soft- ware in a computer system. Application programs usually require an operating system to function.as computer fans are increasing Tim Paterson has created a more smarter OS named as DOS (Disk operating System).
So far IBM have seen this program and decided to adopt it. For some time, it has been widely acknowledged that DOS is insufficient for modern computer applications. Microsoft Windows helped alleviate some problems, but still, it sat on top of DOS and relied on DOS for many services. Even Windows 95 sat on top of DOS. Newer operating systems, such as Windows NT and oS/2 Warp, do not rely on DOS to the same extent, although they can execute DOS-based programs.
by experience it was realised that all programs do write in the same method (sequence of code instructions) where it become a time consuming to write same code for a same task for a different application. This led to the invention of Library (DLL) (Dynamic Link Library).More languages have been invented which led to a growing gap between programmers and communication languages standards. You can think of it like we are in the same country and each one of us has decided to communicate with each other by his/her own language standards.Most definitely this will lead to a great failure of development, and that was the reason behind inventing OOP (object-oriented programming).Object-oriented programming (OOP) is a programming language model organised around objects rather than “actions” and data rather than logic. Historically, a program has been viewed as a logical procedure that takes input data, processes it and produces output data. The general meaning of the above statement from WIkiPedia, speak the language you like but you will never have a different grammar and that is why you can now program any NET application such as Revit with any NET language and Revit still smiling and saying keep it coming.What is the relation between Programming and Revit aPI ?Let us first identify API.
API is the abbreviation for Application Programming interface which means, instead of using Graphical user interface (Button, slider, mouse… etc) to input codes and request the computer to follow. So in another meaning it is a list of instructions for the application to follow to perform a special task.Does that mean I can do anything with Revit API. actually NO, it only allows the programmer to do special integration within a limited allowance boundary. ex- plaining that we need to understand how the communication works between Programmer and Revit.
As mentioned before all machines understands binary (0,1) and languages have been interpreted to allow human writing instructions to computer (application). Ideally the sequence starts from a programmer who writes a code ( a list of instructions) to Revit Core software. these list of instructions are compiled and generated to an intermediate language so Revit can understand and that is the DLL you created or downloaded from Autodesk Exchange app. When you start running Revit, Revit opens a channel to the machine and read your instructions from the DLL you provided turning it to a common language where the machine starts complying your instructions. and that is only done at Run Time.
But if you are wondering if writing instructions to Revit can Do every thing!! again NO, Autodesk has allowed API technology as a port to interfere with its Products under limits and boundaries. for example you can through API create walls but you can not Create Ceilings (util version 2016), so a briefed short explanation API is a programming interface to the core boundary of Revit.