SlideShare une entreprise Scribd logo
1  sur  3
Télécharger pour lire hors ligne
SOLIDWORKS Tutorials for Beginners - Introduction to
SOLIDWORKS VBA
Welcome. In this article in our SOLIDWORKS tutorials for beginner’s series, I'm going
to talk about some basics of working with SOLIDWORKS VBA/API. You might be
wondering what the heck these terms mean. VBA stands for Visual Basic for
Applications. API stands for Application Programming Interface.
Rather than talking about what this is at first, because I know you might just tune it all
out, just like Charlie Brown tunes out his adults ("blah blah blah), let's get right into it.
With SOLIDWORKS open, if you go to Tools on the standard menu strip, and scroll
down to Macro, then select New. A Save As dialog window opens; once you enter a
name and click Save (you can enter your own unique, descriptive name--this is what I
recommend) or just accept the default name, Macro1), you'll be in what's called the VBA
environment. This looks different than SOLIDWORKS, huh? You've just entered Visual
Basic for Applications. This is based on a Microsoft programming language, Visual
Basic.
If you've never used VB before, it might seem intimidating, but in reality it's actually
pretty simple once you wrap your mind around the basic concepts. Tremble not; you isn’t
goanna be doing any raw programming! You're just manipulating pre-programmed
objects. (For this reason, hard core programmers think Visual Basic isn't a serious
language, but as you can see, if you're in the VBA for SOLIDWORKS right now, it looks
real enough!)
Visual Basic is based on a language called Basic. This is a programming language
developed in the 1960s as a kind of learning language. In the 1990s, Microsoft released
the first Visual Basic for Applications for Windows-based applications. Today's Visual
Basic doesn't have much in common with its original Basic language, but Basic is in fact
its true foundation.
VBA works for many applications--Inventor, SOLIDWORKS, Microsoft Access,
Microsoft Excel and more. This is where you write some code to make custom changes to
the application, changes that you can't make by modifying the pre-programmed options in
the Options dialog window of the various software. So, in a nutshell, VBA is where you
tweak not your model, but the SOLIDWORKS software itself, to make it work for you
even better.
What is so great about VBA? Do you need this if you're just trying to do design work in
SOLIDWORKS? Maybe not, right now. But you'll find that with a small command of
VBA you can create a much more customized environment for your modeling work--
something that can help you speed up your work and increase your productivity. For
example, you can create your own custom tools, your own custom dialog windows and
options boxes etc.
You work in the Visual Basic for Applications in your SOLIDWORKS software, and it
connects to the SOLIDWORKS API (the application programming interface) to make the
changes you want. This concludes our overview of what VBA means; stay tuned for our
next installment of the SOLIDWORKS tutorials for beginner’s series where we'll learn
about creating and running macros, essentially your building block, and a little program
that you "write" simply by asking VBA to record your movements on screen.
About US:-
Video-tutorials.net is a family-based business that provides high quality video tutorial
training in Computer Aided Design (CAD) software like Solidworks Tutorials, CATIA
Tutorials, and Autodesk Inventor Tutorials and Autodesk AutoCAD tutorials.
Contact details:-
Video-Tutorials.Net
132-250 Shawville Blvd #136
Calgary, Alberta, Canada.
Zipcode-T2Y 2Z7
Tel- 403.254.9622
Email- info@video-tutorials.net

Contenu connexe

En vedette

Programming inexcelvba anintroduction
Programming inexcelvba anintroductionProgramming inexcelvba anintroduction
Programming inexcelvba anintroductionOfun Emma
 
E learning excel vba programming lesson 1
E learning excel vba programming  lesson 1E learning excel vba programming  lesson 1
E learning excel vba programming lesson 1Vijay Perepa
 
Intro macros in Excel 2007
Intro macros in Excel 2007Intro macros in Excel 2007
Intro macros in Excel 2007Hasrudin Tazep
 
Thiết kế kim loại tấm -Sheetmetal Solidworks (demo)
Thiết kế kim loại tấm -Sheetmetal Solidworks (demo)Thiết kế kim loại tấm -Sheetmetal Solidworks (demo)
Thiết kế kim loại tấm -Sheetmetal Solidworks (demo)Trung tâm Advance Cad
 
Belajar macro excel 2007
Belajar macro excel 2007Belajar macro excel 2007
Belajar macro excel 2007doni sandra
 
Manual solidworks
Manual solidworksManual solidworks
Manual solidworksmonique33
 
Solid works practicas esime azcapo
Solid works practicas esime azcapoSolid works practicas esime azcapo
Solid works practicas esime azcapoSicea Ingenieria
 
Introduction to visual basic programming
Introduction to visual basic programmingIntroduction to visual basic programming
Introduction to visual basic programmingRoger Argarin
 
SW 2013 beginners guide
SW 2013 beginners guideSW 2013 beginners guide
SW 2013 beginners guideRahman Hakim
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computersimran153
 
Introduction To Excel 2007 Macros
Introduction To Excel 2007 MacrosIntroduction To Excel 2007 Macros
Introduction To Excel 2007 MacrosExcel
 

En vedette (14)

