.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Load a VB.NET dll with a Lisp routine

8 REPLIES 8
Reply
Message 1 of 9
as
1081 Views, 8 Replies

Load a VB.NET dll with a Lisp routine

I am used to load my VB.NET library's with a lisp routine.

This lisp routine is added to the "Startup Suite", so it should be loaded every time I start this profile of Autocad.
When I look in the list of loaded applications, this lisp routine shows up, so it should be loaded. If this is so then the command line in it (load the VB.NET dll) is not executed.

When I add this line to the Acad.lsp the dll will be loaded, but then it will be loaded in every profile and that is not what I want.

Is there another method to just load the dll I want in the profile I have chosen ? It should happen automaticly since my users dont want to push a button to start the loading of the dll.

with kind regards,

Harold van Aarsen
8 REPLIES 8
Message 2 of 9
Anonymous
in reply to: as

How you try to load VBA.NET dll? With (command ..) function?
I've not tested that but you can try to load it with (vla-SendCommand ...) function.
Message 3 of 9
as
in reply to: as

I use the following line:

(command "Netload" "c:/hsb-assist/Vz_Settings/DotNet/2006/acVogelzang2006.dll")

Could you tell me something more about the val-sendcommand ?
Message 4 of 9
Anonymous
in reply to: as

[code]
(setvar "filedia" 0)
(vl-load-com)
(vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) "_.netload \"c:/hsb-assist/Vz_Settings/DotNet/2006/acVogelzang2006.dll\"\n")
[/code]
Message 5 of 9
Anonymous
in reply to: as

where have you put it?

if it is in your acaddoc.lsp it may be exicuted before the command line is
initialized so doesn't actually run. if so look at (defun s::startup) this
is run after the commandline is initilaized.


wrote in message news:5210988@discussion.autodesk.com...
I use the following line:

(command "Netload"
"c:/hsb-assist/Vz_Settings/DotNet/2006/acVogelzang2006.dll")

Could you tell me something more about the val-sendcommand ?
Message 6 of 9
as
in reply to: as

Could you give me an example of how to create a lisp routine with the s::startup routine so the netload wil be performed after initialization.

This because netload has to performed after initialization
Message 7 of 9
as
in reply to: as

is it this simple ????!

(defun s::startup ()
(command "Netload" "c:/hsb-assist/Vz_Settings/DotNet/2006/acVogelzang2006.dll")
);defun s::startup

It seems do its job just fine.

Please if somebody has other ideas please tell them here I am always in for improvement.
Message 8 of 9
Anonymous
in reply to: as

from the autocad help

(defun-q MYSTARTUP ( )... your startup function ... )(setq S::STARTUP
(append S::STARTUP MYSTARTUP))note this will run each time a drawing is
loaded wrote in message
news:5211693@discussion.autodesk.com...
is it this simple ????!

(defun s::startup ()
(command "Netload"
"c:/hsb-assist/Vz_Settings/DotNet/2006/acVogelzang2006.dll")
);defun s::startup

It seems do its job just fine.

Please if somebody has other ideas please tell them here I am always in for
improvement.
Message 9 of 9
Anonymous
in reply to: as

Harold, you do need to use the append approach shown in the documentation.
The approach you used in your post overwrites any other prior startup
functions, which could cause other customizations to fail.

Also, the append approach assumes the other developers used defun-q when
they appended to the S::Startup function, which can be a poor assumption.

<>

--
R. Robert Bell


"Mark Gardiner" wrote in message
news:5211718@discussion.autodesk.com...
from the autocad help

(defun-q MYSTARTUP ( )... your startup function ... )(setq S::STARTUP
(append S::STARTUP MYSTARTUP))note this will run each time a drawing is
loaded wrote in message
news:5211693@discussion.autodesk.com...
is it this simple ????!

(defun s::startup ()
(command "Netload"
"c:/hsb-assist/Vz_Settings/DotNet/2006/acVogelzang2006.dll")
);defun s::startup

It seems do its job just fine.

Please if somebody has other ideas please tell them here I am always in for
improvement.

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