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
4
votes
1 answer

AutoCAD Plugin Can't Locate Resources

I have written an AutoCAD plugin that displays images based on what form item the user has selected. An example of an image being called to display would be previewBox.Image = System.Drawing.Image.FromFile("Window Width.PNG"); However, even though…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
4
votes
2 answers

Changing the color of a leader in AutoCad

I'm currently working on converting a VBA AutoCAD-application over to VB.NET, and the current command I'm working on is creating a simple leader with code like this: Set leaderObj = ThisDrawing.ModelSpace.AddLeader(points, blockRefObj,…
Alxandr
  • 12,345
  • 10
  • 59
  • 95
4
votes
1 answer

AutoCAD -INSERT command in .NET

I have been tasked with translating an AutoCAD plugin from VBA to VB.NET, and I'm currently a bit stuck. The command I'm working on creates a new layer (or select it as the active layer if it already exist), then executes 2 "-INSERT" commands giving…
Alxandr
  • 12,345
  • 10
  • 59
  • 95
4
votes
4 answers

Retrieving properties of AutoCAD object in C#

I am attempting to interrogate AutoCAD objects from C#. I am interested in being able to grab all of the properties of a given object and output them. For example, in the below snippit of code I am looping through all of the items on screen and…
Jason Jackson
  • 17,016
  • 8
  • 49
  • 74
4
votes
1 answer

How to catch unhandled exceptions thrown in AutoCAD.NET

In my Autocad.NET app I want to log all unhandled exceptions using log4net. AutoCAD itself shows an error dialog with a detailed message -> so there must be a way to register to a certain event. I tried to register the…
mamuesstack
  • 1,111
  • 2
  • 16
  • 34
3
votes
2 answers

How to check if application is running using AutoLISP

In CAD application (ZWCAD) I start my application by AutoLISP. (startapp "C://[path]//Application.exe") so the application runs each time new file is created. Works OK. Now I want to limit instances of application just to one. So how can I check…
CAD Developer
  • 1,532
  • 2
  • 21
  • 27
3
votes
1 answer

Saving AutoCAD files (.dwg) using Python

I am using win32com to automate some simple tasks in AutoCAD. It's mostly been working quite well except for being able to save files. My goal is to open a (template) file, adjust it depending on what is needed then save the file as a .dwg in…
Jowizo
  • 57
  • 1
  • 5
3
votes
1 answer

Set and Reset of System Variables - AutoCAD LISP

I'm trying to make drawing wiring diagrams extremely easy in AutoCAD with next to no button presses other than my pre-programmed ones. One involves a LISP that is not playing nicely with setting system variables and then resetting them to what they…
3
votes
3 answers

How to create an AutoCAD object through a Lambda expression and return it

I am new-ish to C# programming (and programming in general) but I'm getting my feet wet with AutoCAD development using the AutoDesk .NET API for projects at work. There are certain repetitive tasks in AutoCAD dev that I've been creating helper…
Kefka
  • 89
  • 7
3
votes
2 answers

What is the order of load AutoCAD plugins?

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…
CAD Developer
  • 1,532
  • 2
  • 21
  • 27
3
votes
1 answer

Execute Code On Lisp Exit

I have a lisp written that involves setting a variable, then selecting points inside of a loop. Once I decide that I am done selecting points, I would like to be able to revert that variable back to what it was originally when I press the escape…
Bigbob556677
  • 1,805
  • 1
  • 13
  • 38
3
votes
0 answers

AutoCAD's PolygonMesh Class behaving weird (C#)

I'm trying to draw a series of polyhedrons in AutoCAD that represent a wall. Each part of the wall is one individual polyhedron which will all eventually be grouped together. I'm trying to draw them as PolygonMeshes so they can be rendered as solid…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
3
votes
1 answer

Creating a Solid Block from a Group of Lines in AutoCAD (C#)

I'm trying to draw a solid 3D shape in AutoCAD programmatically. I can get the shape to draw as a wireframe. Here is what my code currently draws The object is a bunch of AutoCAD lines grouped together into a Group object. What I want is a method…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
3
votes
1 answer

Orbiting the Camera in AutoCAD 2015 with C#

I'm writing a static class which contains methods to simplify working with AutoCAD's camera. All my methods seem to work except for orbit. Heres my orbit method in the context of my class public static class CameraMethods { #region…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
3
votes
1 answer

Where Did AutoCAD API's Application.AcadApplication object go?

I'm trying to write a method to zoom to the extents of a drawing in AutoCAD using C#.NET and the latest version of ObjectARX. I googled for an example of someone doing that and found this post which has the following…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
1
2
3
24 25