SlideShare a Scribd company logo
Automating SolidWorks with Excel Robert Mengel, Design Automation Consultant Paul Gimbel, Business Process Sherpa Razorleaf Corporation
Not Sure If You Should Stay or Go To “Redneck Workarounds?” We will cover: Creating fast, robust, and FREE user interfaces for SolidWorks automation Accessing Visual Basic for Applications (VBA) through Excel Connecting Excel to SolidWorks through VBA Building SolidWorks VBA code for use in Excel Accessing Excel references through VBA Driving SolidWorks automatically and bulk processing with loops *We know that VBA is not truly object-oriented, but for those that would choose Excel as a programming environment over Visual Studio 2010, it’s close enough.
DISCLAIMER!!!     More information is available There is so much that you can do with this stuff!! We wanted to spend adequate time and detail on what we do cover. Everything is documented in the PowerPoint Download it from the SolidWorks World Site Download it from the Razorleaf Site (link on the handout) Give me a business card and I’ll email it to you Read the Presenter Notes Come on up after the session with any questions Take our business cards...take a few and hand them around Check out some of our other presentations on these and other topics www.razorleaf.com   or   www.slideshare.net
BACKGROUND Razorleaf Corporation SolidWorks Service Partner Services ONLY (we’re not trying to sell you any products, we’re neutral) Data Management (EPDM, Enovia, SmarTeam, Aras, V6, MatrixOne) Design Automation (DriveWorks, Tacton, Custom Programmed API) Workflow Automation (Microsoft SharePoint and Tools) Bob Mengel Mechanical Engineer and Automation Developer/Implementer Paul Gimbel (aka “The Sherpa”) Mechanical Engineer, SolidWorks Demojock,  Automation Implementer All Razorleaf presentations will be available at www.razorleaf.com and on www.slideshare.net
Your Options Pure SolidWorks functionality SolidWorks Macros Microsoft Excel (and some VBA, of course) Maximized use of Excel and VBA Custom developed application Commercially available solution partner product AutoDesk Inven…nah, who are we kidding.
Pure SolidWorks Configurations Design Tables Configuration Publisher Smart Components Mate References DriveWorksXpress Design Checker SolidWorks Task Scheduler
What Do You Mean SolidWorks Has Limitations!?!? All of these functions require interaction with the user SolidWorks is required  Great for your reseller, not so great for your budget Puts non-engineers in an uncomfortable environment Requires at least some SolidWorks training Do you really want a salesperson opening your models!?!? Data management issues One file with tons of configurations? How big is that file, eh? Multiple people can not edit one file at the same time Multiple people can potentially crush your carefully constructed model Revision questions Save As Copy every time? What about updates?
SolidWorks Macros Run completely inside of SolidWorks Requires SolidWorks licenses for all involved May not be the best environment for all users Anything that’s not in SolidWorks has to be coded Designed to drive the SolidWorks User Interface Not all that automation-friendly OK to use for small functions Some 5 or 6 step operation that you want to hotkey Can be tough to share due to peoples individual settings VSTA (.NET) macros require some programmatic acumen
The Road To Excel Design Tables alone don’t address User Interface Input values as opposed to output values Advanced Excel functionality  Leverage Excel Use Excel User Interface tools Add-Ins (Analysis Pack, Solver, etc.) Data validation User Defined Functions Macros
Excel and SolidWorks – So Happy Together Three Methods To Integrate SolidWorks and Excel Design Table Embedded in the SolidWorks model Must edit through SolidWorks Edit Table In New Window to gain access to Excel MUST BE IN THE DESIGN TABLE SHEET WHEN YOU EXIT!! External Spreadsheet with Macro to drive SolidWorks Requires SolidWorks API programming Separates workbook from SolidWorks model Does not require SolidWorks (until macro is run) Shareable (through Excel Share Workbook functionality) Can be used to drive multiple SolidWorks files Can be used to drive other things as well, not just SW Spreadsheet with Macro Inserted as OLE Object
What Excel Brings To The Party (a six pack?) User Interfaces Powerful and flexible formatting Charts and support for graphics Dynamic tools to help user inputs and selections Advanced equation functionality VBA Custom functions Macros Object-Oriented Programming (well, sort of)
Just A Little Bit Of Work Makes A Huge Difference Some People’s Idea of an Excel User Interface Less Than Twenty Minutes Of Work
Building User Interfaces in Excel ,[object Object]
Lists, error and warning dialogs, tool tipsIn-Cell Dropdowns Input Messages Error Messages Warning Messages
Building User Interfaces in Excel ,[object Object]
Control user’s attention based on input
Data Validation
Lists, error and warning dialogs, tool tips,[object Object]
Lists, error and warning dialogs, tool tips
Conditional Formatting
Control user’s attention based on input
Tools, Protection
Unlock/show only cells you want them to be able to change,[object Object]
Lists, error and warning dialogs, tool tips
Conditional Formatting
Control user’s attention based on input
Tools, Protection
Unlock/show only cells you want them to be able to change
Control Toolbox
VB-style input devices that can fill in your cells,[object Object]
Lists, error and warning dialogs, tool tips
Conditional Formatting
Control user’s attention based on input
Tools, Protection
Unlock/show only cells you want them to be able to changeControl Toolbox VB-style input devices that can fill in your cells ,[object Object]
Help users understand what information they need to input,[object Object]
Calculations in Excel Name Your Cells and Ranges Just as in SolidWorks, it makes equations easier to read Add Comments In adjoining cells or with the comment tool Keep your formulas simple whenever possible Multiple calculation steps are easier to troubleshoot Intelligent Layouts Don’t scatter stuff all over the place Consider cells that may need to be adjacent for lookups, etc. Give this collection of cells a single name
2.9 Searches until it finds a value that is “greater than” the search value, then goes back to take the previous one. Working with Ranges in Excel Index: Return the value at row n, column m Match: Which row is this value in? Specify which order values are in (asc/desc) or exact matches Combine with Index to do a lookup on any column VLookup/HLookup: Find value in first column/row RangeLookup = FALSE: “No, I only want exact matches” RangeLookup = TRUE: “Yes, find me the closest match” VLookup(110,VoltageRange,2,FALSE) = 1.73 VLookup(290,VoltageRange,2,FALSE) = #N/A VLookup(359,VoltageRange,2,TRUE) =
Dealing With Unknown Quantities Count/CountA: Count the numbers/non-blanks in the range? CountIf: How many in the range meet the criteria? Columns/Rows: How many columns/rows are in the range? DGet: Return any value in a range based on criteria Range “Holes” DGet(Holes,”Dia”,Criteria1) = 0.250 DGet(Holes,”Number”,Criteria2) = 2 DGet(Holes,”Number”,Criteria3) = #NUM! DGet(Holes,”Dia”,Criteria4) = #VALUE! Criteria1Criteria2            Criteria3   Criteria 4
More Cool Excel Functions Indirect: Display range/cell based on a formula Ceiling/Floor: Rounds up/down to the next multiple SumIf: Totals all of the values in a range that meet a criteria =SumIf(ThicknessRange,”>0.25”,PriceRange) DSum: Add values from records that meet a criteria Error Trapping: IsErr IsError Error.Type IsNA IsBlank ,[object Object]
IsNumber
IsText
IsNonText
Type,[object Object]
Getting to VBA Finding your way through Excel
OK, Enough Easy Stuff…On To The VBA Use VBA to AUGMENT Excel Custom functions Macros Connections to other programs (like SolidWorks) Do As Much As You Can In Excel Easier to troubleshoot Easier to maintain Faster to develop
Accessing VBA Run or edit a macro from a list Enter the Visual Basic for Applications Development Environment
Where to Stick your Code You can place code in any worksheet It’s best to create your own module You can just think of a module as a code folder
User Defined Functions VBA Code: Purpose #1
Custom Functions – Repetitive Calculations Tired of typing in the same equations? Public Function CylVolume(RadiusAs Double, Height As Double) As Double DimPiAs Double Pi = 4 * Atn(1)			       ‘ArcTangent of 1 = pi/4…I think CylVolume = Pi * Radius * Raidus * Height End Function Now you can just use: = CylVolume(Radius, Height)  or  =CylVolume($B$4, C5)  (if you haven’t been paying attention and you don’t know that you’re supposed to name your cell ranges)
Custom Functions – Fill in Excel Gaps Excel missing a function you want? No problem! Public Function Divisible(Value As Double, Divisor As Double) As Boolean Dim Compare As Integer Compare = CInt(Value / Divisor) If Compare = (Value / Divisor) Then 	Divisible = True Else 	Divisible = False End If End Function Now all I do is put THIS in my cell: =If(Divisible(Length,StdSpacing),Length / StdSpacing,0) Note: Because we’re converting a Double to an Integer, this only works for numbers up to 32767. This was not an issue in my application as the model only supported up to 48”. But you may want to put a check in there so you don’t get overflow errors.

More Related Content

What's hot

Piping drawing Knowledge.pdf
Piping drawing Knowledge.pdfPiping drawing Knowledge.pdf
Piping drawing Knowledge.pdf
ewwervq2323452
 
Me2257 computer aided -machine-drawing-manual(v+)
Me2257 computer aided -machine-drawing-manual(v+)Me2257 computer aided -machine-drawing-manual(v+)
Me2257 computer aided -machine-drawing-manual(v+)
Ashish Desai
 
Difference between code, standard & Specification
Difference between code, standard & SpecificationDifference between code, standard & Specification
Difference between code, standard & Specification
Varun Patel
 
Geometrical Dimensioning & Tolerancing, GD&T Course. Day1
Geometrical Dimensioning & Tolerancing, GD&T Course. Day1Geometrical Dimensioning & Tolerancing, GD&T Course. Day1
Geometrical Dimensioning & Tolerancing, GD&T Course. Day1
Timothy Wooi
 
Piping Drawings Basics.pdf
Piping Drawings Basics.pdfPiping Drawings Basics.pdf
Piping Drawings Basics.pdf
RubenAngelFelix1
 
Valve sizing
Valve sizingValve sizing
Valve sizing
Juan Pablo Hernandez
 
Fabrication of storage buffer vessel
Fabrication of storage buffer vesselFabrication of storage buffer vessel
Fabrication of storage buffer vesselNishant Rao Boddeda
 
How to read engineering drawings
How to read engineering drawingsHow to read engineering drawings
How to read engineering drawings
Akash Pandey
 
iFluids Tank Inspection services
iFluids Tank Inspection servicesiFluids Tank Inspection services
iFluids Tank Inspection services
John Kingsley
 
B16 c360 free-cutting brass rod, bar and shapes for use in screw machines1
B16 c360  free-cutting brass rod, bar and shapes for use in screw machines1B16 c360  free-cutting brass rod, bar and shapes for use in screw machines1
B16 c360 free-cutting brass rod, bar and shapes for use in screw machines1
Yirlany Mesén Mejías
 
Asme pipe fiting
Asme pipe fitingAsme pipe fiting
Asme pipe fiting
Vinod Kumar Turki
 
B31.3 Process Piping
B31.3 Process PipingB31.3 Process Piping
B31.3 Process Piping
Adeel Mazhar
 
