ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

can arx's be created in C# or VB.Net ?

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
340 Views, 5 Replies

can arx's be created in C# or VB.Net ?

Can .arx file be created in VB or C#?

Andy
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

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
>
>
Message 3 of 6
Anonymous
in reply to: Anonymous

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). 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++.

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
> >
> >
>
>
Message 4 of 6
Anonymous
in reply to: Anonymous

"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
> > >
> > >
> >
> >
>
>
Message 5 of 6
Anonymous
in reply to: Anonymous

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
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Message 6 of 6
Anonymous
in reply to: Anonymous

could you post your example. I would like to see how this is done.

Thanks,
Andy

"J. Daniel Smith" wrote in message
news:176C3248A88928582168121C34186227@in.WebX.maYIadrTaRb...
> 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
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost