Author Topic: Plug-in API Active-X COM etc  (Read 2361 times)

0 Members and 1 Guest are viewing this topic.

Coder

  • Swamp Rat
  • Posts: 827
Plug-in API Active-X COM etc
« on: March 27, 2016, 02:40:21 AM »
Hello guys.

I am readying from time to time .NET users using vocabularies like Plug-in, API, Active-X, COM ... etc. and I don't know what do they mean.

1- When can you say My Plug-in and API ? Application Presentation Interface but still not clear enough to understand.
2- What are the codes that named Active-X ?
3- I think COM used to indicate to Active-X functions but I don't know when and what are they ?

If you have any other vocabularies and you would like to share , I would be very thankful too.

Thanks in advance.

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: Plug-in API Active-X COM etc
« Reply #1 on: March 27, 2016, 04:20:29 AM »
Hi,

I give try, feel free to complete and/or correct my mistakes.

plug-in: an extension module for an application (e.g. AutoCAD) which cannot be run outside this application (stand-alone). Programs running in AutoCAD document context (AutoLISP programs) or in application contex (AutoCAD .NET commands or extensions) are always plugins.

API: Application Programming Interface, a set of features uses to build applications. An API can be related to a software (AUTOCAD) or some specific feature.
AutoCAD development platform provides several programming environments which use different API:
  • AutoLISP API: specific to the Visual LISP environment
  • AutoCAD Activex API: multi environment, also called AutoCAD COM API (see below)
  • AutoCAD JavaScript API: specific to the JavaScript envvironment
  • AutoCAD .NET API: specific to the .NET environment (also called: Managed ObjectARX API)
  • ObjectARX: specific to the ObjectARX environment

ActiveX: one of the COM (Component Object Model) technologies. It is used to build an AutoCAD API. This API is the only one used by VBA but it is accessible to others AutoCAD programming environments (Visual LISP, .NET, ObjectARX).
« Last Edit: March 27, 2016, 07:45:58 AM by gile »
Speaking English as a French Frog

Coder

  • Swamp Rat
  • Posts: 827
Re: Plug-in API Active-X COM etc
« Reply #2 on: March 27, 2016, 08:25:02 AM »
Thank you gile.

I am confused between Plug-in and API .
Can I call my program in C# plug-in or API ?

Code - C#: [Select]
  1. [CommandMethod ("Test")]
  2. public static void MyTest()
  3.  {
  4.   }
Maybe the API is just when I able to use dialogs I can call it API ?

Sorry for my hard understanding your explanations.

Thank you.

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: Plug-in API Active-X COM etc
« Reply #3 on: March 27, 2016, 08:44:42 AM »
Did you read the topic from the 'Aplication Programming Interface' link in my reply ?

Your program  (defining some CommandMethod) is an AutoCAD plug-in.
To create it, you used the AutoCAD .NET API (CommandMethodAttribute class, for example, is part of the AutoCAD .NET API).

The end user of an API is a developper.
The end user of an AutoCAD plug-in is an AutoCAD user.
« Last Edit: March 27, 2016, 08:49:09 AM by gile »
Speaking English as a French Frog

BlackBox

  • King Gator
  • Posts: 3770
Re: Plug-in API Active-X COM etc
« Reply #4 on: March 27, 2016, 10:58:37 AM »
Well done, Gile.

Question: if a .NET app can be run outside of AutoCAD (standalone exe), then it is an executable, and not a plug-in (dll, which can only run within AutoCAD), no?



Also @coder -

When I first started learning .NET, I found it confusing to see plug-in vs addin; these are generally referring to the same thing, or interchangeable, and Autodesk has become more consistent in using plug-in.

Something that also took some learning was that API can pertain to the overall 'language' specific interface, such as LISP API, .NET API, etc, as well as 'features' within that API, such as Civil 3D's new Feature Line API (within the overall .NET API), if that makes sense.

Cheers
"How we think determines what we do, and what we do determines what we get."

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: Plug-in API Active-X COM etc
« Reply #5 on: March 27, 2016, 12:02:16 PM »
Well done, Gile.

Question: if a .NET app can be run outside of AutoCAD (standalone exe), then it is an executable, and not a plug-in (dll, which can only run within AutoCAD), no?
I think so.

Thanks for your clarifications in correct English.
Speaking English as a French Frog

Coder

  • Swamp Rat
  • Posts: 827
Re: Plug-in API Active-X COM etc
« Reply #6 on: March 28, 2016, 01:57:58 AM »
Thank you guys for the helpful inputs.

Please correct me if I am wrong :
* Plug-in is a program like xxx.dll that can't run outside AutoCAD and while it is surrounded and stuck with a program to run in its environment it must be called Plug-in.
* API is any Application that you use to create a program , methods , functions ... etc by using its Classes, functions, dialog boxes,  ... etc to produce a program that not necessarily to run into AutoCAD which could be a xxx.exe (executable program), xxx.dll and what ever the other program file extensions.

Talking abou COM and Active-X :
For instance in AutoLISP , functions that start with vlax-*** considered Active-X functions , correct?

I have read the article from the link you proved from MicroSoft although I hope you give an example related to AutoCAD to allow me to understand it if you have time and don't mind please.

Many thanks.

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: Plug-in API Active-X COM etc
« Reply #7 on: March 28, 2016, 03:19:31 AM »
* API is any Application that you use to create a program , methods , functions ... etc by using its Classes, functions, dialog boxes,  ... etc to produce a program that not necessarily to run into AutoCAD which could be a xxx.exe (executable program), xxx.dll and what ever the other program file extensions.

Not exactly. An API is not an Application.
When we talk about the AutoCAD .NET API, we talk about the .NET programming interface for AutoCAD Application, in other worlds, the .NET programming environment which allows us to customize AutoCAD, maily, all the class libraries defined in AcCoreMgd.dll, AcDbMgd.dll, AcMgd.dll, etc.
When we talk about the AutoCAD ActiveX API (or COM API) we talk about the set of functionalities provided by Autodesk to customize AutoCAD through the COM environment (i.e. the vla-* LISP functions).

Quote
Talking abou COM and Active-X :
For instance in AutoLISP , functions that start with vlax-*** considered Active-X functions , correct?
Some of the LISP vlax-* functions are use to access the whole ActiveX environment (not exclusively the AutoCAD COM API), you can use them to access to the Excel API for example.
Some others LISP functions prefixed with vlax have nothing to do with COM as the vlax-curve* ones which don't exist in VBA.
Speaking English as a French Frog

Coder

  • Swamp Rat
  • Posts: 827
Re: Plug-in API Active-X COM etc
« Reply #8 on: March 29, 2016, 12:26:15 AM »
Many thanks gile .