Thanks, This link (a sub node of your link) starts with this sentence:
"You can make functions, objects, or entities coded in ObjectARX available to developers who access an ActiveX object model through VBA or another programming environment."
So, basically this is possible to expose extended object model from inside Autocad, but reference documents are all in c++ and ObjectARX.
By the way I tried this piece of code, hopelessly that it works and not surprisingly it didn't!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
namespace BuildingApp_Client
{
public interface iComObject
{
void Test();
}
[ClassInterface( ClassInterfaceType.AutoDispatch)]
[ComDefaultInterface(typeof(iComObject))]
public class ComObject: MarshalByRefObject, iComObject
{
public ComObject()
{
}
[ComVisible(true)]
public void Test()
{
System.Windows.Forms.MessageBox.Show("ComTest");
}
}
}
Instance of class in AutoCAD environment
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Autodesk.AutoCAD.Geometry;
using System.Collections;
using System.Runtime.InteropServices;
namespace BuildingApp_Client
{
[ClassInterface(ClassInterfaceType.AutoDispatch)]
public static class BuildingAppGlobal
{
public static ComObject testcom = new ComObject();
}
}
Client side, late bound, without importing type library
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using System.Reflection;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Type objType = Type.GetTypeFromProgID("AutoCAD.Application");
object objSum = Activator.CreateInstance(objType);
object[] myArgument = {};
object c = objType.InvokeMember("Test", BindingFlags.InvokeMethod, null, objSum, myArgument);
}
}
}
and this is the object model I can see

And part of your answer:
"Create COM interface, use ClassInterfaceAttribute and ComVisibleAttribute in System.Runtime.InteropServices.
Out of process, you would attach to whatever process is running your script.
For COM, where ever you call Marshal.GetActiveObject(progID)"
I think you meant connecting from my code (inside of Autocad) to script running environment, not from script environment to AutoCAD, isn't it? it may also work and good Idea, but wanted to make sure.