SlideShare uma empresa Scribd logo
1 de 36
Amazing API Analysis Automation Applications, Analytical Approaches and Advanced Advice Paul Gimbel, Business Process Sherpa Razorleaf Corporation
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) 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
DISCLAIMER We will be discussing Automating BASIC SolidWorks Simulation programmatically One or two tools within SolidWorks to validate designs This an ADVANCED session that assumes: you know how to do this stuff with the SolidWorks user interface you know the basics of VBA and SolidWorks API programming ALL problems simplified for presentation purposes ALL SolidWorks CODE EXAMPLES IN VBA and VB.NET (Excel uses VBA) Presentation will be available at www.razorleaf.com and on www.slideshare.net
Realistic Applications of Code Batch running simulations Changing geometry Changing boundary conditions Changing loading conditions Changing mesh/study options Output data to another system Write to Excel for further analysis Output to XML for import Iterative Solving Export to a system that determines new inputs based on outputs
What To Use the API For Drive.  Don’t  Build.
A Note About Selecting Model Entities SolidWorks uses internal identifiers that persist across SolidWorks sessions Persistent Reference Identifiers aka “PIDs” SolidWorks provides a tool to find them: <install>piidcollector.exe Launch it with SolidWorks open Select an entity Click Copy PIDS to Clipboard Fetch them from the clipboard Use them with ModelDoc2.Extension.GetObjectByPersistReference3
The Basics of Every Simulation API Application Let’s “Git ‘Er Done”
Required Reference (VBA) Tools>>References Make sure you grab the SolidWorks Type and Constant Libraries, too
Required Reference (.NET) You need to add the reference manually Add Reference>Browse to> <installationDirectory>piedistolidWorks.Interop.cosworks.dll <install>piedist
Follow The Trail of Objects
Another “Reference” to Keep Handy
Getting SolidWorks and The Simulation Object (VBA) ' Connect to SolidWorks DimswAppAsSldWorks.SldWorks SetswApp = CreateObject("SldWorks.Application") 'Get the SolidWorks Simulation object DimsimAddInAsCosmosWorksLib.CwAddincallback SetsimAddIn = swApp.GetAddInObject("CosmosWorks.CosmosWorks") 'Use the Add-In Object to get the Simulation Object DimsimObjectAsCosmosWorksLib.COSMOSWORKS SetsimObject = simAddIn.COSMOSWORKS NOTE!!! All error trapping and object presence testing has been removed to make the slides shorter.  BE SURE TO CHECK EVERY OBJECT IF simObject Is Nothing Then ErrorReport(“No object!”)
Get the Simulation Document (VBA) 'Open the SolidWorks document and capture it as an object DimswDocAs SldWorks.ModelDoc2 SetswDoc = RLOpenSWDocSilent(swApp, Range("PartName").Value) 'Open and get the Simulation document DimsimDocAsCosmosWorksLib.CWModelDoc SetsimDoc = simObject.ActiveDoc
Get Simulation Study By Name (VBA) ‘Get the Study Manager object DimsimStudyMgrAsCosmosWorksLib.CWStudyManager SetsimStudyMgr = RLGetStudyManager(simDoc) 'Get  the Simulation Study (from the Excel range “StudyName”) DimsimStudyAsCosmosWorksLib.CWStudy SetsimStudy = RLGetStudyByName(simStudyMgr, Range("StudyName").Value)
Cycling Through the Study Manager (VBA) PublicFunctionRLGetStudyByName(simStudyMgrAsCWStudyManager) _ AsCosmosWorksLib.CWStudy DimsimStudyAsCosmosWorksLib.CWStudy Dim n As Integer = 0 simStudyMgr.ActiveStudy = 0 'Activate the first Study Do 'Loop through the studies SetsimStudy = simStudyMgr.GetStudy(n) 'Increment the study number       n = n + 1 Loop Until simStudy.Name = StudyName SetRLGetStudyByName = simStudy End Function ‘RLGetStudyByName NOTE!! Error trapping removed for presentation purposes.
Driving Materials Let’s Get Automating!
Setting Material – Getting Solid Component (VBA)  Public Function RLGetSimCompByName(simCompMgrAs _ CWSolidManager, CompNameAsString) AsCWSolidComponent DimsimCompAsCosmosWorksLib.CWSolidComponent DimerrCodeAs Long Dim n As Integer = 0 Do SetsimComp = simCompMgr.GetComponentAt(n, errCode) n = n + 1 Loop Until simComp.ComponentName = CompName SetRLGetSimCompByName = simComp End Function 'RLGetSimCompByName
Setting Material – Getting Solid Body (VBA)  Public Function RLGetSimBodyByName(simCompAs _ CWSolidComponent, BodyNameAsString) AsCWSolidBody DimsimBodyAsCosmosWorksLib.CWSolidBody DimerrCodeAsLong Dim n AsInteger = 0 Do SetsimBody = simComp.GetSolidBodyAt(n, errCode) n = n + 1 LoopUntilsimBody.SolidBodyName = BodyName SetRLGetSimBodyByName = simBody End Function 'RLGetSimBodyByName Sample Solid Body Name: SolidBody 1(BreakFace)
Set Material (VBA) 'Set the material simSolidBody.SetLibraryMaterial "C:WLibustom Matls", "5052-H32" 'Build a Material DimsimMaterialAsCosmosWorksLib.CWMaterial SetsimMaterial = NewCosmosWorksLib.CWMaterial simMaterial.Category = "Toys“ simMaterial.Description = "The One and Only Silly Putty“ simMaterial.MaterialName = "Silly Putty“ simMaterial.MaterialUnits = swsUnitSystemIPS simMaterial.ModelType = swsMaterialModelTypeViscoElastic simMaterial.SetPropertyByName "EX", 0.0014, 1 simSolidBody.SetSolidBodyMaterialsimMaterial
Driving Forces Analysis Loads, that is…
Retrieving the Loads and Restraints Manager (VBA) 'Get the loads and restraints manager DimsimLoadMgrAsCWLoadsAndRestraintsManager SetsimLoadMgr = simStudy.LoadsAndRestraintsManager
Finding a Force by Name And Driving Magnitude (VBA) Dim simForce As Object ‘(CosmosWorksLib.CWForce) Dim LoadIndex As Long, errCode As Long For LoadIndex = 0 To simLoadMgr.Count – 1    Set simForce = simLoadMgr.GetLoadsAndRestraints(LoadIndex, errCode) 	If simForce.Name = Parameter.ParamName Then 	  If simForce.Type = swsLoadsAndRestraintsTypeForce Then simForce.ForceBeginEdit simForce.NormalForceOrTorqueValue = CDbl(Parameter.ParamValue) simForce.ForceEndEdit     End If 'this is a force object   End If 'the name matches Next LoadIndex
Difficulty in Driving a Force To change a directional (non-normal) force: simForce.ForceBeginEdit DimbXAsInteger, bYAs Integer, bZAs Integer Dim X As Double, Y As Double, Z As Double simForce.GetForceComponentValuesbX, bY, bZ, X, Y, Z simForce.SetForceComponentValuesbX, bY, bZ, X, Y, _ CDbl(Parameter.ParamValue) simForce.ForceEndEdit THIS DOES NOT WORK!!!!!
The Simulation AutoTester A Practical Sample In Microsoft Excel/VBA
The Autotest Tool 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
The Process
The Internal Structure
Classes, Methods and Properties
Demo and Review of Code Off to the code!
Sensors (Programatically Speaking, Of Course)
Sensors (PART) ,[object Object]
Notice for interactive users
Potential performance issues
Suppress extraneous sensors
Set notification frequency(ASSY)
Working with Sensors in Code Get the sensor object from the Sensor Feature (use MD2.GetFirstFeature) DimswSensorAsSensor = swFeature.GetSpecificFeature2 Critical sensor properties and methods SelectCaseswSensor.SensorType CaseswSensorType_e.swSensorSimulation CaseswSensorType_e.swSensorMassProperty CaseswSensorType_e.swSensorDimension CaseswSensorType_e.swSensorInterfaceDetection EndSelect Be sure to Update the sensor with the UpdateSensor method Check the AlertState to see if the sensor has picked up on a problem Use the AlertType to see what kind of a problem SW2009 SP2 and before only supported Dimension Sensors

