Author Topic: how to load arx in vbnet?  (Read 5287 times)

0 Members and 1 Guest are viewing this topic.

www1970

  • Guest
how to load arx in vbnet?
« on: July 27, 2006, 06:08:55 AM »
some selfdefine entity created bu arx ,how to load arx in vbnet?

MickD

  • King Gator
  • Posts: 3619
  • (x-in)->[process]->(y-out) ... simples!
Re: how to load arx in vbnet?
« Reply #1 on: July 27, 2006, 06:13:53 AM »
I use this in my IExtensionApplication derived class to load up necessary arx/dbx modules at loading time

Autodesk.AutoCAD.Runtime.SystemObjects.DynamicLinker.LoadModule("Whatever.arx",true,true);
"Short cuts make long delays,' argued Pippin.”
J.R.R. Tolkien

www1970

  • Guest
Re: how to load arx in vbnet?
« Reply #2 on: July 27, 2006, 08:31:18 PM »
MickD:
ask a question again
I comprehend this sentence is in program, it is parsed at running, thus when writting program, how to make its function or property display on the hehind of class name ,also how to use it.
can you give me a short code? thanks!
Autodesk.AutoCAD.Runtime.SystemObjects.DynamicLinker.LoadModule("Whatever.arx",true,true);

MickD

  • King Gator
  • Posts: 3619
  • (x-in)->[process]->(y-out) ... simples!
Re: how to load arx in vbnet?
« Reply #3 on: July 27, 2006, 08:50:23 PM »
Sure, here's a typical example of using IExtensionApplication interface to intialise some settings or load modules at the time of loading your .net dll

Code: [Select]
//created by MickD 4-1-05

using System;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.ApplicationServices;


//Set some metadata for autocad and other app's to see what they can use
[assembly:ExtensionApplication(typeof(DCS_3D.App))]
[assembly:CommandClass(typeof(DCS_3D.Commands))]

namespace DCS_3D


{
///
/// The entry point for Autocad, it get's called at least once
/// when you use 'Netload' to load and configure your application
/// There can only be one instance of inherited IExtensionApplication
/// per class library.
///
public class App : IExtensionApplication
{
public void
Initialize()
{
//Let the user know what's happening while loading your app
//You could also alert user of failed loading operations here.
Editor ed =
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
ed.WriteMessage("\n Loading DCS_3D application...\n");

// Load any ARX/DBX modules we may require:
Autodesk.AutoCAD.Runtime.SystemObjects.DynamicLinker.LoadModule("AsdkHlrApi16.dbx",true,true);

}

public void
Terminate()
{
//Nothing to put here;

}
}
}


"Short cuts make long delays,' argued Pippin.”
J.R.R. Tolkien

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: how to load arx in vbnet?
« Reply #4 on: July 27, 2006, 09:35:20 PM »
www1970 ,

Also ,  the NET Labs from AutoDesk discuss   : IExtensionApplication

If you don't have the Labs , or can't find them , please ask.


kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: how to load arx in vbnet?
« Reply #5 on: July 27, 2006, 09:37:58 PM »
ahh , you do have them ..
from your post ... http://www.theswamp.org/index.php?topic=11240.msg142801#msg142801
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

www1970

  • Guest
Re: how to load arx in vbnet?
« Reply #6 on: July 28, 2006, 03:12:35 AM »
thanks!