Create a cube in Solidworks VBA - Solidworks Automation

Contributor
Submitted by techrev on Mon, 05/01/2017 - 11:10

The code for creating a simple cube in Solidworks with VBA (macros)

Edit X and Y and Z values for customization

Private Sub CommandButton1_Click()

Dim swApp As Object

Dim Part As Object

Dim boolstatus As Boolean

Dim longstatus As Long, longwarnings As Long

Set swApp = Application.SldWorks

Set Part = swApp.ActiveDoc

Dim myModelView As Object

Set myModelView = Part.ActiveView

myModelView.FrameState = swWindowState_e.swWindowMaximized

Tags

Arduino Stepper Motor Pin Config and Code

Contributor
Submitted by techrev on Sun, 04/30/2017 - 08:13

Arduino and Stepper motor pin configuration

arduino stepper pin config

I/O Connect to Controller : to pins 8, 10, 9, 11

Use below program  for your stepper motor driver trials

#include <Stepper.h>
#define STEPS 32   
#define STEPSREV 32 * 64  //2048  

Stepper stepper1(STEPS, 8, 10, 9, 11);

int  Steps2Take;

void setup()  
{

}

Tags

Read the value of a cell from another excel file without opening it

Contributor
Submitted by techrev on Sat, 04/29/2017 - 07:58

You have an excel file at location D:\ (example D:\fromdata.xlsx ) and you want to read its cell value E2 and put it inside the file located at C:\ (example C:\todata.xlsx )

Open your file at C:\todata.xlsx go to Developer Tab and then insert a button

 

 

 

 

 

 

 

 

 

excel automation

Convert voice commands to text in Android App Inventor (for our Arduino Projects)

Contributor
Submitted by techrev on Thu, 03/30/2017 - 10:27

To convert voice commands to text in Android app development (app inventor)

Drag Speech recognizer (from Palette/Media)  + 1 button + 1 label

please use below Block Layout to connect all those controls

then start your application and say something, you can see Speech to text conversion at Label

These commands can be used to Control Arduino (in later updates)

 

 

 

BLOCK LAYOUT for SPEECH TO TEXT - APP INVENTOR

Record a Solidworks macro - Solidworks Automation

Contributor
Submitted by techrev on Thu, 03/09/2017 - 09:59

Record a Solidworks macro

In this example we will discuss about “How to Record a Macro in Solidworks”

Open the Solidworks, Go to Tools -> Macro -> Record

solidworks mac

Then start your project, in this example we will be making a cylinder (Draw circle and extrude it to Cylinder)

Create a New Part Document

Create Custom Commands for Excel - VBA

Contributor
Submitted by techrev on Thu, 12/29/2016 - 09:49

Create Custom Commands for Excel - VBA

You can create Custom Commands for Excel to perform some predetermined operations. These commands can be entered directly inside a cell to do the required actions (calculations)

Please note that, these commands are made on VBA, so please refer our previous articles for the basic idea on Macros and VBA

Example Command : ADD

Command to ADD to values from columns A and B and display in C, the command “ADD” will be typed in cells of Column C

Steps :

Tags