AutoCAD 2018自动加载dll [英] Autocad 2018 autoload dll
问题描述
我正在尝试将dll文件自动加载到Autocad 2018。
I am trying to automatically load dll files to Autocad 2018.
我该如何实现?
我想自动化,以便它可以在启动时执行。有了netload,一切正常。
I want to automate so it can do it on startup. With netload everything works.
我使用* .lsp方式。有人可以帮忙吗?
我在网上找到了很多方法,但没有用。
I have used *.lsp ways. Can someone please help? I have found plenty online of ways but none work.
推荐答案
AutoCAD的官方方式可以加载写入的.dll文件.Net在启动时将使用自动加载器功能。
基本上,您将.dll与所需的任何其他文件捆绑到默认文件夹中,AutoCAD在启动时会在其中读取该文件以加载所有插件。如果要将插件(.dll)作为安装文件分发以安装在多台计算机上,则特别好。
AutoCAD's official way to load .dll files written in .Net on startup is to use autoloader feature. You basically bundle the .dll with any other files you want into a default folder where AutoCAD reads at startup to load all plug-ins. This is especially good if you want to distribute your plug-in (.dll) as a setup file to install on multiple machines.
第一步是创建捆绑文件夹。在 %ProgramData%/ Autodesk / ApplicationPlugins
中。 bundle文件夹是一个普通的Windows文件夹,以.bundle(例如MyApp.bundle)结尾。
First step is to create a bundle folder in "%ProgramData%/Autodesk/ApplicationPlugins
". the bundle folder is a normal windows folder that ends with .bundle (ex. MyApp.bundle)
在此文件夹中,您需要有一个名为( Contents)的文件夹和一个名为( PackageContents.xml
)的文件。
Inside this folder you need to have a folder named ("Contents") and a file named ("PackageContents.xml
").
将.dll放入内容文件夹
Place .dll inside the contents folder
代码可以像下面这样简单(更改类似 MyApp
, MyName
等,它应该对您有用):
code inside PackageContents.xml
can be as simple as the following (Change things like "MyApp
", "MyName
", etc.. and it should work for you):
<?xml version="1.0" encoding="utf-8"?>
<ApplicationPackage SchemaVersion="1.0" ProductType="Application" Name="MyAPP" AppVersion="1.0" Description="MyAPP, My description" Author="My Name" Icon="./Contents/MyAPPIcon.ico" OnlineDocumentation="http://MyWebSite.com" HelpFile="" ProductCode="{xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx}" FriendlyVersion="1.0" SupportedLocales="Enu" AutodeskProduct="AutoCAD">
<CompanyDetails Name="My Name" Phone=" " Url="http://MyWebsite.com" Email="MyName@MyWebSite.com" />
<Components Description="Main">
<RuntimeRequirements SupportPath="./Contents" OS="Win32|Win64" Platform="AutoCAD*" SeriesMin="R19.0" SeriesMax="R22.0" />
<ComponentEntry AppName="MyAPP" Version="1.0" ModuleName="./Contents/MyAPP.dll" AppDescription="My description" LoadOnAppearance="True" LoadOnAutoCADStartup="True" LoadOnCommandInvocation="True">
</ComponentEntry>
</Components>
</ApplicationPackage>
我认为以上内容足以回答您的问题,但是如果您需要更多阅读以下内容,链接:
http:// adndevblog。 typepad.com/autocad/2013/01/autodesk-autoloader-white-paper.html
I think the above is enough to answer your question but if you need more read the article in the following link: http://adndevblog.typepad.com/autocad/2013/01/autodesk-autoloader-white-paper.html
这篇关于AutoCAD 2018自动加载dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!