autocad-plugin

How to combine 2 entities as 1 in Autocad .net

不羁的心 提交于 2019-12-23 04:49:32
问题 I'm making an autocad plugin and i want to create a new entity that is a combination of a line and the text.If i select the line the text is selected and backwords when i delete the line delete the text etc etc.How to treat them as one object referencing eachother?Is this possible? 回答1: I recommend using groups. Below is a link on how to access groups, I'm sure that site has more information on creating groups. Users can control whether objects are selected with the group based on the system

What is the order of load AutoCAD plugins?

我的梦境 提交于 2019-12-19 04:04:35
问题 There are few ways of automatic load applications - plugins when AutoCAD starts. I know those: startup suite - attached by GUI List item %appdata%....\support\zwcad2018.lsp ( I use ZWCAD, maybe in Acad, there is another path. The long time ago when I worked on Acad it was acad.lsp, but that was times before Windows UAC feature). *.mnl loaded while corresponding *.mnu is loaded ( old fashion way, but is ZWCAD possible) what about Acad? On-demand loading: HKEY_CURRENT_USER\Software\ZWSOFT\ZWCAD

c# RuntimeBinderException when using dynamic variable to handle internal types. How can I fix that?

南笙酒味 提交于 2019-12-11 10:21:39
问题 I'm using a not-fully-exposed API in the add-on that I'm currently writing. Some classes there are still kept internal, although some public methods require parameters of these types. To handle the problem I tried to use dynamic typing with a helper DymamicObject implementation. I was pretty successful doing so but at one point I get a RuntimeBinderException, which doesn't tell me the exact details: "The best overloaded method match for Autodesk.Civil.DatabaseServices.PressurePipeNetwork

drawing line close to polyline

瘦欲@ 提交于 2019-12-11 04:05:52
问题 I have a Triangle as a polyline and I want to draw an Altitude. I give the command "line" or "_line" the right points but AutoCAD draws the line from the vertex to the adjacent vertex. It's not just in AutoLISP, AutoCAD won't let me draw a line from a vertex to the middle of an edge in a polyline. How can I do that? I thought of adding a vertex in the polyline, but this didn't help that much. I tried to add connector: a circle or another object close enough to the line and connect the

Launch AutoCAD 2015 from .Net process

扶醉桌前 提交于 2019-12-11 01:27:55
问题 I was trying to load AutoCAD 2015 from .Net process so that I can send commands to the document to create/modify blocks. I tried both of these approaches but none of them seems to work. 1st approach: AcadApplication app = new AcadApplication(); app.Visible = true; 2nd approach: var t = Type.GetTypeFromProgID("AutoCAD.Application", true); dynamic obj = Activator.CreateInstance(t, true); In both of the cases I am getting COM exception. Any help? It's not a duplicate as mentioned in comments, I

How can I improve the speed of .NET Plug-in Development?

无人久伴 提交于 2019-11-28 10:05:54
问题 I'm developing an AutoCAD add-in, which uses a .NET 4.6 assembly. I am finding the development process very frustrating; the API is very large and the documentation beyond getting started is all over the place and very hard to find. The only way to get anything done seems to be just prototyping functions in Visual Studio and seeing if it works. It then takes several minutes to load up AutoCAD and attach a debugger, which wrecks my prototyping workflow. It would be very handy if I could have