Mais conteúdo relacionado

Mais procurados

How Testability Inspires AngularJS Design / Ran Mizrahi
How Testability Inspires AngularJS Design / Ran MizrahiHow Testability Inspires AngularJS Design / Ran Mizrahi
How Testability Inspires AngularJS Design / Ran MizrahiRan Mizrahi
 
Design patterns in java script, jquery, angularjs
Design patterns in java script, jquery, angularjsDesign patterns in java script, jquery, angularjs
Design patterns in java script, jquery, angularjsRavi Bhadauria
 
Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Doris Chen
 
Enrique Amodeo | Graphql + Microservices = Win! | Codemotion Madrid 2018
Enrique Amodeo | Graphql + Microservices = Win! | Codemotion Madrid 2018 Enrique Amodeo | Graphql + Microservices = Win! | Codemotion Madrid 2018
Enrique Amodeo | Graphql + Microservices = Win! | Codemotion Madrid 2018 Codemotion
 
...and thus your forms automagically disappeared
...and thus your forms automagically disappeared...and thus your forms automagically disappeared
...and thus your forms automagically disappearedLuc Bors
 

Mais procurados (6)

How Testability Inspires AngularJS Design / Ran Mizrahi
How Testability Inspires AngularJS Design / Ran MizrahiHow Testability Inspires AngularJS Design / Ran Mizrahi
How Testability Inspires AngularJS Design / Ran Mizrahi
 
