Modules and Public

Modules and Public

Anonymous
Not applicable
351 Views
4 Replies
Message 1 of 5

Modules and Public

Anonymous
Not applicable
hi, i am just learning VBA
if any one can explain "Modules and Public" in visual Lisp way or AutoLisp way than it will be easier for me, Pls do not mind if the question are basic.
Thanks
0 Likes
352 Views
4 Replies
Replies (4)
Message 2 of 5

arcticad
Advisor
Advisor
A module is simply the container for your code.
It would be the same as if you has a FileName.lsp file and had a function written in the file.

When you declare a module public it is available to all the other modules in your project.

You can make a module with all your basic code and then use that in another module.
---------------------------



(defun botsbuildbots() (botsbuildbots))
0 Likes
Message 3 of 5

Anonymous
Not applicable
In addition to that,

when you create a module and write your sub routines in to it your going to want to declare them public or private. A public sub is visible by auto cad and recognized as an executable command, where as private subs can only be called up internally in the code. If your trying to learn VB a good book to try and find is Visual Basic 6: Step By Step. the writer does a great job explaining what the basics are, and presents the material in a fashion that people who have little to know experience can understand.

-Jakob
0 Likes
Message 4 of 5

Anonymous
Not applicable
In addition to above if you are working on a project and want to test if a certain code will work or not according to your requirment you can write a small module. In other words it is a good way to test your code.
Aslo if you have make a moule public you can access it from the autocad command line by typing "vbarun""
0 Likes
Message 5 of 5

Anonymous
Not applicable
Not only that but lets say you have a group of functions that you use more than once in multiple program solutions, you can reference the project that has the functions so you don't have to re-write them every time, and when you update the function you only have to do it once.

-Jakob
0 Likes