Api offshore structure standards rp 2 a and much more (mangiavacchi 2005)
Api offshore structure standards rp 2 a and much more (mangiavacchi 2005)Api offshore structure standards rp 2 a and much more (mangiavacchi 2005)
Api offshore structure standards rp 2 a and much more (mangiavacchi 2005)Ishwarya Srikanth
 
Solidworks sheet metal tutorial
Solidworks sheet metal tutorialSolidworks sheet metal tutorial
Solidworks sheet metal tutorial
Gobinath s
 
HAAS Lathe Workbook
HAAS Lathe WorkbookHAAS Lathe Workbook
HAAS Lathe Workbook
out2thow
 
Understanding Stress Analysis Topics
Understanding Stress Analysis TopicsUnderstanding Stress Analysis Topics
Understanding Stress Analysis TopicsZachary Swartz
 
Branch connections
Branch connectionsBranch connections
Branch connections
Nazar Abdul Kareem Hussein
 
Analysis and Design of RCC Residential Building in StaadPro
Analysis and Design of RCC Residential Building in StaadProAnalysis and Design of RCC Residential Building in StaadPro
Analysis and Design of RCC Residential Building in StaadPro
Roshni Ramakrishnan
 
Project standards and_specifications_piping_materials_rev01web
Project standards and_specifications_piping_materials_rev01webProject standards and_specifications_piping_materials_rev01web
Project standards and_specifications_piping_materials_rev01web
Martin Alvaro Ramirez Lozada
 
CE 72.32 (January 2016 Semester): Lecture 1b: Analysis and Design of Tall Bui...
CE 72.32 (January 2016 Semester): Lecture 1b: Analysis and Design of Tall Bui...CE 72.32 (January 2016 Semester): Lecture 1b: Analysis and Design of Tall Bui...
CE 72.32 (January 2016 Semester): Lecture 1b: Analysis and Design of Tall Bui...
Fawad Najam
 

What's hot (20)

Piping drawing Knowledge.pdf
Piping drawing Knowledge.pdfPiping drawing Knowledge.pdf
Piping drawing Knowledge.pdf
 
Me2257 computer aided -machine-drawing-manual(v+)
Me2257 computer aided -machine-drawing-manual(v+)Me2257 computer aided -machine-drawing-manual(v+)
Me2257 computer aided -machine-drawing-manual(v+)
 
Difference between code, standard & Specification
Difference between code, standard & SpecificationDifference between code, standard & Specification
Difference between code, standard & Specification
 
Geometrical Dimensioning & Tolerancing, GD&T Course. Day1
Geometrical Dimensioning & Tolerancing, GD&T Course. Day1Geometrical Dimensioning & Tolerancing, GD&T Course. Day1
Geometrical Dimensioning & Tolerancing, GD&T Course. Day1
 
Piping Drawings Basics.pdf
Piping Drawings Basics.pdfPiping Drawings Basics.pdf
Piping Drawings Basics.pdf
 
Valve sizing
Valve sizingValve sizing
Valve sizing
 
Fabrication of storage buffer vessel
Fabrication of storage buffer vesselFabrication of storage buffer vessel
Fabrication of storage buffer vessel
 
How to read engineering drawings
How to read engineering drawingsHow to read engineering drawings
How to read engineering drawings
 
iFluids Tank Inspection services
iFluids Tank Inspection servicesiFluids Tank Inspection services
iFluids Tank Inspection services
 
B16 c360 free-cutting brass rod, bar and shapes for use in screw machines1
B16 c360  free-cutting brass rod, bar and shapes for use in screw machines1B16 c360  free-cutting brass rod, bar and shapes for use in screw machines1
B16 c360 free-cutting brass rod, bar and shapes for use in screw machines1
 
Asme pipe fiting
Asme pipe fitingAsme pipe fiting
Asme pipe fiting
 
B31.3 Process Piping
B31.3 Process PipingB31.3 Process Piping
B31.3 Process Piping
 
Api offshore structure standards rp 2 a and much more (mangiavacchi 2005)
Api offshore structure standards rp 2 a and much more (mangiavacchi 2005)Api offshore structure standards rp 2 a and much more (mangiavacchi 2005)
Api offshore structure standards rp 2 a and much more (mangiavacchi 2005)
 
Solidworks sheet metal tutorial
Solidworks sheet metal tutorialSolidworks sheet metal tutorial
Solidworks sheet metal tutorial
 
HAAS Lathe Workbook
HAAS Lathe WorkbookHAAS Lathe Workbook
HAAS Lathe Workbook
 
Understanding Stress Analysis Topics
Understanding Stress Analysis TopicsUnderstanding Stress Analysis Topics
Understanding Stress Analysis Topics
 
Branch connections
Branch connectionsBranch connections
Branch connections
 
Analysis and Design of RCC Residential Building in StaadPro
Analysis and Design of RCC Residential Building in StaadProAnalysis and Design of RCC Residential Building in StaadPro
Analysis and Design of RCC Residential Building in StaadPro
 
Project standards and_specifications_piping_materials_rev01web
Project standards and_specifications_piping_materials_rev01webProject standards and_specifications_piping_materials_rev01web
Project standards and_specifications_piping_materials_rev01web
 
CE 72.32 (January 2016 Semester): Lecture 1b: Analysis and Design of Tall Bui...
CE 72.32 (January 2016 Semester): Lecture 1b: Analysis and Design of Tall Bui...CE 72.32 (January 2016 Semester): Lecture 1b: Analysis and Design of Tall Bui...
CE 72.32 (January 2016 Semester): Lecture 1b: Analysis and Design of Tall Bui...
 

Similar to Automating SolidWorks with Excel

