Questions tagged [autocad-scripts]
33 questions
2
votes
1 answer
How to let user select entities or KWord in AutoLISP?
In my command I want to let user select entities, but if he wants, he should be able to use KWord.
Something like command with prompt:
Select elements od [Settings]:
I know that I can use KWord while entsel.
But entsel allows me to select only one…

CAD Developer
- 1,532
- 2
- 21
- 27
1
vote
1 answer
Is there any Python Library for Extracting Data from AutoCAD .dwg/.dxf files?
I need to extract data from different layers in .dwg/.dxf files in Python. Layers information includes metadata as well as different block information used in the drawing(color, length, width, etc.). Is there any library in Python that can do all…

Adithya
- 25
- 3
1
vote
2 answers
Is there any method to find and replace text by using AutoLISP scripting?
I would like to programmatically to produce a code for AutoCAD using VBA. The code will find and replace text in the AutoCAD. I found that AutoLISP allow using script to call the command in AutoCAD. However, since "Find" command will induced the pop…

SAFGKAGN
- 21
- 3
1
vote
0 answers
Pyautocad iter object stops iteration
I have this error why? I have something like 2000 text and it just stop iterating after several one.
from pyautocad import Autocad
import comtypes
import regex, time
acad = Autocad()
textGroup = []
for i in acad.doc.Modelspace:
…

Beka Tchigladze
- 95
- 1
- 8
1
vote
1 answer
I want to open existing dwg or dxf file with python in my prompt
I want to make an python script to extract information of existing dwg/dxf file.
I thought pyautocad can help me, but I cannot find correct way to do this.
I heard that pyautocad use AutoCAD ActiveX
so try to use Open method of AutoCAD ActiveX (Here…

JY Kim
- 11
- 4
1
vote
0 answers
AutoCAD - accoreconsole.exe won't exit after executing the script file
We created a tool which depends on AutoCAD's accoreconsole.exe to batch process AutoCAD drawing files. We have the processing logic in a .NET DLL that will be NETLOAD from the script (.scr) file. It was working fine for the past 1.5 years, but…

Dhilip H
- 594
- 4
- 10
1
vote
0 answers
Batch processing multiple groups of *.shp files in autoCAD Maps 3D 2021
I am new to batch files and AutoCAD scripts, so at this point I'm curious about if my proposed path makes sense, or if there is a much better way to do it.
Basically I have a set of *.shp files in this…

robosocks
- 11
- 1
1
vote
1 answer
AutoCad .net project using Visual Studio Code
I was trying to figure out if it is possible to set and debug a vb.net/C#.net AutoCAD project using VS Code? Sorry if this is a silly question but I do not have extensive experience in this area. So far I've been able to follow tutorials, set and…

majkel
- 11
- 2
1
vote
1 answer
How to delete all Attributes from all Blocks with AutoLISP using ObjectDBX
I want to delete all attribute of block inside drawing using AutoLISP ObjectDBX method.
The below program works well: it deletes the attributes of all blocks inside the drawing, but when I edit this block in the Block Editor, I see all the…

Dinesh Vilas Pawar
- 493
- 2
- 5
- 18
0
votes
1 answer
AutoLISP - moving objects on CANNOSCALE variable change
This is a follow-up question to the one I asked a while ago (An AutoCAD LISP routine that moves objects based on the annotative scale).
Since that one I've been learning AutoLISP and have come up with a code, but it I am stuck on the last step -…
0
votes
2 answers
An AutoCAD LISP routine that moves objects based on the annotative scale
A little bit of background:
I am creating a template for my team of drafters to use. We have a set of commonly used objects (les't call them "markers"), like section markers, leaders, dimensions, title blocks, etc. all set up in a table (not a real…
0
votes
1 answer
How do I make a Typed Value for the actual color of an entity in Autocad .NET
I'm trying to select by color using the typed value below in a selection filter:
new TypedValue((int)DxfCode.Color, myColor)
The problem with this is that some entities have the color values 'byblock' or 'bylayer'. Is there a way to filter on the…

damien
- 43
- 5
0
votes
1 answer
Add attributes existing Autocad block with python
I have multiple autocad files with tons of blocks already defined. I would like to write a python script that for each file adds 3 new attributes to each block.
I tried the following code:
import win32com.client
import pandas as pd
from pyautocad…

Bire
- 3
- 2
0
votes
0 answers
How can I turn this code to use cross-window selection instead of selecting two points?
This code currently allows to create a 1st dimension line (200m away from the object) and 2nd dimension line (100mm away from 1st dimension) by selecting 2 points. However, I wanted it to be a cross selection instead where it would automatically…

codeTester-
- 83
- 7
0
votes
0 answers
A lisp routine that can adjusts dimension lines after selection? Is it possible?
I am currently looking for that code where a user can select dimension lines (either plates with only one first dimension or with 2 dimensions) and upon "enter" would automatically set all the dimension lines to the following:
Note: Annotation scale…

codeTester-
- 83
- 7