Hello Everyone
A colleague has DrawNet addon to Autocad 2017 however she has to load the DLL file every time. Autocad doesnt remember the dll file is attached on opening. I wanted to create a toolpalette Button which would with one click avoid the having to type in the command line Netload then path to the DLL file? Since covid 19 I cant access her machine to trial the loading of the code below. I dont have DrawNet on my machine we have but one licence for Microdrainage/DrawNet and I'm 65 miles away from her
Is this correct for the code for the tool palette button
(command"_netload""C:/Program Files/Autodesk/ApplicationPlugins/MDUKDrawNetCADx64.bundle/Contents/open Drawnet2017.DLL")
Can anyone help?
Rachel
Solved! Go to Solution.
Solved by Alfred.NESWADBA. Go to Solution.
Hi,
>> Is this correct for the code for the tool palette button
Not exactly, spaces are missing ...
This is how it should look like:
^C^C^P(progn (setvar "FILEDIA" 0)(command "_NETLOAD" "<your path to the dll>")(setvar "FILEDIA" 1));^P<YourCommandInsideDLL>;
e.g.
^C^C^P(progn (setvar "FILEDIA" 0)(command "_NETLOAD" "C:/TEMP/mytool.dll")(setvar "FILEDIA" 1));^Pmyimport;
>> ApplicationPlugins/MDUKDrawNetCADx64.bundle
This path shows me that you have installed the tool as plugin.
If the plugin is configured correctly you should not need to load the DLL, it should be automatically loaded whenever you start one of the commands inside the DLL (and so configured inside the plugin-xml).
Here >>>click<<< you can see a sample of the configuration xml with the definition of commands inside the DLL, if any of these commands are called the DLL will be loaded automatically.
- alfred -
Can't find what you're looking for? Ask the community or share your knowledge.