Sww 2008 Automating Your Designs Excel, Vba And Beyond
Sww 2008   Automating Your Designs   Excel, Vba And BeyondSww 2008   Automating Your Designs   Excel, Vba And Beyond
Sww 2008 Automating Your Designs Excel, Vba And Beyond
Razorleaf Corporation
 
Automating With Excel An Object Oriented Approach
Automating  With  Excel    An  Object  Oriented  ApproachAutomating  With  Excel    An  Object  Oriented  Approach
Automating With Excel An Object Oriented Approach
Razorleaf Corporation
 
Automation Of Reporting And Alerting
Automation Of Reporting And AlertingAutomation Of Reporting And Alerting
Automation Of Reporting And Alerting
Sean Durocher
 
Intro to Application Express
Intro to Application ExpressIntro to Application Express
Intro to Application Express
José Angel Ibarra Espinosa
 
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
Vijay Perepa
 
Access tips access and sql part 4 building select queries on-the-fly
Access tips  access and sql part 4  building select queries on-the-flyAccess tips  access and sql part 4  building select queries on-the-fly
Access tips access and sql part 4 building select queries on-the-fly
quest2900
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan
 
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..Mark Rackley
 
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)
David McCarter
 
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)
David McCarter
 
13 - Panorama Necto 14 building models - visualization & data discovery solu...
13  - Panorama Necto 14 building models - visualization & data discovery solu...13  - Panorama Necto 14 building models - visualization & data discovery solu...
13 - Panorama Necto 14 building models - visualization & data discovery solu...
Panorama Software
 
Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!
Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!
Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!
Amanda Lam
 
Oracle application express
Oracle application expressOracle application express
Oracle application express
Abhinaw Kumar
 
Oracle application express ppt
Oracle application express pptOracle application express ppt
Oracle application express pptAbhinaw Kumar
 
Excel training
Excel trainingExcel training
Excel training
seomonster
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
Balint Erdi
 

Similar to Automating SolidWorks with Excel (20)

Sww 2008 Automating Your Designs Excel, Vba And Beyond
Sww 2008   Automating Your Designs   Excel, Vba And BeyondSww 2008   Automating Your Designs   Excel, Vba And Beyond
Sww 2008 Automating Your Designs Excel, Vba And Beyond
 
Automating With Excel An Object Oriented Approach
Automating  With  Excel    An  Object  Oriented  ApproachAutomating  With  Excel    An  Object  Oriented  Approach
Automating With Excel An Object Oriented Approach
 
Automation Of Reporting And Alerting
Automation Of Reporting And AlertingAutomation Of Reporting And Alerting
Automation Of Reporting And Alerting
 
Intro to Application Express
Intro to Application ExpressIntro to Application Express
Intro to Application Express
 
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
 
Excel
ExcelExcel
Excel
 
Access tips access and sql part 4 building select queries on-the-fly
Access tips  access and sql part 4  building select queries on-the-flyAccess tips  access and sql part 4  building select queries on-the-fly
Access tips access and sql part 4 building select queries on-the-fly
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2
 
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
 
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)
 
MS-Excel
MS-ExcelMS-Excel
MS-Excel
 
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)
 
13 - Panorama Necto 14 building models - visualization & data discovery solu...
13  - Panorama Necto 14 building models - visualization & data discovery solu...13  - Panorama Necto 14 building models - visualization & data discovery solu...
13 - Panorama Necto 14 building models - visualization & data discovery solu...
 
Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!
Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!
Waiting too long for Excel's VLOOKUP? Use SQLite for simple data analysis!
 
Oracle application express
Oracle application expressOracle application express
Oracle application express
 
Oracle application express ppt
Oracle application express pptOracle application express ppt
Oracle application express ppt
 
Excel training
Excel trainingExcel training
Excel training
 
Vba introduction
Vba introductionVba introduction
Vba introduction
 
Improved VBA support
Improved VBA supportImproved VBA support
Improved VBA support
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 

More from Razorleaf Corporation

COE 2017: Your first 3DEXPERIENCE customization
COE 2017: Your first 3DEXPERIENCE customizationCOE 2017: Your first 3DEXPERIENCE customization
COE 2017: Your first 3DEXPERIENCE customization
Razorleaf Corporation
 
COE 2017: Atomic Content
COE 2017: Atomic ContentCOE 2017: Atomic Content
COE 2017: Atomic Content
Razorleaf Corporation
 
Three Approaches to Integration that Deliver Greater PLM Value
Three Approaches to Integration that Deliver Greater PLM ValueThree Approaches to Integration that Deliver Greater PLM Value
Three Approaches to Integration that Deliver Greater PLM Value
Razorleaf Corporation
 
Discovering New Product Introduction (NPI) using Autodesk Fusion Lifecycle
Discovering New Product Introduction (NPI) using Autodesk Fusion LifecycleDiscovering New Product Introduction (NPI) using Autodesk Fusion Lifecycle
Discovering New Product Introduction (NPI) using Autodesk Fusion Lifecycle
Razorleaf Corporation
 
COE 2016 Live demo How to get to full Digitalization
COE 2016 Live demo How to get to full DigitalizationCOE 2016 Live demo How to get to full Digitalization
COE 2016 Live demo How to get to full Digitalization
Razorleaf Corporation
 
COE 2016: Technical Data Migration Made Simple
COE 2016: Technical Data Migration Made SimpleCOE 2016: Technical Data Migration Made Simple
COE 2016: Technical Data Migration Made Simple
Razorleaf Corporation
 
COE 2016: 10 Cool Tools for 2016
COE 2016: 10 Cool Tools for 2016COE 2016: 10 Cool Tools for 2016
COE 2016: 10 Cool Tools for 2016
Razorleaf Corporation
 
ENOVIA v6 R2013x Tips and Tricks
ENOVIA v6 R2013x Tips and TricksENOVIA v6 R2013x Tips and Tricks
ENOVIA v6 R2013x Tips and Tricks
Razorleaf Corporation
 
Autdoesk PLM 360 to PDM Integration with Jitterbit
Autdoesk PLM 360 to PDM Integration with JitterbitAutdoesk PLM 360 to PDM Integration with Jitterbit
Autdoesk PLM 360 to PDM Integration with Jitterbit
Razorleaf Corporation
 
DriveWorks World 2016 - 13 lessons in 12 years
DriveWorks World 2016  - 13 lessons in 12 yearsDriveWorks World 2016  - 13 lessons in 12 years
DriveWorks World 2016 - 13 lessons in 12 years
Razorleaf Corporation
 
AU 2015: Enterprise, Beam Me Up: Inphi's Enterprise PLM Solution (Tech Paper)
AU 2015: Enterprise, Beam Me Up: Inphi's Enterprise PLM Solution (Tech Paper)AU 2015: Enterprise, Beam Me Up: Inphi's Enterprise PLM Solution (Tech Paper)
AU 2015: Enterprise, Beam Me Up: Inphi's Enterprise PLM Solution (Tech Paper)
Razorleaf Corporation
 
AU 2015: Enterprise, Beam Me Up: Inphi's Enterprise PLM Solution (PPT)
AU 2015: Enterprise, Beam Me Up: Inphi's Enterprise PLM Solution (PPT)AU 2015: Enterprise, Beam Me Up: Inphi's Enterprise PLM Solution (PPT)
AU 2015: Enterprise, Beam Me Up: Inphi's Enterprise PLM Solution (PPT)
Razorleaf Corporation
 
AU 2014: Autodesk PLM 360 Success Story with Inphi (PPT)
AU 2014: Autodesk PLM 360 Success Story with Inphi (PPT)AU 2014: Autodesk PLM 360 Success Story with Inphi (PPT)
AU 2014: Autodesk PLM 360 Success Story with Inphi (PPT)
Razorleaf Corporation
 
AU 2014: Autodesk PLM 360 Success Story with Inphi (TECH PAPER)
AU 2014: Autodesk PLM 360 Success Story with Inphi (TECH PAPER)AU 2014: Autodesk PLM 360 Success Story with Inphi (TECH PAPER)
AU 2014: Autodesk PLM 360 Success Story with Inphi (TECH PAPER)
Razorleaf Corporation
 
Deploying DriveWorks Throughout the Organization
Deploying DriveWorks Throughout the OrganizationDeploying DriveWorks Throughout the Organization
Deploying DriveWorks Throughout the Organization
Razorleaf Corporation
 
Automating Analysis with the API
Automating Analysis with the APIAutomating Analysis with the API
Automating Analysis with the API
Razorleaf Corporation
 
3DVIA Composer for Assembly Instruction Storyboards
3DVIA Composer for Assembly Instruction Storyboards3DVIA Composer for Assembly Instruction Storyboards
3DVIA Composer for Assembly Instruction Storyboards
Razorleaf Corporation
 
Connecting SolidWorks EPDM and ENOVIA V6
Connecting SolidWorks EPDM and ENOVIA V6Connecting SolidWorks EPDM and ENOVIA V6
Connecting SolidWorks EPDM and ENOVIA V6
Razorleaf Corporation
 
Solving Iterative Design Problems with TactonWorks
Solving Iterative Design Problems with TactonWorksSolving Iterative Design Problems with TactonWorks
Solving Iterative Design Problems with TactonWorks
Razorleaf Corporation
 
COE2010 Razorleaf ENOVIA SmarTeam and V6 Readiness
COE2010 Razorleaf ENOVIA SmarTeam and V6 ReadinessCOE2010 Razorleaf ENOVIA SmarTeam and V6 Readiness
COE2010 Razorleaf ENOVIA SmarTeam and V6 ReadinessRazorleaf Corporation
 

More from Razorleaf Corporation (20)

COE 2017: Your first 3DEXPERIENCE customization
COE 2017: Your first 3DEXPERIENCE customizationCOE 2017: Your first 3DEXPERIENCE customization
COE 2017: Your first 3DEXPERIENCE customization
 
COE 2017: Atomic Content
COE 2017: Atomic ContentCOE 2017: Atomic Content
COE 2017: Atomic Content
 
Three Approaches to Integration that Deliver Greater PLM Value
Three Approaches to Integration that Deliver Greater PLM ValueThree Approaches to Integration that Deliver Greater PLM Value
Three Approaches to Integration that Deliver Greater PLM Value
 
Discovering New Product Introduction (NPI) using Autodesk Fusion Lifecycle
Discovering New Product Introduction (NPI) using Autodesk Fusion LifecycleDiscovering New Product Introduction (NPI) using Autodesk Fusion Lifecycle
Discovering New Product Introduction (NPI) using Autodesk Fusion Lifecycle
 
COE 2016 Live demo How to get to full Digitalization
COE 2016 Live demo How to get to full DigitalizationCOE 2016 Live demo How to get to full Digitalization
COE 2016 Live demo How to get to full Digitalization
 
COE 2016: Technical Data Migration Made Simple
COE 2016: Technical Data Migration Made SimpleCOE 2016: Technical Data Migration Made Simple
COE 2016: Technical Data Migration Made Simple
 
COE 2016: 10 Cool Tools for 2016
COE 2016: 10 Cool Tools for 2016COE 2016: 10 Cool Tools for 2016
COE 2016: 10 Cool Tools for 2016
 