Programming inexcelvba anintroduction
Programming inexcelvba anintroductionProgramming inexcelvba anintroduction
Programming inexcelvba anintroduction
 
Giáo trình phay solidcam
Giáo trình phay solidcamGiáo trình phay solidcam
Giáo trình phay solidcam
 
E learning excel vba programming lesson 1
E learning excel vba programming  lesson 1E learning excel vba programming  lesson 1
E learning excel vba programming lesson 1
 
SOLIDWORKS 2015 Overview
SOLIDWORKS 2015 OverviewSOLIDWORKS 2015 Overview
SOLIDWORKS 2015 Overview
 
Intro macros in Excel 2007
Intro macros in Excel 2007Intro macros in Excel 2007
Intro macros in Excel 2007
 
Thiết kế kim loại tấm -Sheetmetal Solidworks (demo)
Thiết kế kim loại tấm -Sheetmetal Solidworks (demo)Thiết kế kim loại tấm -Sheetmetal Solidworks (demo)
Thiết kế kim loại tấm -Sheetmetal Solidworks (demo)
 
Belajar macro excel 2007
Belajar macro excel 2007Belajar macro excel 2007
Belajar macro excel 2007
 
Manual solidworks
Manual solidworksManual solidworks
Manual solidworks
 
Excel ch10
Excel ch10Excel ch10
Excel ch10
 
Solid works practicas esime azcapo
Solid works practicas esime azcapoSolid works practicas esime azcapo
Solid works practicas esime azcapo
 
Introduction to visual basic programming
Introduction to visual basic programmingIntroduction to visual basic programming
Introduction to visual basic programming
 
SW 2013 beginners guide
SW 2013 beginners guideSW 2013 beginners guide
SW 2013 beginners guide
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computer
 
Introduction To Excel 2007 Macros
Introduction To Excel 2007 MacrosIntroduction To Excel 2007 Macros
Introduction To Excel 2007 Macros
 

Dernier

Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 

Dernier (20)

Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 

Solidworks tutorials for beginners introduction to solidworks vba

  • 1. SOLIDWORKS Tutorials for Beginners - Introduction to SOLIDWORKS VBA Welcome. In this article in our SOLIDWORKS tutorials for beginner’s series, I'm going to talk about some basics of working with SOLIDWORKS VBA/API. You might be wondering what the heck these terms mean. VBA stands for Visual Basic for Applications. API stands for Application Programming Interface. Rather than talking about what this is at first, because I know you might just tune it all out, just like Charlie Brown tunes out his adults ("blah blah blah), let's get right into it. With SOLIDWORKS open, if you go to Tools on the standard menu strip, and scroll down to Macro, then select New. A Save As dialog window opens; once you enter a name and click Save (you can enter your own unique, descriptive name--this is what I recommend) or just accept the default name, Macro1), you'll be in what's called the VBA environment. This looks different than SOLIDWORKS, huh? You've just entered Visual Basic for Applications. This is based on a Microsoft programming language, Visual Basic. If you've never used VB before, it might seem intimidating, but in reality it's actually pretty simple once you wrap your mind around the basic concepts. Tremble not; you isn’t goanna be doing any raw programming! You're just manipulating pre-programmed objects. (For this reason, hard core programmers think Visual Basic isn't a serious
  • 2. language, but as you can see, if you're in the VBA for SOLIDWORKS right now, it looks real enough!) Visual Basic is based on a language called Basic. This is a programming language developed in the 1960s as a kind of learning language. In the 1990s, Microsoft released the first Visual Basic for Applications for Windows-based applications. Today's Visual Basic doesn't have much in common with its original Basic language, but Basic is in fact its true foundation. VBA works for many applications--Inventor, SOLIDWORKS, Microsoft Access, Microsoft Excel and more. This is where you write some code to make custom changes to the application, changes that you can't make by modifying the pre-programmed options in the Options dialog window of the various software. So, in a nutshell, VBA is where you tweak not your model, but the SOLIDWORKS software itself, to make it work for you even better. What is so great about VBA? Do you need this if you're just trying to do design work in SOLIDWORKS? Maybe not, right now. But you'll find that with a small command of VBA you can create a much more customized environment for your modeling work-- something that can help you speed up your work and increase your productivity. For example, you can create your own custom tools, your own custom dialog windows and options boxes etc.
  • 3. You work in the Visual Basic for Applications in your SOLIDWORKS software, and it connects to the SOLIDWORKS API (the application programming interface) to make the changes you want. This concludes our overview of what VBA means; stay tuned for our next installment of the SOLIDWORKS tutorials for beginner’s series where we'll learn about creating and running macros, essentially your building block, and a little program that you "write" simply by asking VBA to record your movements on screen. About US:- Video-tutorials.net is a family-based business that provides high quality video tutorial training in Computer Aided Design (CAD) software like Solidworks Tutorials, CATIA Tutorials, and Autodesk Inventor Tutorials and Autodesk AutoCAD tutorials. Contact details:- Video-Tutorials.Net 132-250 Shawville Blvd #136 Calgary, Alberta, Canada. Zipcode-T2Y 2Z7 Tel- 403.254.9622 Email- info@video-tutorials.net