Author Topic: how to load arx in vbnet?  (Read 4450 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: 3520
  • (x-in)->[process]->(y-out)
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);
Forth is like the Tao: it is a Way, and is realized when followed.
Its fragility is its strength; its simplicity is its direction - Michael Ham

"The E in Javascript stands for 'easy'." Florin Pop tweet

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: 3520
  • (x-in)->[process]->(y-out)
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;

}
}
}


Forth is like the Tao: it is a Way, and is realized when followed.
Its fragility is its strength; its simplicity is its direction - Michael Ham

"The E in Javascript stands for 'easy'." Florin Pop tweet

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 in one timeline.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<-

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 in one timeline.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<-

www1970

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