Customisation languages - VBA, Python or C?

Customisation languages - VBA, Python or C?

Anonymous
Not applicable
2,086 Views
2 Replies
Message 1 of 3

Customisation languages - VBA, Python or C?

Anonymous
Not applicable

I've started a new position in a company looking to automate a bunch of their working processes to save a lot of time cutting templates and then cutting material. I've been asked to do a trial of automating an example component and want some insight on which language to use - I need to do some relatively basic trigonometry and rudimentary equation solving (hard coded with rearranged terms rather than relying on a library like numpy or LAPACK) to calculate where line start/end points are and then to implement these lines in Autocad.

 

I've previously done a lot of work with Python and that is my normal go-to; but from what I've seen of the documentation for the pyautocad module it seems very limited. 

 

My other obvious options are VBA and C; neither of which I've worked with before but at least VBA has a slight advantage in being almost everywhere, will work with our other CAD software (not an Autodesk product) and I can simply bundle everything through an Excel spreadsheet so my less code-savvy coworkers can use what I make. 

 

Does anyone have any particular recommendations on which language to choose?

0 Likes
2,087 Views
2 Replies
Replies (2)
Message 2 of 3

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> My other obvious options are VBA and C

VBA is available for AutoCAD, but you need to install the >>>VBA Enabler<<<. Disadvantage here is that you can't run your tool on a system that does not have this enabler installed.

 

Alternative could be VB.NET or C#, these are good documented >>>by help<<< as well as a lot of support from www, like >>>this forum<<<. DLL's you create with Visual Studio can run on every system with AutoCAD (partially AutoCAD release dependent). From my side that would be the preferred way as you wrote that you also need access to Excel (e.g. there exist a lot of tools/ready-to-use plugins to read/write XLSX files without starting Excel)

 

Most complex would be ObjectARX which is C++ based, please find >>>here<<< some basic info's about that.

 

HTH, - alfred -

 

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2025
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 3 of 3

dgorsman
Consultant
Consultant

Don't forget LISP.  All those years, still going strong...

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes