Using Visual Basic Applications
 

 

This tutorial was written with help from Rajiv Agrawal (Pro/D Developer)

In this tutorial we will use the GetPoint.bas VBA as a demostration.

  • Save the GetPoints.bas Make sure the extension on the file is .bas (some browsers may mess this up)
  • Start Pro/D. New Design and draw a rectangle
  • Save the design as 'simple box.des' (leave Pro/D running)
  • Start Excel
  • In Pro/D hit Alt+F11 to open up the Visual Basic Editor.
  • File->Import File and then choose GetPoints.bas
  • This should create a Module folder inside VBA with GetPoints procedure in it.
  • In the VB Editor turn on Pro/D references on by using Tools->References and then clicking on the Pro/DESKTOP Object Library.
  • Then Run->Run (F5). A dialog box will appear. Choose "WritePointstoExcel" and click on the Run button.
  • This will leave you with a new excel notebook that has the 3D coordinates of the sketch. It appears that the coords come out in meters

Simple Box in Pro/D

Object Browser in the VBA Editor

Resulting Excel Spreadsheet

 

 
Tutorial By Steve Schweitzer, 2001