FREE Thai Alphabet Game F for Android

FREE Thai Alphabet Game F for Android
Free app for learning Thai Alphabet on Play Store
Showing posts with label engineering. Show all posts
Showing posts with label engineering. Show all posts

Motion Simulation in Solid Edge using sketches together with Microsoft Excel VBA Programming Part III


In previous example, I showed how to control variables in Solid Edge sketch using direct link to excel spreadsheet. In this example, I am going to show how to use VBA (Visual Basic for Application) in excel to control the variables in Solid Edge sketch.

1) Create new file in Microsoft Excel

2) Press Alt+F11 to enter Microsoft Visual Basic windows as shown below



3) Right click in Project Explorer at new file name (in this example, new excel file name = Book2) > Insert > Module



4) To make Solid Edge type libraries available to the Visual Basic Object Browser, click References on the Project menu. On the References dialog box, select the Solid Edge libraries you want to access.



All variable automation is accessed through the Variables collection and Variable objects. The Variables collection serves two purposes: it allows you to create and access variable objects, and it allows you to work with dimensions as variables.

Note: When debugging programs that interact with the Variable Table, it helps to have the Variable Table displayed while stepping through the program. The Variable Table shows the results as they are executed.

5) Write the following code into VBA code area as shown below,


You can copy & paste the following code to your excel VBA.

' =================================================================
' Example of using VBA code to control variables in Solid Edge document
' By AkeBlogger
' http://mechanical-design-handbook.blogspot.com/
' =================================================================

Sub Simulate()
On Error Resume Next

'Declare the program variables.
Dim iAngle As Single
Dim objApp As Object
Dim objVariables As Object
Dim objVariable As Object

'------------------------------------------------------------------
' Checking for the active document
Set objApp = GetObject(, "SolidEdge.Application")
If Err Then
MsgBox "You must open Solid Edge before executing this module!!", vbOKOnly + vbExclamation, "Error"
Exit Sub
Else
'Connect to a running instance of Solid Edge.
Set objApp = GetObject(, "SolidEdge.Application")
'Access the Variables collection.
Set objVariables = objApp.ActiveDocument.Variables
End If

'SIMULATION STARTS!
For iAngle = 0 To 360 Step 2
' Changing Cam_angle from 0, 2, 4, ..., 360 deg.
Call objVariables.Edit("Cam_angle", iAngle)

Next iAngle

End Sub

6) Open Solid Edge file from previous example and delete formula in Variables Table as shown below, because in this example we will control the variable (dimension) using VBA code directly.



7) We are now ready for simulation. Resize VBA Windows as shown below then click run to see the result.



Watch the following video for the actual result!




Read more info about Mechanical Engineering Design Handbook

The challenge of complexity in product design and engineering


- by Brian Gott with Cambashi Limited

New design methods are required in order to head off a growing complexity crisis in product design and engineering. A recent survey identified product and process complexity as the most important issue for designers and engineers, well ahead of time to market and cost pressures.
Driven by markets that demand ever-increasing product value and functionality, manufacturers have embarked on continuous product improvement, delivering more features, more innovation and better looking products. In the fight to control markets and maintain market share the leading manufacturers increase the size of their product ranges, offer more options and release new and better products more frequently, incorporating new technology, more automation and better value for money at an accelerating rate. Coping with the resulting design complexity while maintaining time to market and profitability is the latest challenge to hit the engineering industry.
This white paper analyses the proposition that modern 3D CAD systems can be successfully deployed to cope with design complexity and create the kind of product design environment that positively promotes innovation, while raising design productivity yet again in order to increase design throughput.
Our analysis deals with three main topics:
how and why complexity arises
how modern 3D solid modeling CAD technology can be deployed to meet the challenges that complexity presents and to turn them to competitive advantage
the particular characteristics of modern mainstream 3D CAD systems that impact the complexity issue.
A detailed review is given of all the areas throughout the product development work flow cycle that are impacted by a fully implemented 3D CAD system, and the gains to be expected.The findings are derived from our on-going research programs, from speaking to companies currently considering a move to 3D solid modeling, and to others who have already made the move, drawn from the machinery, electro-mechanical, and consumer products sectors of industry.

source: http://www.solidedge.com