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

How can I refer to AutoCAD block

I having autocad project where is 1 dynamic block which I'm trying to change from excel. Here is vba script which I'm using to change block: Dim dybprop As Variant, i As Integer Dim bobj As AcadEntity For Each bobj In ACADApp.ModelSpace If…
2
votes
2 answers

Adding resources to an instance of WPF window

I'm making an AutoCAD .net program that has a WPF window as the interface. Currently the WPF interface is being referenced into the AutoCAD .net aplication and I'm calling the window from AutoCAD as follows. public class Class1 { public static…
Tim
  • 173
  • 1
  • 11
2
votes
1 answer

AutoCAD - Save as DXF in Sub Folder

I found this code online to save a selection from an AutoCAD DWG into a DXF format in the project folder. I am not well versed in AutoLISP. What do I need to change to save all of these drawings in a subfolder called "CNC Parts"? ;save selection as…
2
votes
2 answers

Use AutoLISP to Generate New Dimension Style

I would like an AutoLISP routine that automatically creates a new dimension style with my custom settings. I know it is possible to copy dimension styles from one drawing to another, but it is tedious and time-consuming to have to do this each…
2
votes
1 answer

How to add items from a list to an AutoCAD file in C#?

I am am writing a windows form App(plugin) which create layers in AutoCAD from selected list box items using C#. I am pretty new to programming, please forgive if I made any errors. I have created a method which returns a list of selected layers…
abhi
  • 1,920
  • 6
  • 24
  • 27
2
votes
1 answer

How to create AutoCAD Layers using windows forms?

I'm working on creating a windows form plugin to create Layers from the user selected items on my windows form. I am reading a list of Layers in to a list box(lbGetLayers), a list of modifiers in to another listbox(lbModifyer) from two different csv…
Rck7
  • 41
  • 9
2
votes
2 answers

AutoCAD .NET Selection set filter: What types of entities can be add to the filter to be selected?

I am using selection set filter to select certain types of entities in a drawing. It happened to me that I can add Line, Circle, Ellipse... to my filter for the types of entities to be selected. However, I can not add Polyline to the filter. Why is…
Thế Long
  • 516
  • 7
  • 19
2
votes
2 answers

autocad .net storing and retrieving object Id without using ObjectId

I am working on a autoCAD .net project in which I create a MVVM pattern to select and modify an entity. I want to store the selected entity 's info/values into the view model, change the info/values (through the WPF UI that pops up and through my…
Thế Long
  • 516
  • 7
  • 19
2
votes
1 answer

Run AutoCAD Commands in session Context

I need to batch import dgns. I can do this using the latest command options in the api using: Application.DocumentManager.MdiActiveDocument.Editor.Command("-dgnimport", currentdgnname, "", "Master", "Standard"); However, the issue is that I also…
2
votes
2 answers

AutoCAD C++ When AcDbEntity need to open for read?

I’m not sure when open entities for read is necessary, and when it may be omit. For example I know I don’t need to open entity when I want to use objectId() but there are some methods which require to open entity before. I don’t know if it’s…
CAD Developer
  • 1,532
  • 2
  • 21
  • 27
2
votes
1 answer

Are these function definitions not the same?

PowerShell 4.0 It works fine: $cad = [Autodesk.AutoCAD.ApplicationServices.Application] function Get-DocumentManager { $cad::DocumentManager } function Get-CurrentDocument { $cad::DocumentManager.MdiActiveDocument } function Get-CurrentEditor {…
Andrey Bushman
  • 11,712
  • 17
  • 87
  • 182
2
votes
2 answers

Launch AutoCAD 2015 from .Net process

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…
Rohit Vats
  • 79,502
  • 12
  • 161
  • 185
2
votes
1 answer

Why are AutoCAD Plugins dependent on particular Visual Studio versions?

Autodesk mentions here that AutoCAD plugins need to be developed with a particular Visual Studio version, e.g. AutoCAD 2016 (supports Microsoft Visual Studio 2012 and 2013) AutoCAD 2015 (supports Microsoft Visual Studio 2012) ... Why is it like…
mamuesstack
  • 1,111
  • 2
  • 16
  • 34
2
votes
1 answer

Odd behavior from C# rotating function

I'm trying to programmatically rotate the purple block in AutoCAD shown here by 90 degrees so that it lines up with the orange block. The purple block's base point is the lower left hand corner. Using AutoCAD's built in rotate function gives me the…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
2
votes
2 answers

How to apply a transformation for a group of entities inside a polyline?

I have a group of entity objects inside a polyline entity that I want to rescale. I have created Extents3d object to rescale the objects in order to avoid rescale objects one by one, but it doesn't work: Document document =…
user5052625