Just an hour ago, I got the first technique working; I even registered a
command that calls directly into C#.
The way I did it was to create small reusable stub "loader" ARX written in
C++ and compiled with the /clr flag which exports acrxEntryPoint(). The
filename of this ARX indicates the managed ARX to load: ARX/LOAD
_managed_acrxEntryPoint_ManagedARX.arx will load ManagedARX.dll. Since this
load stub can load a different managed ARX by changing its name, a managed
ARX developer would never have to see C++.
While this isn't anywhere close to being ready for prime-time, it does seem
to indicate that the basic idea could be made to work. Of course, this does
nothing for things like custom objects or the full C++ API.
Dan
"Andreas Mueller"
wrote in message
news:9CA246E30D42A155F6D99230D5BDFA29@in.WebX.maYIadrTaRb...
>
> "J. Daniel Smith" schrieb im Newsbeitrag
> news:8D93B6C0CD53B2FA174324EDD321E23A@in.WebX.maYIadrTaRb...
> > I guess it depends exactly what you mean by "creating an ARX in VB or
C#",
> > can you create an ARX w/o C++? No.
> >
> > However, using the /CLR flag you get unmanged C++ (i.e., it compiles to
> > MSIL) which can then easily call into C# or VB; this is called IJW (It
> Just
> > Works).
>
> .NET assembly DLLs are different from native DLLs as they are compiled to
> MSIL. They can't be loaded by AutoCAD
>
> >Another technique would be to expose your C#/VB code as a COM
> > object and use it like any other COM object from legacy C++.
>
> This works pefect and is pretty simple from C# or VB.NET.
> >
> > Note that I haven't actually tired either method out with a real ARX.
> >
> > Dan
> >
> > "Stephen Preston" wrote in message
> > news:1F8A903072DECA8C5A913273931380DB@in.WebX.maYIadrTaRb...
> > > No.
> > >
> > > --
> > > Cheers,
> > >
> > > Stephen Preston
> > > Developer Technical Services
> > > Autodesk
> > > http://adn.autodesk.com
> > >
> > >
> > > "Andy Elmore" wrote in message
> > > news:f182ce9.-1@WebX.maYIadrTaRb...
> > > > Can .arx file be created in VB or C#?
> > > >
> > > > Andy
> > > >
> > > >
> > >
> > >
> >
> >
>
>