Questions tagged [autocad-plugin]

External libraries (AutoLISP, ObjectARX, .NET) that can be integrated into AutoCAD for customization.

AutoCAD can be customized/enhanced using AutoCAD plugins, which are external libraries that can be developed and integrated into AutoCAD. The three widely used customization API's include AutoLISP, ObjectARX and AutoCAD.Net.

368 questions
9
votes
3 answers

Inserting a preexisting AutoCAD drawing into a current drawing

I'm trying to programmatically insert a block from a pre-existing drawing into the current drawing a plugin is running on. To do that, I have a button on my C#.NET form call the following method public void MakeAndInsertObject() //Method to add all…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
8
votes
1 answer

Set default value for string prompt

The editor class has a method called GetString which prompts the user for a string value via AutoCAD's command prompt. I call it in this wrapper method: public static string PromptUserForString(string message = "Enter a string: ", string…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
8
votes
2 answers

Store a C# Object into an AutoCAD entity's XRecord

I'm trying to find a way that I can store a C# class into an AutoCAD entity as an XRecord. For example, I have the following class: public class ExampleClass { private int x; private int y; public ExampleClass(int x, int y) { …
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
7
votes
1 answer

Azure SQL Database connection using Active Directory Integrated authentication fails to open

I'm attempting to connect to Azure SQL Database via Entity Framework with a connection string similar to this: Data Source=.database.windows.net;Authentication=Active Directory Integrated;Initial Catalog= The connection attempt is…
CalvinDale
  • 9,005
  • 5
  • 29
  • 38
6
votes
3 answers

Calling AutoCAD commands from C#.NET

I'm trying to write two methods which call AutoCAD's UNDO command and pass in different parameters. The first method calls UNDO and passes M which means mark the position of the drawing. The second method calls UNDO and passes B which means undo all…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
5
votes
1 answer

Autocad .NET - expand command line

I'm developing an Autocad .NET plugin (.dll loaded via NETLOAD), and I'm using a lot the Document.Editor object to get user inputs, like strings, numbers, points and entities. I want some of my prompts to show several options for the user to select…
Daniel Möller
  • 84,878
  • 18
  • 192
  • 214
5
votes
2 answers

ObjectARX, RealDWG or Teigha?

I'm planning on developing a piece of software that reads & manipulates data in a .dwg file. Instead of writing my own library that handles the 'reading' of the data file, I've decided to use either RealDWG or Teigha, however I'm struggling to…
Joe Morgan
  • 430
  • 2
  • 8
  • 19
5
votes
4 answers

Serialization Code Causes Unhandled Exception

I am attempting to create a some code that can serialize and deserialize a library of Classes into an AutoCAD drawing. This question has little to do with AutoCAD other than it being the reason why I cannot debug it by normal means. I started this…
5
votes
1 answer

Get Application that runs a Windows Form Control

I'm making an Autocad Plugin which runs fine using Windows Forms And I've created a user control (winforms) to replicate in any form I like in the future. The question is From the control's code, how do I get the instance of the application running…
Daniel Möller
  • 84,878
  • 18
  • 192
  • 214
4
votes
4 answers

How to make autocad addon run on many autocad version

i make an autocad add on with dot net 3.50 and i reference to acdbmgd.dll,acmgd.dll from autocad 2012 what can I do to make it run on both autocad 2010 and autocad 2011 if i should reference to acdbmgd.dll,acmgd.dll from autocad 2010 where can i…
Khalid Omar
  • 2,353
  • 5
  • 35
  • 46
4
votes
1 answer

How to find the options available for syntax in VBA

I was not sure of the appropriate terminology for the Title. Please suggest edits if my title is bad SITUATION I am running AutoCAD through Excel's VBA. As part of my coding, I am hard coding the base dimension style in AutoCAD. I am not using…
Forward Ed
  • 9,484
  • 3
  • 22
  • 52
4
votes
2 answers

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

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…
Steve Rukuts
  • 9,167
  • 3
  • 50
  • 72
4
votes
1 answer

Mimic the behavior of AutoCAD's viewcube with C#

I have an object which I draw in AutoCAD from my program. After the object is drawn I have the camera set so that it zooms to the wall looking down from the top view. What I then want it to do is to orbit 45 degrees down toward front view and 45…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
4
votes
1 answer

Method that prompts user to pick a group and gets that group's ID

I'm trying to write a method that prompts the user to pick a group and returns the ObjectId of the group so I can use it later. Right now that method looks like this: public static ObjectId PromptUserForGroup() { using…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
4
votes
2 answers

Load custom .net dll inside accoreconsole.exe

I am trying to load my custom .net dll inside accoreconsole.exe (AutoCAD 2016) using netload command but it fails to load the dll. Below is the output from accoreconsole.exe : Redirect stdout (file:…
amit
  • 363
  • 2
  • 10
  • 24
1
2 3
24 25