Design patterns in java script, jquery, angularjs
Design patterns in java script, jquery, angularjsDesign patterns in java script, jquery, angularjs
Design patterns in java script, jquery, angularjs
 
Retrofitting
RetrofittingRetrofitting
Retrofitting
 
Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!
 
Enrique Amodeo | Graphql + Microservices = Win! | Codemotion Madrid 2018
Enrique Amodeo | Graphql + Microservices = Win! | Codemotion Madrid 2018 Enrique Amodeo | Graphql + Microservices = Win! | Codemotion Madrid 2018
Enrique Amodeo | Graphql + Microservices = Win! | Codemotion Madrid 2018
 
...and thus your forms automagically disappeared
...and thus your forms automagically disappeared...and thus your forms automagically disappeared
...and thus your forms automagically disappeared
 

Destaque

Merging PLM and Microsoft SharePoint Strategies from GPDIS 2009
Merging PLM and Microsoft SharePoint Strategies from GPDIS 2009Merging PLM and Microsoft SharePoint Strategies from GPDIS 2009
Merging PLM and Microsoft SharePoint Strategies from GPDIS 2009Razorleaf 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 yearsRazorleaf Corporation
 
COE2010 Razorleaf Setting Up Catalogs in ENOVIA SmarTeam
COE2010 Razorleaf Setting Up Catalogs in ENOVIA SmarTeamCOE2010 Razorleaf Setting Up Catalogs in ENOVIA SmarTeam
COE2010 Razorleaf Setting Up Catalogs in ENOVIA SmarTeamRazorleaf 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 SimpleRazorleaf 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
 
Deploying DriveWorks Throughout the Organization
Deploying DriveWorks Throughout the OrganizationDeploying DriveWorks Throughout the Organization
Deploying DriveWorks Throughout the OrganizationRazorleaf Corporation
 
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 BeyondRazorleaf Corporation
 
Solving Iterative Design Problems with TactonWorks
Solving Iterative Design Problems with TactonWorksSolving Iterative Design Problems with TactonWorks
Solving Iterative Design Problems with TactonWorksRazorleaf Corporation
 
Managing CATIA V5 in PDM... Simply for COE Ask The Expert
Managing CATIA V5 in PDM... Simply for COE Ask The ExpertManaging CATIA V5 in PDM... Simply for COE Ask The Expert
Managing CATIA V5 in PDM... Simply for COE Ask The ExpertRazorleaf 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 JitterbitRazorleaf 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 LifecycleRazorleaf Corporation
 
3DVIA Composer for Assembly Instruction Storyboards
3DVIA Composer for Assembly Instruction Storyboards3DVIA Composer for Assembly Instruction Storyboards
3DVIA Composer for Assembly Instruction StoryboardsRazorleaf 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 ApproachRazorleaf Corporation
 
Design Automation - Simple Solid Works Solutions To Practical Programmatic Pa...
Design Automation - Simple Solid Works Solutions To Practical Programmatic Pa...Design Automation - Simple Solid Works Solutions To Practical Programmatic Pa...
Design Automation - Simple Solid Works Solutions To Practical Programmatic Pa...Razorleaf Corporation
 
Moving from Document Management to BOM Management
Moving from Document Management to BOM ManagementMoving from Document Management to BOM Management
Moving from Document Management to BOM ManagementRazorleaf Corporation
 

Destaque (20)

