Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

what is macros? Customization using macros...

7 REPLIES 7
Reply
Message 1 of 8
subhesh_999
712 Views, 7 Replies

what is macros? Customization using macros...

hi!

could anyone tell me about how to crate macros of a drawing and then hw can we change the drawing by editing the macro please. E.g.. I have drawn a circle of 30 mm dia.. than need to crate macros for same and then by changing the dia of circle in macros I want to create new circle of 50 mm dia.

 

Another thing I wanted to ask is what is difference between visual lisp and visual basic.

 

Which is easier??

7 REPLIES 7
Message 2 of 8
hgasty1001
in reply to: subhesh_999

Hi,

 

Why do You need a macro for a task that it's easy for a command sequence like circle-radius and then copy multiple?

 

Autolisp is a high level programming language (by Autodesk) interpreted by AutoCAD (full or any AutoCAD based vertical product), it's based on LISP, and Visual Lisp is an extension to Autolisp that permit acces to COM exposed objects, and have some other improvements.

 

Visual Basic, if you mean for that VB/VBA,  is a programming language by Microsoft  that Autodesk  exposed to a model object of the dwg database that permit access to method and properties of AutoCAD objects with some OOP capabilities and with a good tool set for GUI design, but with very poor support (VBA) for 64 bit platforms . For other side there is VB .NET that it's a completely different thing with  full OOP capabilities and a complete tool set for GUI design (Windows Forms and WPF)

 

As for which one is more easy, it's allways depend on  personal issues, but if you have no knowledge about programming I'll choose AutoLisp/Visual Lisp  as it's more easy to learn and with native integration with AutoCAD. VB/VBA are beign deprecated (in AutoCAD)  in some way, so I think it does not deserve an effort to learn it. VB .NET it's a more (much) powerfull tool, but requires more knowledge or experience in OOP and system architecture to master it, also You will need MS VS  ( there are some free replacemente but with a trade-off) to program in VB .NET.

 

Finally, you can check this link that explain a lot of this: http://adndevblog.typepad.com/autocad/2012/07/the-right-tools-for-the-job-autocad-part-1.html

 

Gaston Nunez

Message 3 of 8
scot-65
in reply to: subhesh_999

VL and LISP are internal to AutoCAD. What you create here (for the most part)

can be used on other workstations without extra (external) loading of software.

 

VB and C are windows environments that *usually* require

some sort of application to be externally loaded on each

work station in order for the program to be run.

An ARX type file comes to mind. Don't go there (yet).

 

Judging by your number of posts, and the tempo of your inquiry, learn LISP, then VL.

 

A macro can also be called a script.

It is a chain of keystrokes all on one line.

Look into toolbars and pull-downs to further understand macros.

A semi-colon ";" is equal to [Enter], ^C^C is [Esc][Esc], Backslash "\" is pause for

user to select a point on the screen, a negative "-" in front of command name does

not bring up the command's dialog box, etc. (you get the idea...)

 

Good Luck!


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.


Message 4 of 8
Kent1Cooper
in reply to: scot-65


@scot-65 wrote:

.... 

A macro can also be called a script.

It is a chain of keystrokes all on one line.

.....


Macros and Scripts may share some characteristics in common [e.g. every character counts, including spaces, unlike in AutoLISP], but they are not the same:
 

Scripts can't take user input [they have nothing equivalent to \ in macros or pause in Lisp (command) functions].

Scripts don't use semicolons for Enter, but Enter itself [or a space where that's equivalent in a particular command].

Scripts don't recognize ^C as cancel.

Scripts can often be on one line, but won't be if Enters are used, and can't be if any command requires Enter rather than a space to complete something, such as at the end of Text content.

Macros are defined within your menu file, whereas Scripts are always external .scr files that must be invoked with the Script command.

....and probably a couple of other differences....

Kent Cooper, AIA
Message 5 of 8
subhesh_999
in reply to: hgasty1001

hi!

 

thanks for information.

 

Actually i am not want to chnge the dia of circle using macros.

 

I have to develope a code to generate beziur curve in AutoCAD and then want to generate even beziur surface.

 

I am moderately aware of AutoLISP.

 

what do you think wht is the right technology to work in for this task?

 

Message 6 of 8
scot-65
in reply to: Kent1Cooper

It is best if you stick to just helping out the OP instead of trying to bash everyone who IS helping.


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.


Message 7 of 8
Kent1Cooper
in reply to: scot-65


@scot-65 wrote:

It is best if you stick to just helping out the OP instead of trying to bash everyone who IS helping.


Well....  On a thread that's asking what macros are about, I don't consider it "helping" to suggest that they are the same as Scripts, when they are unequivocally not.  I corrected that piece of misinformation because I felt it would be helpful.  If that is considered "bashing," I will continue to bash away when it seems appropriate.  Please bash back when I post something erroneous -- I will appreciate knowing that I have done so, and having my misinformation corrected so others are not misled.

Kent Cooper, AIA
Message 8 of 8
hgasty1001
in reply to: subhesh_999

Hi,

 

I think you can try with Autolisp/Visual Lisp, as it have a good tool set for curve derivated objects(check the vlax-curve-XX functions in the docs), but i'm not sure about surfaces, may be you will need to jump into .NET to acomplish your task.

 

Gaston Nunez

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost