Title: The Power of GEOPAK With VBA
1The Power of GEOPAK With VBA Bruce
Shearer Bentley Systems, Inc.
2The GEOPAK VBA Object Model
A collection of Object definitions giving the VBA
programmer access to various areas of the GEOPAK
Suite of products, both graphical and
non-graphical, including the following
- Plan
- Profile
- Cross Section
- Site
- Drainage
- Water/Sewer
3COGO
- Access User Preferences
- Open a GPK file
- Get a list of all elements of a particular type
- Get a specific element by name and type
- Access attributes of elements including name,
coordinates, length, radius, degree, feature,
stationing, etc. - Locate intersections, project points onto, and
find points/slopes at distances along elements - Modify existing Create new COGO elements
4COGO - Examples
5COGO - Examples
6Profile Context
- Create a Profile Cell
- Create a Profile Drawing Port from a Profile Cell
- Access profile cell information such as job,
chain, location, vertical scale, stationing, etc. - Translate station and elevation values to model
coordinates for drawing in the profile context - Translate model coordinates within the profile
context to station and elevation values
7Profile Context - Example
8DTM
- Open a TIN file
- Open/Create a DTM Input File
- Build a TIN
- Merge DTMs
- Drape points onto a DTM to obtain elevations
- Drape linear elements onto a DTM to obtain
sections - Extract features from a DTM
9DTM
10DTM
11Design Computation Manager (DCM)
- Open a DCM database
- Access an Item by name or attribute
- Access an Items type and description
- Access an Items placement symbology
- Obtain a DCM item from a MicroStation element
placed using DCM
12Design Computation Manager (DCM) - Example
13Cross Section
- Obtain a list of all cross section ports for a
given chain - Access cross section information such as chain,
location, vertical scale, stationing, etc. - Translate offset and elevation values to model
coordinates for drawing in the cross section
context - Translate model coordinates within the cross
section context to offset and elevation values
14Cross Section - Example
15Cross Section - Example
16Adhoc Attributes
- Add adhoc attributes of any type (double, string,
or payitem) to a MicroStation element - Obtain all adhoc attributes from a MicroStation
element - Read a specific adhoc attribute from a
MicroStation element by name - Remove an adhoc attribute from a MicroStation
element by name
17Adhoc Attributes - Example
18Drainage
- Open a Drainage Project database
- Add Areas, Links, and Nodes
- Obtain a list of Areas, Links, Nodes, Networks,
and Profiles - Obtain a specific Area, Link, Node, Network, or
Profile - Access an abundance of information from any of
the Drainage elements obtained
19Drainage - Example
20Site
- Open a Site Project database
- Create Models, Objects, and Elements
- Remove Objects from Models and remove Elements
from Objects - Access many attributes from Models, Objects, and
Elements
21Site - Example
22Water/Sewer
- Open a Water/Sewer Project database
- Add Lines and Nodes
- Obtain a list of Lines, Nodes, or Profiles
- Obtain a specific Line, Node, or Profile by name
- Obtain Sewer Segments
- Access an abundance of information from any of
the Water/Sewer elements obtained
23Water/Sewer - Example
24Samples of GEOPAK VBA can be downloaded
from http//selectservices.bentley.com/ Supp
ort Tools TechNotes and FAQs Civil
GEOPAK Civil Suite GEOPAK VBA
Questions?