Merging PLM and Microsoft SharePoint Strategies from GPDIS 2009
Merging PLM and Microsoft SharePoint Strategies from GPDIS 2009Merging PLM and Microsoft SharePoint Strategies from GPDIS 2009
Merging PLM and Microsoft SharePoint Strategies from GPDIS 2009
 
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
 
Why Product Structure Matters
Why Product Structure MattersWhy Product Structure Matters
Why Product Structure Matters
 
COE2010 Razorleaf Setting Up Catalogs in ENOVIA SmarTeam
COE2010 Razorleaf Setting Up Catalogs in ENOVIA SmarTeamCOE2010 Razorleaf Setting Up Catalogs in ENOVIA SmarTeam
COE2010 Razorleaf Setting Up Catalogs in ENOVIA SmarTeam
 
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
 
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)
 
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
 
Deploying DriveWorks Throughout the Organization
Deploying DriveWorks Throughout the OrganizationDeploying DriveWorks Throughout the Organization
Deploying DriveWorks Throughout the Organization
 
Automating SolidWorks with Excel
Automating SolidWorks with ExcelAutomating SolidWorks with Excel
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
 
Open Source PLM
Open Source PLMOpen Source PLM
Open Source PLM
 
Solving Iterative Design Problems with TactonWorks
Solving Iterative Design Problems with TactonWorksSolving Iterative Design Problems with TactonWorks
Solving Iterative Design Problems with TactonWorks
 
Managing CATIA V5 in PDM... Simply for COE Ask The Expert
Managing CATIA V5 in PDM... Simply for COE Ask The ExpertManaging CATIA V5 in PDM... Simply for COE Ask The Expert
Managing CATIA V5 in PDM... Simply for COE Ask The Expert
 
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
 
Sww 2007 Lets Get Ready To Automate
Sww 2007   Lets Get Ready To AutomateSww 2007   Lets Get Ready To Automate
Sww 2007 Lets Get Ready To Automate
 
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
 
3DVIA Composer for Assembly Instruction Storyboards
3DVIA Composer for Assembly Instruction Storyboards3DVIA Composer for Assembly Instruction Storyboards
3DVIA Composer for Assembly Instruction Storyboards
 
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
 
Design Automation - Simple Solid Works Solutions To Practical Programmatic Pa...
Design Automation - Simple Solid Works Solutions To Practical Programmatic Pa...Design Automation - Simple Solid Works Solutions To Practical Programmatic Pa...
Design Automation - Simple Solid Works Solutions To Practical Programmatic Pa...
 
Moving from Document Management to BOM Management
Moving from Document Management to BOM ManagementMoving from Document Management to BOM Management
Moving from Document Management to BOM Management
 

Semelhante a Automating Analysis with the API

Application Frameworks: The new kids on the block
Application Frameworks: The new kids on the blockApplication Frameworks: The new kids on the block
Application Frameworks: The new kids on the blockRichard Lord
 
JavaOne TS-5098 Groovy SwingBuilder
JavaOne TS-5098 Groovy SwingBuilderJavaOne TS-5098 Groovy SwingBuilder
JavaOne TS-5098 Groovy SwingBuilderAndres Almiray
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineRicardo Silva
 
.NET Database Toolkit
.NET Database Toolkit.NET Database Toolkit
.NET Database Toolkitwlscaudill
 
CodeMash - Building Rich Apps with Groovy SwingBuilder
CodeMash - Building Rich Apps with Groovy SwingBuilderCodeMash - Building Rich Apps with Groovy SwingBuilder
CodeMash - Building Rich Apps with Groovy SwingBuilderAndres Almiray
 
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry GervinWill your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry GervinBarry Gervin
 
Using the Tooling API to Generate Apex SOAP Web Service Clients
Using the Tooling API to Generate Apex SOAP Web Service ClientsUsing the Tooling API to Generate Apex SOAP Web Service Clients
Using the Tooling API to Generate Apex SOAP Web Service ClientsSalesforce Developers
 
End to end todo list app with NestJs - Angular - Redux & Redux Saga
End to end todo list app with NestJs - Angular - Redux & Redux SagaEnd to end todo list app with NestJs - Angular - Redux & Redux Saga
End to end todo list app with NestJs - Angular - Redux & Redux SagaBabacar NIANG
 
Crossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end FrameworkCrossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end FrameworkDaniel Spector
 
Divide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.jsDivide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.jsSebastian Springer
 
Bigger Stronger Faster
Bigger Stronger FasterBigger Stronger Faster
Bigger Stronger FasterChris Love
 
Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Massimo Oliviero
 
Looking for Bugs in MonoDevelop
Looking for Bugs in MonoDevelopLooking for Bugs in MonoDevelop
Looking for Bugs in MonoDevelopPVS-Studio
 
Automated malware analysis
Automated malware analysisAutomated malware analysis
Automated malware analysisIbrahim Baliç
 
Java script unit testing
Java script unit testingJava script unit testing
Java script unit testingMats Bryntse
 

Semelhante a Automating Analysis with the API (20)

Application Frameworks: The new kids on the block
Application Frameworks: The new kids on the blockApplication Frameworks: The new kids on the block
Application Frameworks: The new kids on the block
 
JavaOne TS-5098 Groovy SwingBuilder
JavaOne TS-5098 Groovy SwingBuilderJavaOne TS-5098 Groovy SwingBuilder
JavaOne TS-5098 Groovy SwingBuilder
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
 
.NET Database Toolkit
.NET Database Toolkit.NET Database Toolkit
.NET Database Toolkit
 
CodeMash - Building Rich Apps with Groovy SwingBuilder
CodeMash - Building Rich Apps with Groovy SwingBuilderCodeMash - Building Rich Apps with Groovy SwingBuilder
CodeMash - Building Rich Apps with Groovy SwingBuilder
 
Coding Naked 2023
Coding Naked 2023Coding Naked 2023
Coding Naked 2023
 
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry GervinWill your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
 
Using the Tooling API to Generate Apex SOAP Web Service Clients
Using the Tooling API to Generate Apex SOAP Web Service ClientsUsing the Tooling API to Generate Apex SOAP Web Service Clients
Using the Tooling API to Generate Apex SOAP Web Service Clients
 
End to end todo list app with NestJs - Angular - Redux & Redux Saga
End to end todo list app with NestJs - Angular - Redux & Redux SagaEnd to end todo list app with NestJs - Angular - Redux & Redux Saga
End to end todo list app with NestJs - Angular - Redux & Redux Saga
 
Crossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end FrameworkCrossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end Framework
 
A First Date With Scala
A First Date With ScalaA First Date With Scala
A First Date With Scala
 
Divide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.jsDivide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.js
 
Bigger Stronger Faster
Bigger Stronger FasterBigger Stronger Faster
Bigger Stronger Faster
 
Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)
 
Looking for Bugs in MonoDevelop
Looking for Bugs in MonoDevelopLooking for Bugs in MonoDevelop
Looking for Bugs in MonoDevelop
 
Automated malware analysis
Automated malware analysisAutomated malware analysis
Automated malware analysis
 
FLAR Workflow
FLAR WorkflowFLAR Workflow
FLAR Workflow
 
Java script unit testing
Java script unit testingJava script unit testing
Java script unit testing
 
Unit Testing 101
Unit Testing 101Unit Testing 101
Unit Testing 101
 
IOC + Javascript
IOC + JavascriptIOC + Javascript
IOC + Javascript
 

Mais de Razorleaf Corporation

COE 2017: Your first 3DEXPERIENCE customization
COE 2017: Your first 3DEXPERIENCE customizationCOE 2017: Your first 3DEXPERIENCE customization
COE 2017: Your first 3DEXPERIENCE customizationRazorleaf 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 ValueRazorleaf 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 DigitalizationRazorleaf 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 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
 
SolidWorks Modeling for Design Automation
SolidWorks Modeling for Design AutomationSolidWorks Modeling for Design Automation
SolidWorks Modeling for Design AutomationRazorleaf Corporation
 
Connecting SolidWorks EPDM and ENOVIA V6
Connecting SolidWorks EPDM and ENOVIA V6Connecting SolidWorks EPDM and ENOVIA V6
Connecting SolidWorks EPDM and ENOVIA V6Razorleaf 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
 
COE2010 Razorleaf Tweaking 3DLive on ENOVIA SmarTeam
COE2010 Razorleaf Tweaking 3DLive on ENOVIA SmarTeamCOE2010 Razorleaf Tweaking 3DLive on ENOVIA SmarTeam
COE2010 Razorleaf Tweaking 3DLive on ENOVIA SmarTeamRazorleaf Corporation
 
COE2010 Razorleaf SmarTeam Attribute Mappings for Word and Excel
COE2010 Razorleaf SmarTeam Attribute Mappings for Word and ExcelCOE2010 Razorleaf SmarTeam Attribute Mappings for Word and Excel
COE2010 Razorleaf SmarTeam Attribute Mappings for Word and ExcelRazorleaf Corporation
 
COE2010 Razorleaf ENOVIA SmarTeam Deployment at AS&E
COE2010 Razorleaf ENOVIA SmarTeam Deployment at AS&ECOE2010 Razorleaf ENOVIA SmarTeam Deployment at AS&E
COE2010 Razorleaf ENOVIA SmarTeam Deployment at AS&ERazorleaf Corporation
 
Paul Gimbel - Presentation Opening Quotes
Paul Gimbel - Presentation Opening QuotesPaul Gimbel - Presentation Opening Quotes
Paul Gimbel - Presentation Opening QuotesRazorleaf Corporation
 
Sww 2006 Redesigning Processes For Solid Works
Sww 2006   Redesigning Processes For Solid WorksSww 2006   Redesigning Processes For Solid Works
Sww 2006 Redesigning Processes For Solid WorksRazorleaf Corporation
 

Mais de Razorleaf Corporation (16)

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
 
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
 
ENOVIA v6 R2013x Tips and Tricks
ENOVIA v6 R2013x Tips and TricksENOVIA v6 R2013x Tips and Tricks
ENOVIA v6 R2013x Tips and Tricks
 
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 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)
 
SolidWorks Modeling for Design Automation
SolidWorks Modeling for Design AutomationSolidWorks Modeling for Design Automation
SolidWorks Modeling for Design Automation
 
Connecting SolidWorks EPDM and ENOVIA V6
Connecting SolidWorks EPDM and ENOVIA V6Connecting SolidWorks EPDM and ENOVIA V6
Connecting SolidWorks EPDM and ENOVIA V6
 
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
 
COE2010 Razorleaf Tweaking 3DLive on ENOVIA SmarTeam
COE2010 Razorleaf Tweaking 3DLive on ENOVIA SmarTeamCOE2010 Razorleaf Tweaking 3DLive on ENOVIA SmarTeam
COE2010 Razorleaf Tweaking 3DLive on ENOVIA SmarTeam
 
COE2010 Razorleaf SmarTeam Attribute Mappings for Word and Excel
COE2010 Razorleaf SmarTeam Attribute Mappings for Word and ExcelCOE2010 Razorleaf SmarTeam Attribute Mappings for Word and Excel
COE2010 Razorleaf SmarTeam Attribute Mappings for Word and Excel
 
COE2010 Razorleaf ENOVIA SmarTeam Deployment at AS&E
COE2010 Razorleaf ENOVIA SmarTeam Deployment at AS&ECOE2010 Razorleaf ENOVIA SmarTeam Deployment at AS&E
COE2010 Razorleaf ENOVIA SmarTeam Deployment at AS&E
 
Paul Gimbel - Presentation Opening Quotes
Paul Gimbel - Presentation Opening QuotesPaul Gimbel - Presentation Opening Quotes
Paul Gimbel - Presentation Opening Quotes
 
Sww 2006 Redesigning Processes For Solid Works
Sww 2006   Redesigning Processes For Solid WorksSww 2006   Redesigning Processes For Solid Works
Sww 2006 Redesigning Processes For Solid Works
 

Último

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 

Último (20)

Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 

