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
2 answers

Select Specific Entity Type AutoLisp

When selecting a point is there a way to filter OSNAP to only snap onto a specific entity type and not an entity of another type. eg Snap only to lines. setq startpt (*SNAP FILTER CODE* "LINE" (getpoint "\nChoose Start Line : ")) Snap only to…
Bigbob556677
  • 1,805
  • 1
  • 13
  • 38
1
vote
1 answer

Error IAutocadPlotFailed - Plotter runs async

I get the error IAutocadPlotFailed inside Autocad VBA macro. My code iterates over a collection of drawings and plots and saves them to png. I have managed to narrow down the error to being that the plotting mechanism run async. Due to being able…
panoskarajohn
  • 1,846
  • 1
  • 21
  • 37
1
vote
1 answer

Rebuild Multiple Splines in AutoCAD

I am looking for some function that will allow me to automatically "rebuild" 1 or more splines in AutoCAD. I have drawings that have hundreds of splines with 30-50 control vertices each. This makes drawings very slow to work with, especially when…
1
vote
3 answers

Autocad 2018 autoload dll

I am trying to automatically load dll files to Autocad 2018. How can i achieve that? I want to automate so it can do it on startup. With netload everything works. I have used *.lsp ways. Can someone please help? I have found plenty online of ways…
panoskarajohn
  • 1,846
  • 1
  • 21
  • 37
1
vote
1 answer

getting input on netloading assembly...?

i have developed an autocad plugin where i have hard coded some parameters that should be provided by the user.... I want the user to be able to provide the values of parameters right after he run the NETLOAD command in autocad and loads the…
1
vote
2 answers

Get UTC DateTime using AutoLISP

In AutoLISP, I found 2 ways of calling date CDATE and DATE. However I need to get the UTC datetime. I've been searching functions for it but unable to find any. Is there a way to get the UTC Datetime? Is it possible to manually subtract from or add…
njz
  • 47
  • 8
1
vote
0 answers

Autocad - Get all entities that have "Length" property - C# / dynamic / reflection

(Even if you don't know about Autocad, you can help if you know about dynamic C# objects) I'm trying to create an Autocad command, using .NET (C#), that allows the user to select entities, and from those entities, sum their lengths. The…
Daniel Möller
  • 84,878
  • 18
  • 192
  • 214
1
vote
1 answer

How to Generate Flyouts, Toolbars, and Buttons in AutoCAD 2017 using Visual Studio 2015

I wrote some DOT NET routines a while back in AutoCAD 2010 using Visual Studio 2010, but now we are upgrading to AutoCAD 2017 / Visual Studio 2015. I have successfully imported all of my code into the new environment, and everything works fine,…
mindofcat
  • 55
  • 1
  • 8
1
vote
3 answers

Cannot access variable from different namespace in AutoCAD plugin development

I am trying to pull a variable out of a Windows Forms page created in one application and pass it into an AutoCAD C# .Net function I have written. I am able to assign the value in the TextBox blockNameInput to another variable. I need to get that…
1
vote
2 answers

Revit/AutoCAD Plugin connection to Webservice/Server possible?

just a quick and basic principle question. Is it possible to create a Revit or AutoCAD plugin that can communicate with a Webservice/Server that is created by me (REST or Soap for example)? For example the user uses my Plugin enters some numbers or…
1
vote
1 answer

Autocad .NET - Get Layer width and height for plotting

i'm struggeling a little with my Autocad Plugin.. Since i have a huge amount of AutoCad Drawings to plot programmatically as a pdf-File i found out that some of them contain much unnecessary stuff on it. i only want to plot a specific area which is…
Cruik
  • 190
  • 1
  • 12
1
vote
3 answers

How can I check if line or point is inside or outside of area

In ModelSpace I have an area limited by some curves (joined them to have AcDbRegion). I have also drawn AcDbLine. What I need is to split line to get lines only inside area. I know how to get intersection points, but how can I find if line…
CAD Developer
  • 1,532
  • 2
  • 21
  • 27
1
vote
2 answers

Autocad API , reading block attributes casting error

I am receiving following error that "Unable to cast object of type autodesk.autocad.databaseservices.polyline to type autodesk.autocad.databaseservices.blockrefereance while reading block attributes with lot of stuff on drawing. Code: Dim db…
1
vote
1 answer

Calling LISP command from AutoCAD .NET Editor.CommandAsync

I am attempting to call an inbuilt AutoCad Electrical LISP command "c:wd_insym2" from .NET. I have recently installed AutoCad 2016 which now has the Editor.Command and Editor.CommandAsync functions, however all the help/forum posts that I can find…
Bill Peet
  • 477
  • 1
  • 8
  • 23
1
vote
1 answer

Autocad .NET add attribute to block definition

I'm trying to write an attribute 'injection' tool - that is, it prompts you for the name of the attribute, a point to insert it, then inserts it into the block definition (not just the reference), then syncs the local block reference. Here's what…
Bill Peet
  • 477
  • 1
  • 8
  • 23