Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
OpenRail
  • Product Communities
OpenRail
OpenRail Wiki My VBA Code
    • Sign In
    • Rail Design - Wiki
    • +Bentley Rail Track, previously know as InRail
    • -OpenRail Designer
      • +Additional Tools and References
      • +Cant
      • +Civil Cell
      • -Civil Programming
        • -My VBA Code
          • COGO points to Profile
      • +Connect Services - Licensing
      • +Corridor Modelling
      • +Drawing Production
      • +Generative Component
      • +Geometry
      • +IFC
      • +Low Voltage Assets (LVA)
      • +Modelling
      • +Rail
      • +Regression
      • +Reports
      • +Settings
      • +Turnouts
      • +Visualization
      • +Volumes
    • +OpenRail Overhead Line Designer

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

    My VBA Code

    I am far from being an expert and as such I will be pleased to receive feedback. Even it is "hey JP your code is rubishh" ... but with suggestions.Wink

    But it is also some simple code some may find useful and easy to read.

    • Convert curve to linestring
      Main purpose is because create regression line from rails doesn't work from curves.
      And some survey data gives rails as curves
    • Create a report (text file) of 3D features while waiting for this enhancement
      Feature Name and XYZ
      Note: report of 3D features (elevation included) is available on 2022R1
    • Create automatically a copy of the DGN when opening it
      Main purpose is to "workaround" auto-save off setting that is not honoured by OpenRail (current 2021 R1 and previous)
    • COGOPoints to profile
      A macro to get cells on Design Profile Model with capability to annotate using Civil Labeler
    • ...

    You must place the .mvba in configured folder such as workset or workspace Standards/Macros folder.
    You must read the txt file.

    You must autoload mvba at startup by running once VBA Manager (search vba in the ribbon) and check the boxes.

    Minor update of V2 to fix issue with Item Type library not having any instance in current dgn.
    Also added constants for default scale value.

    Here is the zip containing VBA and dgnlib with the Item Type: 5265.MyTools_V2.zip

    • VBA
    • Profile
    • cogo points
    • Share
    • History
    • More
    • Cancel
    • jpln Created by Bentley Colleague jpln
    • When: Fri, Jan 7 2022 2:11 PM
    • jpln Last revision by Bentley Colleague jpln
    • When: Fri, Sep 9 2022 6:27 AM
    • Revisions: 7
    • Comments: 0
    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