.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 8
Anonymous
1095 Views, 7 Replies

Load arx

Hello,

in old ActiveX, there is the possibilty to load an arx with

Application.LoadArx

and list the load arx with

Application.ListArx

Is there an aquivalent in dotnet?

Thanks for help

Tim
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: Anonymous

Check out the ExtensionLoader Class. It has both Load and IsLoaded
methods.
"Tim Fields" wrote in message
news:5509989@discussion.autodesk.com...
Hello,

in old ActiveX, there is the possibilty to load an arx with

Application.LoadArx

and list the load arx with

Application.ListArx

Is there an aquivalent in dotnet?

Thanks for help

Tim
Message 3 of 8
Anonymous
in reply to: Anonymous

Thanks for your answer, but I tried ExtensionLoader.IsLoaded already. I
got an exception:


Application does not support just-in-time (JIT)
debugging. See the end of this message for details.

************** Exception Text **************
System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. ---> System.BadImageFormatException: Could
not load file or assembly 'D:\AutoCAD 2007\test.arx' or one of its
dependencies. The module was expected to contain an assembly manifest.
File name: 'D:\AutoCAD 2007\test.arx'
at System.Reflection.AssemblyName.nGetFileInformation(String s)
at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.IsLoaded(String fileName)
at xyz.abc.test() in D:\test\clsMain.cs:line 32

=== Pre-bind state information ===
LOG: User = -\-
LOG: Where-ref bind. Location = D:\AutoCAD 2007\test.arx
LOG: Appbase = file:///D:/AutoCAD 2007/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===

The arx I try to load is a non-managed arx (without clr support) created
in VS 2005 for AutoCAD 2007 and works properly.

Tim
Message 4 of 8
Anonymous
in reply to: Anonymous

I thought you we're loading a managed extension. I don't know if there is a
class to load
an ARX. If nothing else maybe you could just use the ARX command?
"Tim Fields" wrote in message
news:5510348@discussion.autodesk.com...
Thanks for your answer, but I tried ExtensionLoader.IsLoaded already. I
got an exception:


Application does not support just-in-time (JIT)
debugging. See the end of this message for details.

************** Exception Text **************
System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. ---> System.BadImageFormatException: Could
not load file or assembly 'D:\AutoCAD 2007\test.arx' or one of its
dependencies. The module was expected to contain an assembly manifest.
File name: 'D:\AutoCAD 2007\test.arx'
at System.Reflection.AssemblyName.nGetFileInformation(String s)
at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.IsLoaded(String fileName)
at xyz.abc.test() in D:\test\clsMain.cs:line 32

=== Pre-bind state information ===
LOG: User = -\-
LOG: Where-ref bind. Location = D:\AutoCAD 2007\test.arx
LOG: Appbase = file:///D:/AutoCAD 2007/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===

The arx I try to load is a non-managed arx (without clr support) created
in VS 2005 for AutoCAD 2007 and works properly.

Tim
Message 5 of 8
Anonymous
in reply to: Anonymous

Hi Paul

The ExtensionLoader class is for managed extensions.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

"Paul Richardson" wrote in message news:5510049@discussion.autodesk.com...
Check out the ExtensionLoader Class. It has both Load and IsLoaded
methods.
"Tim Fields" wrote in message
news:5509989@discussion.autodesk.com...
Hello,

in old ActiveX, there is the possibilty to load an arx with

Application.LoadArx

and list the load arx with

Application.ListArx

Is there an aquivalent in dotnet?

Thanks for help

Tim
Message 6 of 8
Anonymous
in reply to: Anonymous

using Autodesk.AutoCAD.Runtime;

SystemObjects.DynamicLinker.LoadModule(...);


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

"Tim Fields" wrote in message news:5510348@discussion.autodesk.com...
Thanks for your answer, but I tried ExtensionLoader.IsLoaded already. I
got an exception:


Application does not support just-in-time (JIT)
debugging. See the end of this message for details.

************** Exception Text **************
System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. ---> System.BadImageFormatException: Could
not load file or assembly 'D:\AutoCAD 2007\test.arx' or one of its
dependencies. The module was expected to contain an assembly manifest.
File name: 'D:\AutoCAD 2007\test.arx'
at System.Reflection.AssemblyName.nGetFileInformation(String s)
at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.IsLoaded(String fileName)
at xyz.abc.test() in D:\test\clsMain.cs:line 32

=== Pre-bind state information ===
LOG: User = -\-
LOG: Where-ref bind. Location = D:\AutoCAD 2007\test.arx
LOG: Appbase = file:///D:/AutoCAD 2007/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===

The arx I try to load is a non-managed arx (without clr support) created
in VS 2005 for AutoCAD 2007 and works properly.

Tim
Message 7 of 8
Anonymous
in reply to: Anonymous

YTM! As usual...Thanks.
"Tony Tanzillo" wrote in message
news:5510411@discussion.autodesk.com...
Hi Paul

The ExtensionLoader class is for managed extensions.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

"Paul Richardson" wrote in message
news:5510049@discussion.autodesk.com...
Check out the ExtensionLoader Class. It has both Load and IsLoaded
methods.
"Tim Fields" wrote in message
news:5509989@discussion.autodesk.com...
Hello,

in old ActiveX, there is the possibilty to load an arx with

Application.LoadArx

and list the load arx with

Application.ListArx

Is there an aquivalent in dotnet?

Thanks for help

Tim
Message 8 of 8
Anonymous
in reply to: Anonymous

Thanks for all your answers.

Solved it with using the 'AutoCAD COM APIs from .NET' and
'ApplicationServices.Application.AcadApplication', which has LoadARX und
ListARX.

Tim

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost