Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Anyone have a basic VBA script or info?

RMS1

New member
Does anyone have a basic VBA script that I can try out in SolidWorks? Also, It looks like the VBA help file is lacking compared to the AutoCAD VBA help files anyone notice this?
 
Use the macro recorder to get started. A VBA "script" is a native windows enhancement much like batch files. "VBA" is a powerful programming language extension that Solidworks has made available through their "API" - application programming interface. Which means that non-programmers like me can learn to use the functions with some work - not really rocket science, but technically challenging nonetheless. The VBA source code when used with the macro functions can be edited to suit. This is how I got started.
 
VBA is very powerfull, I sit next to a programmer that uses it and he does some really cool things; I used the word script / macro loosely. I will look into this macro recorder to get started, thanks.
 
RMS1 said:
VBA is very powerfull, I sit next to a programmer that uses it and he does some really cool things; I used the word script / macro loosely. I will look into this macro recorder to get started, thanks.


realy? what all cool can u do with it?
 
Well depending on a persons programing skills, VBA can basically automate any drawing task, i.e. lets say you need to make 500 dxf rectangles that will be cut on a CNC, and the first one has to be 2" x 2" and each one after that needs to be 2" bigger, You write a VBA program that will automatically do this for you and file each part for you and it will run and complete all 500 parts in just minutes.
 
RMS1 said:
Well depending on a persons programing skills, VBA can basically automate any drawing task, i.e. lets say you need to make 500 dxf rectangles that will be cut on a CNC, and the first one has to be 2" x 2" and each one after that needs to be 2" bigger, You write a VBA program that will automatically do this for you and file each part for you and it will run and complete all 500 parts in just minutes.


where can I get VBA for Solidworks?
 
VBA is the way forward
smiley2.gif


Edited by: jackd
 

Sponsor

Articles From 3DCAD World

Back
Top