Questions tagged [autocad-scripts]

33 questions
0
votes
1 answer

How to pop up an alert with a TEXT/MTEXT's value in AutoLISP?

I am trying to create a function wherein it would ask a user to select a text (either TEXT/MTEXT) then it would simply alert the value of that TEXT/MTEXT's color, layer, contents, and height which are stated in the properties. I have this code but…
0
votes
1 answer

AutoLisp Autocad; "; error: no function definition: [DEFINE "

Hi my Dearest Friends.. I get this message "; error: no function definition: [DEFINE " when I run the below AutoLisp code in AutoCad, Could please somebody show me what is expecting Autocad?, what does it expect [ Define..?.. how can I do…
fevera13
  • 11
  • 1
0
votes
1 answer

How to Convert Dwg File TO Pdf File Using Design Automation / Autodesk Platform API

We want to convert dwg file to pdf using design automation or autodesk platform services api. We have created a autocad plugin, that creates the desired dwg file and upload it oss bucket, we want to convert dwg file present on oss to pdf file. We…
0
votes
0 answers

Drawing created by incompatible version - Save will be prevented || Design Automation API

We created a autocad plugin, that draws a border around the object present in dwg file. It works fine for all the created using autocad. We have a file created with autocad mechanical 2022, for which design automation gives error " Drawing created…
0
votes
1 answer

How we can open autocad template from url and read dwg file from cloud storage

We want to create a new drawing using autocad plugin (.net) and using a custom template. We have custom template on cloud storage ( www.filepathtodwg.dwt ) and for now it is a publically accessed URL. When we are trying to create new drawing using…
0
votes
0 answers

Insert A xref component view into Autocad-ME

I been trying to figure out how to import an xref view into my dwg in VBA Autocad-ME. I have found code online that use .AttachExternalReference. But this only attaches the whole drawing and not an specific component. I do even know if this is…
0
votes
0 answers

Autocad Commande Bar

I'm working on an c# app that does some stuff in AutoCAD and I would like to know how can I control AutoCAD command bar (Editor Bar Command) "Closed" "opened" Sorry for my English
Y_93
  • 3
  • 1
0
votes
0 answers

C# with AUTOCAD Attribute in block gets corrupted during mirroring

public class ClassAdı { [CommandMethod("DOOR")] public static void Door() { double bölge = 0, derece = 0; string block_name = "DOOR"; var doc = Application.DocumentManager.MdiActiveDocument; var db = doc.Database; var ed = doc.Editor; var…
0
votes
0 answers

What is the enclosed asterisk syntax *doc* in AutoLISP?

I ran into the following AutoLISP code on another forum and I'm trying to understand what the enclosed asterisks mean: (vl-load-com) (setq *doc* (vla-get-Documents (vlax-get-acad-object))) (vla-get-Count *doc*) Link to source post I tried searching…
0
votes
0 answers

Extract and modify Xref path(s) in an AutoCAD files to save-as elsewhere?

My company has a series of "standards" for our CAD files that nobody seems to follow for archiving old CAD files (I'm trying to get them to upgrade to BIM Collaborate or something , but it's expensive; side issue; I miss version control from my SWE…
audiFanatic
  • 2,296
  • 8
  • 40
  • 56
0
votes
1 answer

Run a Script within Autocad from Excel

I have an excel workbook that creates an runs several calculations to create a new sheet. From this new sheet it plots an array of commands for Autocad once it's exported to an AutoCAD script. The script is saved to a predifined location…
0
votes
1 answer

pyautocad - automate drawing - import DWG - write text - import image

i'm not a professional coder and i'm so sorry for my english :) i hope you understand. I'm trying to automate part of my job. i have to create dwg; every layer for me is a sheet (like A4 paper), for that reason i have to change layer and import…
Artichoke
  • 1
  • 2
0
votes
1 answer

Modify Lee Mac's Length and Area Field to automatically copy the outputted length to clipboad

I'm using Lee Mac's length and area field to automatically get the total length of an object. I'm a complete beginner on AutoLisp so I cant find the variable responsible on holding the total length so I can put it in my snippet code to automatically…
Cary Bondoc
  • 2,923
  • 4
  • 37
  • 60
0
votes
1 answer

AutoCAD Core Console: Simple script will not explode all blocks in drawing

I am using AutoCAD Core Console to run a script via batch file to explode all blocks in a folder of AutoCAD drawing (DWG) files. Batch file FOR %%f IN ("%~dp0*.dwg") DO "C:\Program Files\Autodesk\AutoCAD 2021\accoreconsole.exe" /i "%%f" /s…
Mark
  • 565
  • 1
  • 8
  • 19
0
votes
1 answer

Grading Group Creation in Civil 3D

What is Grading Groups function in Civil 3D? Can someone point me in the right direction to understand it's proper use? Thanks in advance for your help.
user1028866
  • 795
  • 2
  • 8
  • 19