What Is Application Programming Interfaces
What Is Application Programming Interfaces
As an analogy, consider the task of building your own home. If you were to build a
house entirely on your own, you would need to possess a thorough understanding of
architecture, plumbing, electronics, carpentry, masonry, and many other trades. You would
also need to perform every task yourself and keep track of the minutest of details for every
aspect of the project, such as whether you have enough wood for your floorboards or
whether you have the right fasteners to fit the screws that you’ve bought. Finally, because
you are the only person working on the project, you can only perform a single task at any
point in time and hence the total time to complete the project could be very large.
Screen 2:- Contractor and building house [2]
An alternative strategy is to hire professional contractors to perform key tasks for
you (Fig. 2). You could hire an architect to design the plans for the house, a carpenter for
all of your wood work needs, a plumber to install the water pipes and sewage system for
your house, and an electrician to set up the power systems. Taking this approach, you
negotiate a contract with each of your contractors telling them what work you want done
and agreeing upon a price they then perform that work for you. If you’re lucky, maybe you
even have a good friend who is a contractor and he offers you his services for free. With
this strategy, you are freed from the need to know everything about all aspects of building
a house and instead you can take a higher-level supervisory role to select the best
contractors for your purpose and ensure that the work of each individual contractor is
assembled together to produce the vision of your ideal home. [2]
The analogy to APIs is probably obvious: the house that you’re building equates to
a software program that you want to write, and the contractors provide APIs that abstract
each of the tasks you need to perform and hide the implementation details of the
work involved. Your task then resolves to selecting the appropriate APIs for your
application and integrating them into your software.
The analogy of having skilled friends who provide contracting services for free is
meant to represent the use of freely available open source libraries in contrast to commercial
libraries that require a licensing fee to use in your software. The analogy could even be
extended by having some of the contractors employing subcontractors, which corresponds
to certain APIs depending on other APIs to perform their task.
2.3.1 System dependent API: The programming language that comes along with particular
CAD/CAM package is called as a system dependent API [1]
e.g. AutoLISP for AutoCAD, GRIP for Unigraphics, Pro-Programming for
Pro/Engineer, etc.
2.3.2 General purpose API: The widely used programming languages that are common to
every CAD/CAM software, are called general purpose API
e.g. C, C++, Visual BASIC, Visual C++, etc.
2.4 NX Open
ii. Cycling through the objects in a part file, reading information or performing
various operations on them.
iii. Creating custom user interfaces that allow users to select objects and enter data.
Applications
i. Creating part geometry or drawings according to your local standards.
ii. Importing data from other sources or outside of NX.
iii. Reading data from objects in a part file and writing it out in some form of report.
Benefits
iii. Reduce rework by capturing and reusing company and industry best practices
The NX Open APIs provide the applications and tools that enable customers to:
Customize the NX interface to tailor the NX environment to best meet their specific
workflow needs
Create integrated custom menus with third party developers for their applications
Take advantage of related product APIs such as, Teamcenter Engineering ITK, and
Parasolid
Features
Internal
An internal Open API program is a shared library whose symbols get resolved at
run time which occurs interactively within a NX session. When an internal Open C and
C++ API program runs interactively it gives the user the opportunity to visibly see the
results that a program has on displayable objects in the Object Model. Programs can be
developed to access and create geometry, analyze geometry, create and edit features, create
and edit expressions, and manage data. Routines to interact with users using standard NX
Motif widgets are provided. Access to general Motif calls is supported within the Open
API. However, no macro support is possible with these dialogs.
External