Seek a lisp/python/vba for handle different lisp on specific path with csv format table or/and excel table

Seek a lisp/python/vba for handle different lisp on specific path with csv format table or/and excel table

skchui6159
Advocate Advocate
439 Views
6 Replies
Message 1 of 7

Seek a lisp/python/vba for handle different lisp on specific path with csv format table or/and excel table

skchui6159
Advocate
Advocate

Can a lisp/python can handle a list of drawings (may be 1000 drawings) to do different action and load different lisps on a written excel table?

skchui6159_0-1736794042105.png

 

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

hosneyalaa
Advisor
Advisor

Please 

More details for your idea 

0 Likes
Message 3 of 7

paullimapa
Mentor
Mentor

seems like doable function with lisp.

The overall lisp function would rely on Lee Mac's Read CSV lisp to convert the csv contents into lists.

Then create a script file that would open each dwg, run the command, load the lisp, run the function & save the dwg.

My suggestion to make opening & loading of the lisp function easier would be to save the path using either double back slashes "\\" for example:

C:\\Users\\user\\Desktop\\Sample\\Drawing2.dwg,"(command ""_.circle"" (list 5 0) 5)",C:\\Users\\user\\Desktop\\Sample\\AddCircle_A.lsp,(AddCircle_A),Y

or single forward slashes for example:

C:/Users/user/Desktop/Sample/Drawing2.dwg,"(command ""_.circle"" (list 5 0) 5)",C:/Users/user/Desktop/Sample/AddCircle_A.lsp,(AddCircle_A),Y

 

 

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 4 of 7

Sea-Haven
Mentor
Mentor

Depending on what you intend doing if it is as simple as making a circle, then you can get Excel to control the CAD and make objects. Using a VBA macro. I have a simple example makes a Line, Pline, circle.

 

You can use excel to make the script "G2" =CONCATENATE("open ",A2," ",B2," ","save Y") just copy column G to notepad and save as a script .scr file. Limited testing, may need file name in quotes if they have spaces in their names.

0 Likes
Message 5 of 7

skchui6159
Advocate
Advocate

@Sea-Haven @paullimapa Thank you, great idea! I will try to write a vba export the copy reference of lisp and then write different condition of lisp. Finally, the wscript from Lee Mac to run the program!

0 Likes
Message 6 of 7

paullimapa
Mentor
Mentor

glad to have helped...cheers!!!


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 7 of 7

Sea-Haven
Mentor
Mentor

Your script can have lisp in it, if its only a couple of lines of code do it that way, if lots of code look at the (load "myprogram") have last line matching the defun name to run.

0 Likes