Skip to main content

Featured Post

Why I Wrote The Sheet Mechanic (And Why Calculations Aren’t Enough)

For engineers who already know the math—but still lose projects. For the last few years, I’ve been sharing technical guides here on Mechanical Design Handbook —how to size a motor, how to calculate fits, and (as you recently read) how to choose between timing belts and ball screws. But after 25 years in industrial automation, I realized something uncomfortable: Projects rarely fail because the math was wrong. They fail because: The client changed the scope three times in one week. A critical vendor lied about a shipping date (and no one verified it). The installation technician couldn’t fit a wrench into the gap we designed. University taught us the physics. It didn’t teach us the reality. That gap is why I wrote my new book, The Sheet Mechanic . This is not a textbook. It is a field manual for the messy, political, and chaotic space between the CAD model and the factory floor. It captures the systems I’ve used to survive industrial projec...
NEW RELEASE: Stop trying to be a Hero. Start being a Mechanic. Get "The Sheet Mechanic" on Amazon »
Disclosure: As an Amazon Associate, I earn from qualifying purchases.

Solid Edge Sketch Motion Simulation using Excel VBA - Part 1

Solid Edge features a very useful application called "Motion" which allows users to simulate the movement of mechanical parts. This enables machine designers to test and ensure that the movement of their mechanism is exactly as expected before manufacturing parts. This helps save a lot of money.

Advertisement

However, instead of using the "Motion" application, I would like to show you how to simulate the motion of mechanical parts using a sketch in Solid Edge together with Microsoft Excel.

Why?

Most of the time, I start my mechanical design with the concept and layout using sketches. If we could simulate the motion of mechanical parts in a sketch, it would help me a lot.

I got this idea when I was playing with sketches and constraints in Solid Edge. Solid Edge allows us to change the dimensions easily by just rotating the mouse wheel.

Diagram showing Excel VBA code communicating with Solid Edge Sketch dimensions to automate motion
Figure 1: The Concept — Using VBA to "push" dimension values from Excel into the Solid Edge variable table in real-time.

Watch the following video to see how easy it is to simulate motion in a sketch.

So what I have to do is just to have Microsoft Excel VBA change the dimensional values in the Solid Edge sketch.

Advertisement

Here are the results of this idea...

Let's see how to do this in the next post (Part 2)...

Read more info about Solid Edge: Ultimate 3D CAD Software

Comments

gus said…
Hello.

I´m working actually in a education project to control a Solid Edge assembly from a PLC.

At this time (thanks to this blog) we are working with Visual Basic to generate a continuous motion using the code part taken from this blog:

For RANGO1 = 0 To -ALT Step -VEL
Call objVariables.Edit("POS_VB", RANGO1)
Next RANGO1

Call objVariable.edit, it´s a function that take the variable "POS_VB" from SolidEdge table and update it with the value of the variable Rango1 from Visual Basic.

I would like to make the reverse update, i.e., how can I update the value of a VisualBasic variable (Rango1 for example) with the value of the variable "POS_VB" from SolidEdge table?

Thanks for all.

A teacher from Spain.
Ake said…
Hi there,

Try this...

Set Rango1 = objVariables.Translate("POS_VB")

Please note that this function returns value in meters for the length variables on Solid Edge V.17. Don't forget to multiply it by 1000 to get millimeters.

Hope this answers your question.

Ake
gus said…
Thanks! it´s now working.

With this implementation i can stop a motion between the limits of For/Next code, beaking the loop with a solid edge sensor (minimun distance) as a real sensor could do.

In another way, I can render the solid edge motion better if i include the function DoEvents inside the loop Next/For given the control to the computer for instance to refresh the graphics.

Thanks for all.

Popular posts from this blog

Chebyshev Linkage Design: Ratios & Straight-Line Motion

Figure 1: The Chebyshev linkage converts rotary input into approximate straight-line output. Introduction to the Chebyshev Linkage The Chebyshev linkage is a four-bar mechanical linkage that converts rotational motion into approximate straight-line motion . It was invented by the 19th-century Russian mathematician Pafnuty Chebyshev , who was deeply involved in the theoretical problems of kinematic mechanisms. His goal was to improve upon existing designs, such as the Watt Straight-line Mechanism , which James Watt had used to revolutionize the steam engine. While Watt's design produces a lemniscate (figure-eight) curve with a straight section, the Chebyshev linkage is often preferred in specific machinery because the straight-line portion of the path is parallel to the line connecting the two fixed ground pivots. Search for Mechanism Design & Robotics Books Advertisement Design Ratios and Geometry The gen...

Dowel Pins & Locating Pins: The Basics of Fixture Design

Dowel pins are precision cylindrical pins used for accurate part alignment in assemblies. They control position, not clamping force. This guide explains tolerances, fits, sizing rules, and design best practices. Figure 1: A typical fixture setup. Notice how dowel pins (silver) provide precise location, while bolts (not shown here) provide the clamping force. In the world of Precision Engineering , the difference between a high-quality product and a scrap part often comes down to microns. While bolts hold parts together, they are terrible at positioning them. This is where Dowel Pins and Locating Pins become essential components in industrial tooling . Advertisement What is a Dowel Pin? Dowel pins are precision-ground fasteners used to secure the relative position of two parts. They are typically machined to extremely tight tolerances (often within 0.0001 inches) and are available in materials like: Hardened Steel: For high-wea...

Watt Straight-Line Linkage: Analysis and Automotive Uses

Figure 1: Watt's linkage example geometry and path generation. Introduction to Watt's Linkage The Watt's linkage (also known as the parallel motion linkage) is a cornerstone in the history of mechanical engineering. It is a type of four-bar linkage originally invented by James Watt in the late 18th century to solve a critical problem in steam engine design: constraining the piston rod to move in a straight line without using high-friction guideways. Before this invention, engines used chains to connect the piston to the beam, which meant they could only pull, not push. Watt's rigid linkage allowed for double-acting engines (pushing and pulling), doubling the power output. He was immensely proud of this kinematic solution, describing it in a 1784 letter to his partner Matthew Boulton: "I have got a glimpse of a method of causing a piston rod to move up and down perpendicularly by only fixing it to a piece of iron u...