Author Topic: automatically loading my "in-house" application via the registry  (Read 2021 times)

0 Members and 1 Guest are viewing this topic.

Kurtz David

  • Guest
Hello,
I'm applying Kean Walmsley approach to automatically loading my "in-house" application via adding registry values as described in his post:
http://through-the-interface.typepad.com/through_the_interface/2006/09/automatic_loadi.html

Is it possible to Automatically load my VBA Application *.dvb files
(I couldn’t find the matching Managed value)

Best regards,
David.

Bert

  • Guest
Re: automatically loading my "in-house" application via the registry
« Reply #1 on: November 04, 2013, 07:50:16 AM »

I'm not sure/ it depends on what you are asking.

A)
If you want to load a dvb on AutoCad-startup then you can simple use the built in 'Startup Suite'.
(type appload) in commandline and look for the briefcase "Contents"-button. There you'll be able to select which lsp, arx,vlx or dvb's you want loaded.
Use that.


B)
However if you want to load the stray bit of VBA-code from .Net then I use a somewhat dirty way. (I'm not sure if there is a more decent way of doing this)

Code - vb.net: [Select]
  1.         Dim acDoc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
  2.         acDoc.SendStringToExecute("-vbarun //ServerOrDrive/folder/subfolder -yourProject.dvb!yourModule.yourMethod ", True, False, False)
  3.  

What this does is 1) load the dvb and 2) run the method called.
However if you only want the *dvb loaded i guess you could make a dummy method and call that.

I'm sure as rain not saying this is 'how it's done' but it is quick and dirty, it does work.

Note that running vba like this (or in either way as far as I know) does not run in sync/thread with your .Net
« Last Edit: November 04, 2013, 07:59:11 AM by Bert »