ObjectARX

ObjectARX

Reply
*Elmore, Andy
Message 1 of 6 (116 Views)

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

116 Views, 5 Replies
08-19-2003 10:05 AM
Can .arx file be created in VB or C#?

Andy
*Preston, Stephen
Message 2 of 6 (116 Views)

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

08-19-2003 05:53 PM in reply to: *Elmore, Andy
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
>
>
*Smith, J. Daniel
Message 3 of 6 (116 Views)

Re:

08-27-2003 04:46 AM in reply to: *Elmore, Andy
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
> >
> >
>
>
*Mueller, Andreas
Message 4 of 6 (116 Views)

Re:

09-01-2003 04:04 AM in reply to: *Elmore, Andy
"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
> > >
> > >
> >
> >
>
>
*Smith, J. Daniel
Message 5 of 6 (116 Views)

Re:

09-30-2003 11:42 PM in reply to: *Elmore, Andy
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
> > > >
> > > >
> > >
> > >
> >
> >
>
>
*Elmore, Andy
Message 6 of 6 (116 Views)

Re:

10-21-2003 09:24 AM in reply to: *Elmore, Andy
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
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.