Automating Analysis with the API

  • 1. Amazing API Analysis Automation Applications, Analytical Approaches and Advanced Advice Paul Gimbel, Business Process Sherpa Razorleaf Corporation
  • 2. 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) 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
  • 3. DISCLAIMER We will be discussing Automating BASIC SolidWorks Simulation programmatically One or two tools within SolidWorks to validate designs This an ADVANCED session that assumes: you know how to do this stuff with the SolidWorks user interface you know the basics of VBA and SolidWorks API programming ALL problems simplified for presentation purposes ALL SolidWorks CODE EXAMPLES IN VBA and VB.NET (Excel uses VBA) Presentation will be available at www.razorleaf.com and on www.slideshare.net
  • 4. Realistic Applications of Code Batch running simulations Changing geometry Changing boundary conditions Changing loading conditions Changing mesh/study options Output data to another system Write to Excel for further analysis Output to XML for import Iterative Solving Export to a system that determines new inputs based on outputs
  • 5. What To Use the API For Drive. Don’t Build.
  • 6. A Note About Selecting Model Entities SolidWorks uses internal identifiers that persist across SolidWorks sessions Persistent Reference Identifiers aka “PIDs” SolidWorks provides a tool to find them: <install>piidcollector.exe Launch it with SolidWorks open Select an entity Click Copy PIDS to Clipboard Fetch them from the clipboard Use them with ModelDoc2.Extension.GetObjectByPersistReference3
  • 7. The Basics of Every Simulation API Application Let’s “Git ‘Er Done”
  • 8. Required Reference (VBA) Tools>>References Make sure you grab the SolidWorks Type and Constant Libraries, too
  • 9. Required Reference (.NET) You need to add the reference manually Add Reference>Browse to> <installationDirectory>piedistolidWorks.Interop.cosworks.dll <install>piedist
  • 10. Follow The Trail of Objects
  • 12. Getting SolidWorks and The Simulation Object (VBA) ' Connect to SolidWorks DimswAppAsSldWorks.SldWorks SetswApp = CreateObject("SldWorks.Application") 'Get the SolidWorks Simulation object DimsimAddInAsCosmosWorksLib.CwAddincallback SetsimAddIn = swApp.GetAddInObject("CosmosWorks.CosmosWorks") 'Use the Add-In Object to get the Simulation Object DimsimObjectAsCosmosWorksLib.COSMOSWORKS SetsimObject = simAddIn.COSMOSWORKS NOTE!!! All error trapping and object presence testing has been removed to make the slides shorter. BE SURE TO CHECK EVERY OBJECT IF simObject Is Nothing Then ErrorReport(“No object!”)
  • 13. Get the Simulation Document (VBA) 'Open the SolidWorks document and capture it as an object DimswDocAs SldWorks.ModelDoc2 SetswDoc = RLOpenSWDocSilent(swApp, Range("PartName").Value) 'Open and get the Simulation document DimsimDocAsCosmosWorksLib.CWModelDoc SetsimDoc = simObject.ActiveDoc
  • 14. Get Simulation Study By Name (VBA) ‘Get the Study Manager object DimsimStudyMgrAsCosmosWorksLib.CWStudyManager SetsimStudyMgr = RLGetStudyManager(simDoc) 'Get the Simulation Study (from the Excel range “StudyName”) DimsimStudyAsCosmosWorksLib.CWStudy SetsimStudy = RLGetStudyByName(simStudyMgr, Range("StudyName").Value)
  • 15. Cycling Through the Study Manager (VBA) PublicFunctionRLGetStudyByName(simStudyMgrAsCWStudyManager) _ AsCosmosWorksLib.CWStudy DimsimStudyAsCosmosWorksLib.CWStudy Dim n As Integer = 0 simStudyMgr.ActiveStudy = 0 'Activate the first Study Do 'Loop through the studies SetsimStudy = simStudyMgr.GetStudy(n) 'Increment the study number n = n + 1 Loop Until simStudy.Name = StudyName SetRLGetStudyByName = simStudy End Function ‘RLGetStudyByName NOTE!! Error trapping removed for presentation purposes.
  • 16. Driving Materials Let’s Get Automating!
  • 17. Setting Material – Getting Solid Component (VBA) Public Function RLGetSimCompByName(simCompMgrAs _ CWSolidManager, CompNameAsString) AsCWSolidComponent DimsimCompAsCosmosWorksLib.CWSolidComponent DimerrCodeAs Long Dim n As Integer = 0 Do SetsimComp = simCompMgr.GetComponentAt(n, errCode) n = n + 1 Loop Until simComp.ComponentName = CompName SetRLGetSimCompByName = simComp End Function 'RLGetSimCompByName
  • 18. Setting Material – Getting Solid Body (VBA) Public Function RLGetSimBodyByName(simCompAs _ CWSolidComponent, BodyNameAsString) AsCWSolidBody DimsimBodyAsCosmosWorksLib.CWSolidBody DimerrCodeAsLong Dim n AsInteger = 0 Do SetsimBody = simComp.GetSolidBodyAt(n, errCode) n = n + 1 LoopUntilsimBody.SolidBodyName = BodyName SetRLGetSimBodyByName = simBody End Function 'RLGetSimBodyByName Sample Solid Body Name: SolidBody 1(BreakFace)
  • 19. Set Material (VBA) 'Set the material simSolidBody.SetLibraryMaterial "C:WLibustom Matls", "5052-H32" 'Build a Material DimsimMaterialAsCosmosWorksLib.CWMaterial SetsimMaterial = NewCosmosWorksLib.CWMaterial simMaterial.Category = "Toys“ simMaterial.Description = "The One and Only Silly Putty“ simMaterial.MaterialName = "Silly Putty“ simMaterial.MaterialUnits = swsUnitSystemIPS simMaterial.ModelType = swsMaterialModelTypeViscoElastic simMaterial.SetPropertyByName "EX", 0.0014, 1 simSolidBody.SetSolidBodyMaterialsimMaterial
  • 20. Driving Forces Analysis Loads, that is…
  • 21. Retrieving the Loads and Restraints Manager (VBA) 'Get the loads and restraints manager DimsimLoadMgrAsCWLoadsAndRestraintsManager SetsimLoadMgr = simStudy.LoadsAndRestraintsManager
  • 22. Finding a Force by Name And Driving Magnitude (VBA) Dim simForce As Object ‘(CosmosWorksLib.CWForce) Dim LoadIndex As Long, errCode As Long For LoadIndex = 0 To simLoadMgr.Count – 1 Set simForce = simLoadMgr.GetLoadsAndRestraints(LoadIndex, errCode) If simForce.Name = Parameter.ParamName Then If simForce.Type = swsLoadsAndRestraintsTypeForce Then simForce.ForceBeginEdit simForce.NormalForceOrTorqueValue = CDbl(Parameter.ParamValue) simForce.ForceEndEdit End If 'this is a force object End If 'the name matches Next LoadIndex
  • 23. Difficulty in Driving a Force To change a directional (non-normal) force: simForce.ForceBeginEdit DimbXAsInteger, bYAs Integer, bZAs Integer Dim X As Double, Y As Double, Z As Double simForce.GetForceComponentValuesbX, bY, bZ, X, Y, Z simForce.SetForceComponentValuesbX, bY, bZ, X, Y, _ CDbl(Parameter.ParamValue) simForce.ForceEndEdit THIS DOES NOT WORK!!!!!
  • 24. The Simulation AutoTester A Practical Sample In Microsoft Excel/VBA
  • 25. The Autotest Tool 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
  • 28. Classes, Methods and Properties
  • 29. Demo and Review of Code Off to the code!
  • 31.
  • 36. Working with Sensors in Code Get the sensor object from the Sensor Feature (use MD2.GetFirstFeature) DimswSensorAsSensor = swFeature.GetSpecificFeature2 Critical sensor properties and methods SelectCaseswSensor.SensorType CaseswSensorType_e.swSensorSimulation CaseswSensorType_e.swSensorMassProperty CaseswSensorType_e.swSensorDimension CaseswSensorType_e.swSensorInterfaceDetection EndSelect Be sure to Update the sensor with the UpdateSensor method Check the AlertState to see if the sensor has picked up on a problem Use the AlertType to see what kind of a problem SW2009 SP2 and before only supported Dimension Sensors
  • 37. Using SolidWorks Events Create a class Declare a variable WITHEVENTS for the object that holds your events PublicWithEventsswPartAsSolidWorks.interop.sldworks.PartDoc Create a Function for whatever event you want to monitor FunctionswPart_SensorAlertPreNotify(ByValswSensorAsObject, ByVal _ SensorAlertTypeAsInteger)AsInteger Shell("http://www.twitter.com/?'#SW Sensor!'", AppWinStyle.Hide, False) EndFunction 'swPart_SensorAlertPreNotify In your main code – Activate the handler (RemoveHandler to discontinue) AddHandlerswPart.SensorAlertPreNotify, AddressOf _ Me.swPart_SensorAlertPreNotify Note who your event belongs to Check out all available events in API Help
  • 38. Review, Tips and Tricks Drive, Don’t Build Repurpose and genericize your code to grab objects Use Pervasive Reference Identifiers for bulletproof selections Evaluate standard functionaltiy before reinventing Look to use code to react to SolidWorks through events
  • 39. Questions (and hopefully Answers) Here’s the Audience Participation Portion of the Show
  • 40. Still Open For Questions!!! PLEASE!! Let’s see if they really read the evaluation forms… In the comments section, after your comments………everyone write… “A great blend of old skool and modern dance.” Cepolina Photo Larchaud Dance Project: Toronto 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.