ENOVIA v6 R2013x Tips and Tricks
ENOVIA v6 R2013x Tips and TricksENOVIA v6 R2013x Tips and Tricks
ENOVIA v6 R2013x Tips and Tricks
 
Autdoesk PLM 360 to PDM Integration with Jitterbit
Autdoesk PLM 360 to PDM Integration with JitterbitAutdoesk PLM 360 to PDM Integration with Jitterbit
Autdoesk PLM 360 to PDM Integration with Jitterbit
 
DriveWorks World 2016 - 13 lessons in 12 years
DriveWorks World 2016  - 13 lessons in 12 yearsDriveWorks World 2016  - 13 lessons in 12 years
DriveWorks World 2016 - 13 lessons in 12 years
 
AU 2015: Enterprise, Beam Me Up: Inphi's Enterprise PLM Solution (Tech Paper)
AU 2015: Enterprise, Beam Me Up: Inphi's Enterprise PLM Solution (Tech Paper)AU 2015: Enterprise, Beam Me Up: Inphi's Enterprise PLM Solution (Tech Paper)
AU 2015: Enterprise, Beam Me Up: Inphi's Enterprise PLM Solution (Tech Paper)
 
AU 2015: Enterprise, Beam Me Up: Inphi's Enterprise PLM Solution (PPT)
AU 2015: Enterprise, Beam Me Up: Inphi's Enterprise PLM Solution (PPT)AU 2015: Enterprise, Beam Me Up: Inphi's Enterprise PLM Solution (PPT)
AU 2015: Enterprise, Beam Me Up: Inphi's Enterprise PLM Solution (PPT)
 
AU 2014: Autodesk PLM 360 Success Story with Inphi (PPT)
AU 2014: Autodesk PLM 360 Success Story with Inphi (PPT)AU 2014: Autodesk PLM 360 Success Story with Inphi (PPT)
AU 2014: Autodesk PLM 360 Success Story with Inphi (PPT)
 
AU 2014: Autodesk PLM 360 Success Story with Inphi (TECH PAPER)
AU 2014: Autodesk PLM 360 Success Story with Inphi (TECH PAPER)AU 2014: Autodesk PLM 360 Success Story with Inphi (TECH PAPER)
AU 2014: Autodesk PLM 360 Success Story with Inphi (TECH PAPER)
 
Deploying DriveWorks Throughout the Organization
Deploying DriveWorks Throughout the OrganizationDeploying DriveWorks Throughout the Organization
Deploying DriveWorks Throughout the Organization
 
Automating Analysis with the API
Automating Analysis with the APIAutomating Analysis with the API
Automating Analysis with the API
 
3DVIA Composer for Assembly Instruction Storyboards
3DVIA Composer for Assembly Instruction Storyboards3DVIA Composer for Assembly Instruction Storyboards
3DVIA Composer for Assembly Instruction Storyboards
 
Connecting SolidWorks EPDM and ENOVIA V6
Connecting SolidWorks EPDM and ENOVIA V6Connecting SolidWorks EPDM and ENOVIA V6
Connecting SolidWorks EPDM and ENOVIA V6
 
Solving Iterative Design Problems with TactonWorks
Solving Iterative Design Problems with TactonWorksSolving Iterative Design Problems with TactonWorks
Solving Iterative Design Problems with TactonWorks
 
COE2010 Razorleaf ENOVIA SmarTeam and V6 Readiness
COE2010 Razorleaf ENOVIA SmarTeam and V6 ReadinessCOE2010 Razorleaf ENOVIA SmarTeam and V6 Readiness
COE2010 Razorleaf ENOVIA SmarTeam and V6 Readiness
 

Recently uploaded

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 

Recently uploaded (20)

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 

