AutoCAD LISP Capability

AutoCAD LISP Capability

wluBNUD5
Explorer Explorer
1,686 Views
3 Replies
Message 1 of 4

AutoCAD LISP Capability

wluBNUD5
Explorer
Explorer

Hi all,

 

I was wondering if AutoCAD LISP is worth pursuing for certain needs.

 

Would it be possible to perform batch operations on files?

For example,

  • A GUI interface that allows users to select .dwg files
  • Then the script would scale the entire drawing by x amount and save as a .dxf.
  • Can the script then be converted to an executable that be used by AutoCAD LT users?

 

Is the above example possible with AutoCAD LISP?

0 Likes
Accepted solutions (1)
1,687 Views
3 Replies
Replies (3)
Message 2 of 4

cadffm
Consultant
Consultant

No problem (but perhaps you don't think about all things, it can be a lot of work, not just 1x scale command. Think about annotations or dimensions, Layouts/Viewports?)

 

It isn't a problem for Lisp api.

 

Load&run in LT? No! (no api in LT versions).

 

Sebastian

Message 3 of 4

CodeDing
Advisor
Advisor
Accepted solution

@wluBNUD5 ,

 

A GUI to select multiple files using AutoLISP is not within its capabilities. BUT you can accomplish something similar implementing a loop to capture single files individually OR use AutoLISP in conjunction with DCL dialogs to create dialogs capable of selecting multiple files. AutoLISP (or even scripts) CAN loop through multiple drawings to accomplish what you are asking, scaling.

 

While it is not recommend to learn VBA as a new language since it is trying to be phased out, if you already know this language you can easily create your own GUI and also have this accomplish what you wish.

 

.NET/ObjectARX/ActiveX (C, C++, C#, VB.net) ..these languages, while pretty hard to learn if you do not already know them, give the "ultimate" capabilities as far as what you would like to accomplish. Pretty much, if you dream it, you can do it.

 

AutoLISP:

No - GUI

Yes - Edit multiple drawings

Slow - Speed (compared to others on list)

Easy - Capability to learn/implement (compared to others on list)

 

AutoLISP + DCL dialogs:

Yes - GUI

Yes - Edit multiple drawings

Slow - Speed (compared to others on list)

Medium - Capability to learn/implement (compared to others on list)

 

VBA:

Yes - GUI

Yes - Edit multiple drawings

Medium - Speed (compared to others on list)

Medium - Capability to learn/implement (compared to others on list)

 

.NET (VB.net, C#):

Yes - GUI

Yes - Edit multiple drawings

Fast - Speed (compared to others on list)

Hard - Capability to learn/implement (compared to others on list)

 

Best,

~DD

Message 4 of 4

wluBNUD5
Explorer
Explorer

Thanks for the detailed response. I'll consider the pros/cons of each language and see which one best suits my needs.

0 Likes