Using AutoCad API/CLI to perform simple script automatically

Using AutoCad API/CLI to perform simple script automatically

eshelsil10
Explorer Explorer
677 Views
6 Replies
Message 1 of 7

Using AutoCad API/CLI to perform simple script automatically

eshelsil10
Explorer
Explorer

Hi there,
I want to use AutoCad's API or AutoCad's CLI in order to do the following automatically:
1. Upload a drawing (.dmg file)
2. Run a simple LISP (from .lsp file) on the drawing.
3. Publish the updated drawing (to a .pdf file for example).

I am currently using a free trial, but willing to pay for subscription in order to do so if this is possible.
Can I achieve that using the AutoCad Web App?
If not, can I achieve that using AutoCad (on Windows) & running CLI commands?
If not, is there any product (doesn't have to be free) that provides this ability?

Thanks,
Eshel.

0 Likes
678 Views
6 Replies
Replies (6)
Message 2 of 7

pendean
Community Legend
Community Legend
dmg file is a disk image file from MacOS, useless to use with any AutoCAD product line.
0 Likes
Message 3 of 7

eshelsil9
Community Visitor
Community Visitor

Thanks.

I meant .dwg file

0 Likes
Message 4 of 7

pendean
Community Legend
Community Legend

@eshelsil9 @eshelsil10 wrote:

Thanks.

I meant .dwg file


Got it: unless your LISP is too complex for AutoCADWEB, it should run just fine, BUT LISP is only available with an AutoCAD subscription, not available in the Trial https://help.autodesk.com/view/ACADWEB/ENU/?guid=AutoCAD_Web_Help_File_Management_Lisp_html#:~:text=...

pendean_0-1687273211209.png

 

and plot defaults to PDF there too as you've probably already found out if you are in the trial version.

There is no PUBLISH command (you also probably discovered that in the trial).

0 Likes
Message 5 of 7

eshelsil9
Community Visitor
Community Visitor

Thanks for that.

But this was not my question.

I want to do it automatically using a computer-sience script.

I want to tell my computer to create a drawing, then run a lisp on it and then publish to pdf.

I want it all to be done automatically without human intervention (meaning without me having to click on buttons or anything else)

0 Likes
Message 6 of 7

pendean
Community Legend
Community Legend
@eshelsil9 @eshelsil10 I'm not "autodesk", I am an end user just like you in these user-forums.

But by all means feel free to purchase a short-term subscription to AutoCADWEB, and/or grab a 30-day free trial of AutoCAD for MAC, to test out your entire needs and tools to ensure they meet your needs.
0 Likes
Message 7 of 7

derouensonp32
Community Visitor
Community Visitor

To achieve the automation tasks you mentioned, such as uploading a drawing, running a LISP script, and publishing the updated drawing, you would typically require access to the AutoCAD desktop application or AutoCAD's CLI. Using the AutoCAD desktop application on Windows, you can automate these tasks using AutoLISP, which is AutoCAD's native programming language.

AutoLISP allows you to write custom scripts that can perform various operations within AutoCAD, including opening, modifying, and saving drawings. You can also see the command function in AutoLISP to execute specific AutoCAD commands. To automate the process, you can create an AutoLISP script that opens the drawing, runs the desired LISP script, and then publishes the updated drawing as a PDF. You can execute this script manually within AutoCAD or create a custom AutoCAD command to run it automatically.

Regarding the AutoCAD CLI, as of my knowledge cutoff, the CLI primarily focuses on performing batch operations on drawings through the command line, such as converting files or running scripts. However, it does not have direct capabilities for running LISP scripts or publishing drawings to PDF.