Automating SolidWorks with Excel

  • 1. Automating SolidWorks with Excel Robert Mengel, Design Automation Consultant Paul Gimbel, Business Process Sherpa Razorleaf Corporation
  • 2. Not Sure If You Should Stay or Go To “Redneck Workarounds?” We will cover: Creating fast, robust, and FREE user interfaces for SolidWorks automation Accessing Visual Basic for Applications (VBA) through Excel Connecting Excel to SolidWorks through VBA Building SolidWorks VBA code for use in Excel Accessing Excel references through VBA Driving SolidWorks automatically and bulk processing with loops *We know that VBA is not truly object-oriented, but for those that would choose Excel as a programming environment over Visual Studio 2010, it’s close enough.
  • 3. DISCLAIMER!!! More information is available There is so much that you can do with this stuff!! We wanted to spend adequate time and detail on what we do cover. Everything is documented in the PowerPoint Download it from the SolidWorks World Site Download it from the Razorleaf Site (link on the handout) Give me a business card and I’ll email it to you Read the Presenter Notes Come on up after the session with any questions Take our business cards...take a few and hand them around Check out some of our other presentations on these and other topics www.razorleaf.com or www.slideshare.net
  • 4. BACKGROUND Razorleaf Corporation SolidWorks Service Partner Services ONLY (we’re not trying to sell you any products, we’re neutral) Data Management (EPDM, Enovia, SmarTeam, Aras, V6, MatrixOne) Design Automation (DriveWorks, Tacton, Custom Programmed API) Workflow Automation (Microsoft SharePoint and Tools) Bob Mengel Mechanical Engineer and Automation Developer/Implementer Paul Gimbel (aka “The Sherpa”) Mechanical Engineer, SolidWorks Demojock, Automation Implementer All Razorleaf presentations will be available at www.razorleaf.com and on www.slideshare.net
  • 5. Your Options Pure SolidWorks functionality SolidWorks Macros Microsoft Excel (and some VBA, of course) Maximized use of Excel and VBA Custom developed application Commercially available solution partner product AutoDesk Inven…nah, who are we kidding.
  • 6. Pure SolidWorks Configurations Design Tables Configuration Publisher Smart Components Mate References DriveWorksXpress Design Checker SolidWorks Task Scheduler
  • 7. What Do You Mean SolidWorks Has Limitations!?!? All of these functions require interaction with the user SolidWorks is required Great for your reseller, not so great for your budget Puts non-engineers in an uncomfortable environment Requires at least some SolidWorks training Do you really want a salesperson opening your models!?!? Data management issues One file with tons of configurations? How big is that file, eh? Multiple people can not edit one file at the same time Multiple people can potentially crush your carefully constructed model Revision questions Save As Copy every time? What about updates?
  • 8. SolidWorks Macros Run completely inside of SolidWorks Requires SolidWorks licenses for all involved May not be the best environment for all users Anything that’s not in SolidWorks has to be coded Designed to drive the SolidWorks User Interface Not all that automation-friendly OK to use for small functions Some 5 or 6 step operation that you want to hotkey Can be tough to share due to peoples individual settings VSTA (.NET) macros require some programmatic acumen
  • 9. The Road To Excel Design Tables alone don’t address User Interface Input values as opposed to output values Advanced Excel functionality Leverage Excel Use Excel User Interface tools Add-Ins (Analysis Pack, Solver, etc.) Data validation User Defined Functions Macros
  • 10. Excel and SolidWorks – So Happy Together Three Methods To Integrate SolidWorks and Excel Design Table Embedded in the SolidWorks model Must edit through SolidWorks Edit Table In New Window to gain access to Excel MUST BE IN THE DESIGN TABLE SHEET WHEN YOU EXIT!! External Spreadsheet with Macro to drive SolidWorks Requires SolidWorks API programming Separates workbook from SolidWorks model Does not require SolidWorks (until macro is run) Shareable (through Excel Share Workbook functionality) Can be used to drive multiple SolidWorks files Can be used to drive other things as well, not just SW Spreadsheet with Macro Inserted as OLE Object
  • 11. What Excel Brings To The Party (a six pack?) User Interfaces Powerful and flexible formatting Charts and support for graphics Dynamic tools to help user inputs and selections Advanced equation functionality VBA Custom functions Macros Object-Oriented Programming (well, sort of)
  • 12. Just A Little Bit Of Work Makes A Huge Difference Some People’s Idea of an Excel User Interface Less Than Twenty Minutes Of Work
  • 13.
  • 14. Lists, error and warning dialogs, tool tipsIn-Cell Dropdowns Input Messages Error Messages Warning Messages
  • 15.
  • 16. Control user’s attention based on input
  • 18.
  • 19. Lists, error and warning dialogs, tool tips
  • 21. Control user’s attention based on input
  • 23.
  • 24. Lists, error and warning dialogs, tool tips
  • 26. Control user’s attention based on input
  • 28. Unlock/show only cells you want them to be able to change
  • 30.
  • 31. Lists, error and warning dialogs, tool tips
  • 33. Control user’s attention based on input
  • 35.
  • 36.
  • 37. Calculations in Excel Name Your Cells and Ranges Just as in SolidWorks, it makes equations easier to read Add Comments In adjoining cells or with the comment tool Keep your formulas simple whenever possible Multiple calculation steps are easier to troubleshoot Intelligent Layouts Don’t scatter stuff all over the place Consider cells that may need to be adjacent for lookups, etc. Give this collection of cells a single name
  • 38. 2.9 Searches until it finds a value that is “greater than” the search value, then goes back to take the previous one. Working with Ranges in Excel Index: Return the value at row n, column m Match: Which row is this value in? Specify which order values are in (asc/desc) or exact matches Combine with Index to do a lookup on any column VLookup/HLookup: Find value in first column/row RangeLookup = FALSE: “No, I only want exact matches” RangeLookup = TRUE: “Yes, find me the closest match” VLookup(110,VoltageRange,2,FALSE) = 1.73 VLookup(290,VoltageRange,2,FALSE) = #N/A VLookup(359,VoltageRange,2,TRUE) =
  • 39. Dealing With Unknown Quantities Count/CountA: Count the numbers/non-blanks in the range? CountIf: How many in the range meet the criteria? Columns/Rows: How many columns/rows are in the range? DGet: Return any value in a range based on criteria Range “Holes” DGet(Holes,”Dia”,Criteria1) = 0.250 DGet(Holes,”Number”,Criteria2) = 2 DGet(Holes,”Number”,Criteria3) = #NUM! DGet(Holes,”Dia”,Criteria4) = #VALUE! Criteria1Criteria2 Criteria3 Criteria 4
  • 40.
  • 44.
  • 45. Getting to VBA Finding your way through Excel
  • 46. OK, Enough Easy Stuff…On To The VBA Use VBA to AUGMENT Excel Custom functions Macros Connections to other programs (like SolidWorks) Do As Much As You Can In Excel Easier to troubleshoot Easier to maintain Faster to develop
  • 47. Accessing VBA Run or edit a macro from a list Enter the Visual Basic for Applications Development Environment
  • 48. Where to Stick your Code You can place code in any worksheet It’s best to create your own module You can just think of a module as a code folder
  • 49. User Defined Functions VBA Code: Purpose #1
  • 50. Custom Functions – Repetitive Calculations Tired of typing in the same equations? Public Function CylVolume(RadiusAs Double, Height As Double) As Double DimPiAs Double Pi = 4 * Atn(1) ‘ArcTangent of 1 = pi/4…I think CylVolume = Pi * Radius * Raidus * Height End Function Now you can just use: = CylVolume(Radius, Height) or =CylVolume($B$4, C5) (if you haven’t been paying attention and you don’t know that you’re supposed to name your cell ranges)
  • 51. Custom Functions – Fill in Excel Gaps Excel missing a function you want? No problem! Public Function Divisible(Value As Double, Divisor As Double) As Boolean Dim Compare As Integer Compare = CInt(Value / Divisor) If Compare = (Value / Divisor) Then Divisible = True Else Divisible = False End If End Function Now all I do is put THIS in my cell: =If(Divisible(Length,StdSpacing),Length / StdSpacing,0) Note: Because we’re converting a Double to an Integer, this only works for numbers up to 32767. This was not an issue in my application as the model only supported up to 48”. But you may want to put a check in there so you don’t get overflow errors.
  • 52. Custom Functions - Conversions What about converting units or data types? (or both!) Public Function FeetInches(TotalInchesAs Double) As String Dim Feet As Integer Dim Inches As Double Feet = Application.WorksheetFunction.RoundDown(TotalInches / 12,0) FeetInches = Feet & “’ “ Inches = (TotalInches – (Feet * 12)) If Inches > 0 Then FeetInches = FeetInches & “- “ & Inches & chr(34) ’(34 is ASCII for “) End If End Function Now you can use the equation: =“LENGTH = “ & FeetInches(Length) To get: LENGTH = 4’ – 6.125” The example in your handout actually picks up on increments of 1/32”
  • 53. How To Program In VBA The Ultimate Process For Non-Programmers: Determine what you want your program/code snippet to do Think of some “keywords” to describe it (if you know the functions you need to use, you’re ahead of the game) http://www.google.com(add “VBA” and/or “Excel” to search) Ctrl-C Ctrl-V Tweak Also check out www.krugle.org Also look to Excel VBA and SW API Help files. They’re actually helpful. I know! I was shocked, too.
  • 54. Connecting to SolidWorks VBA and SolidWorks: Link #2
  • 55. Connecting to SolidWorks Add the SolidWorks library to your project Tools, Macros, Visual Basic Editor Tools> References> SldWorks 2011 Type Library Now you have SW Intellisense Define your SolidWorks App Dim swApp As SldWorks.SldWorks Establish a SolidWorks object Attaches to an existing session Launches SW if it is not open Set swApp = CreateObject("SldWorks.Application") swApp.Visible = True
  • 56. <<Insert Basics of the SolidWorks API Session here>>
  • 57. Building SolidWorks API Code for Use in Excel Demo #1: Getting Code Into Excel
  • 58. Accessing Excel Data from VBA VBA and SolidWorks: The First Link
  • 59. Getting Around In Excel With VBA To access a named cell (you named them all, right!!?!?) Thickness = Range(“TestCell”).Value Running through the cells in a named range Dim MyCell As Excel.Range‘Even a single cell is treated as a range For Each MyCell in Range(“TestRange”) Total = Total + MyCell.Value Next MyCell‘Looping through the TestRange What if you have rows (i.e. a multi-column range)? Dim MyRow As Excel.Range‘We’re going to cycle through the rows For Each MyRow in Range(“TestRange”).Rows Total = Total + MyRow.Cells(1,3).Value ‘Row 1, Column 3 of the range Next MyRow‘Looping through the TestRange
  • 60. Absolute Row and Column References Can I just put in Row and Column references, like: Thickness = Worksheets(“Sheet1”).Range(“A1:A1”).Value Thickness = Worksheets(“Sheet1”).Cells(4,9).Value Sure, but I would have to slap you silly Readability…Minus 10 style points What if the range moves…Minus 10 style points Debugging…Minus 10 style points Scalability…Minus 10 style points Portability…Minus 10 style points Chances of anyone else understanding your code…Minus 30!
  • 61. Driving SolidWorks Models With Excel Information Demo #2: Driving SolidWorks with Excel Values
  • 62. Questions (and hopefully Answers) Here’s the Audience Participation Portion of the Show
  • 63. The Simulation AutoTester A Practical Sample In Microsoft Excel/VBA
  • 64. The Autotest Tool – What It Does Enter model information at the top Fill in column 1 with test case names Fill in row 1 of the table with parameter and result names Choose types in row 3 Fill in values Push the button Sit back Be amazed Go get some coffee Be amazed some more Call a supplier Be more amazed (and a bit tired) Use Excel to chart your results
  • 67. Wrapper Functions, Not RAPPER Functions Wrapper – A custom-designed function used to execute an API call Why use wrappers? Easier to read main code Easier to reuse (in the same project) code Easier to repurpose code (other projects) More control Build error-trapping right into the calls
  • 68. Object-Oriented Programming (or some facsimile thereof) One of the hardest, most confusing concepts in programming (Or so I’m told) Class – A definition of something like a window or bolt Property – A parameter value that an object has Method – Something that an object can do Collection – A bunch of objects, like an array, just of objects Dot (.) – Something you will type a lot of Separates an object from its property or method Ex. Bolt.Length or Window.Pane.item(“top”).Glass.Thickness Instantiate – To make a real thing as defined by a class Ex. Upper Flange Bolt #3 or Kitchen Window Over Sink Those are then called “instances” and “objects” Everything in OOP and the SolidWorks API, is performed ON or BY an object.
  • 70. Classes, Methods and Properties
  • 71. Demo and Review of Code Off to the code!
  • 72. Questions (and hopefully Answers) Here’s the Audience Participation Portion of the Show
  • 73. Still Open For Questions!!! PLEASE!! Let’s see if they really read the evaluation forms… In the comments section, after your comments………everyone write… “Where did he find a USB arc welder? I want one.” For the complete version of the presentation, including presenter notes, full code and models, visit www.razorleaf.com after the show! Yes, it’s free.