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
1
vote
1 answer

how to make c# window form of AutoCAD plugin and AutoCAD itself available simultaneously

I have created a basic plugin for AutoCAD. In my plugin some task is being done through c# windows form. My end user require to access autocad while windows form is open. Currently AutoCAD is being un-accessible if c# windows form is open. To use…
Vishal Goyal
  • 193
  • 14
1
vote
2 answers

How to set the Constant property AttributeReference?

Is it possible to change the Constant property of an AttributeReference ? (the property IsConstant is readonly)
Florian
  • 4,507
  • 10
  • 53
  • 73
1
vote
1 answer

Autocad: C:\Program Files\Common Files\Autodesk Shared

what's the use of this folder? I need to load a lisp in automatic way without using acad.lsp and acaddoc.lsp. Will I find there the answer? I'm asking that because i saw an add-on i have load something from there. Thanks guys, Dennis
Dennis Grasso
  • 123
  • 1
  • 2
  • 11
1
vote
2 answers

Programmatically Import Block Into AutoCAD (C#)

I'm writing a plugin for AutoCAD and want to import all the blocks it will use at the beginning to make sure that they are available when needed. To do that, I use this method public static void ImportBlocks(string[] filesToTryToImport, string…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
1
vote
1 answer

Creating an Autocad Solid 3D from a list of vertices

So I've looked all over Auto Cad's documentation, and it seems the most common ways to generate a Solid3d, is to extrude a region. But suppose I actually have a list of points, or a list of faces. Does Auto Cad have methods for creating a Solid3d…
Charles Taylor
  • 686
  • 6
  • 23
1
vote
1 answer

Using Python to count the number of layers in a AutoCAD file

I've created a GUI using PyQt5 wich takes shapefiles and one .dwg file as inputs. In the .dwg file, I have a certain amount of standard layers that should be inside. If one or more of those layers is missing, I would like to be able to inform the…
guy16
  • 233
  • 2
  • 3
  • 16
1
vote
1 answer

How to Embedded Autodesk Viewer on winform vb.net

I need to finish an older project where AutoDesk Viewer is Embedded on a Winform. This project was done several years ago using what I assumed an older version of Autodesk. I can see on the Reference that they have a AxACCTRLLib.AxAcCtrl.dll. I…
CodeEngine
  • 296
  • 1
  • 9
  • 28
1
vote
0 answers

Exponential map algorithm gives bug in case of sphere, need solution to fix issue

I am trying to decal sketch on mesh using exponential map. While generating exponential map, I am calculating plane by initial point on mesh and normal calculated on mesh by that point. then algorithm calculates nearest vertices from that point and…
1
vote
1 answer

Override/Customize AutoCAD Command

Is there a way to override/customize an existing AutoCAD command? When I'm calling... Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument; doc.SendStringToExecute("_.3DROTATE\n", true, false,…
user2479356
1
vote
1 answer

AutoCAD: Access group pivot in C#

I am writing a plugin for AutoCAD in C#. I would like to change the position of the pivot point of a group. It is possible to do that by mouse clicking but after deselecting and reselecting the group, it automatically moves back to it's default…
user2479356
1
vote
2 answers

Why is MdiActiveDocument null in the beginning in AutoCAD 2015+?

I am working in AutoCAD 2014 using Visual Studio 2013. With my code I access the MdiActiveDocument's database from the DocumentManager . Using the database I start a transaction and use the GetObject method of the transaction to retrieve Entity…
scott_f
  • 838
  • 8
  • 17
1
vote
1 answer

How do I properly delete ACAD DBObjects?

Found this out on my own after finding some stuff online. Took me a while but for anyone who wants to know how to do it see below. Also, the code I posted had a big problem with it acText was never declared in it. I was also setting it equal to…
IByrd
  • 177
  • 1
  • 13
1
vote
0 answers

Properly Scaling AutoCAD Tables with C#

I'm trying to scale a table generated by my AutoCAD plugin. However the following code public void formatCells() { Transaction tr = doc.TransactionManager.StartTransaction(); DocumentLock docLock = doc.LockDocument(); …
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
1
vote
2 answers

How do we set the AutoCAD layer viewport override values

We have a requirement to add multiple viewports in a single layout and each should have a different layer theme. Am aware of the viewport overrides- VP Color, VP Linetype, VP Lineweight. I was able to set this directly in autocad as well. I need to…
nonexistent myth
  • 135
  • 1
  • 14
1
vote
1 answer

An Error Occurred during Save the drawing in Autocad

I have try to save drawing using ActiveDocument.save(). But i received Warning message some thing like "warning an error occurred during save we recommend that you run recover". Can anybody help me how to solve this. Thanks in Advance..
Sivaperuman
  • 239
  • 1
  • 4
  • 21