Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
MicroStation
  • Product Communities
MicroStation
[Archived] AskInga Wiki Macro to place random cells on DTM
    • Sign In

    • -AskInga
      • -3D MicroStation
        • An Introduction to the 3D Primitives
        • Change the elevation of raster attachments
        • Easy orientation in 3D-Space
        • Extrude shapes based on text
        • Go Ahead Draw This
        • Having trouble setting the active depth
        • Label only the Z with label coordinates tool
        • Macro to place random cells on DTM
        • Make a DTM and drape an image MicroStation pre-V8i
        • Make a DTM and drape an image MicroStation V8i (excluding SSx)
        • MicroStation 3D - One package, multiple capabilities
        • Move 2D elements to correct elevation
        • Move all elements to the same elevation (or common Z-value)
        • Move element to a given Z
        • Move or place elements at the correct Z-elevation
        • STL export settings
        • Swivel the view camera
        • The boresite lock
        • To show the display depth and active depth
        • Use the old window area tool to propagate the display depth
      • +AccuDraw Secrets
      • +Animation - Rendering
      • +Behind The Scenes
      • +Cells
      • +Colours
      • +Conversion - Translation
      • +Coordinate Input
      • +Design Settings
      • +Dimensions
      • +DWG
      • +EDG
      • +Element Manipulation
      • +Element Properties
      • +Element Selection
      • +Freeware - Shareware
      • +Interface Look And Feel
      • +Internet - E-Links - Links
      • +Keyins
      • +Levels
      • +Line Styles
      • +Models
      • +MSM Archive
      • +Other
      • +Presentations
      • +Printing - Plotting
      • +Programming - Automation
      • +Rasters - Images
      • +References
      • +Tags - Data Fields - Fields
      • +Text - Fonts - Annotation
      • +Views
      • +Windows - Interacting With
      • +Workspaces - Configuration
    • graffiti

     
     Questions about this article, topic, or product? Click here. 

    Macro to place random cells on DTM

    AskInga logo

    Original Article Date: August 11, 2005

    With thanks to Yrjo Ala-Heikkila for contributing these macros that can be used to mass populate landscape design schemes with trees and shrubs. They are also quite handy for placing other 3D items (wind turbines, stones, lampposts cars, etc.) on non-planar terrain models. Very Cool!!!

    Download 255.zip and extract CellsOnSurface.mvba from the zip file.
    Place the mvba in the folder pointed to by MS_VBASEARCHDIRECTORIES.
    Keyin vba load cellsonsurface to load the project, or...
    Configure MS_VBAAUTOLOADPROJECTS to automatically load the mvba project upon startup.
    The mvba contains two macros as described below.
    Full instructions are included in the zip file.

    Forest Mix Planter
    This macro allows you to mass populate the fence contents using a cell or selection of cells. Cells will be placed in a random pattern meaning that theit locations, scales and number will vary. TreeMixPlanter can not call RPC-cells directly. However, if you create an ordinary cell library from your RPC content, it works fine as seen in the image above.

    Cells On Terrain
    This companion macro is designed to move selected cells vertically until they hit a 3D terrain.

    Yrjo writes: "I have used these macros for various visualization schemes with a great success. Take a look at the following image where I have placed more than 1000 RPC trees!! Placing them on DTM took only a few moments with TreeMixPlanter while the cars were placed on DTM with help of CellsOnTerrain."

    An an interesting side note...Yrjo was inspired by an old V7 application that did much the same thing. Having virtually no programming experience, he waited desperatly for someone to re-compile the application to V8. Not being able to wait indefinitly, Yrjo took it upon himself to write a new application. So, having spent countless hours pouring in manuals and progressing with trial and error, the end result are the macros he has so graciously shared on AskInga. Good job Yrjo for a job well done!!

    This program is supplied as is. AskInga, Bentley Systems Inc., and the author of the program assumes no liability for damages direct, indirect, or consequential, which may result from the use of this program. Use this program at your own risk.

    AskInga Article #255

    • Askinga
    • 3D
    • Article
    • Share
    • History
    • More
    • Cancel
    • Hannah Blye Created by Hannah Blye
    • When: Wed, May 14 2008 4:12 PM
    • Phil Chouinard Last revision by Phil Chouinard
    • When: Tue, Jun 8 2010 11:50 AM
    • Revisions: 4
    • Comments: 2
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies