Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
MicroStation
  • Product Communities
MicroStation
[Archived] AskInga Wiki Fence export macro
    • Sign In

    • -AskInga
      • +3D MicroStation
      • +AccuDraw Secrets
      • +Animation - Rendering
      • +Behind The Scenes
      • +Cells
      • +Colours
      • -Conversion - Translation
        • Convert between imperial and metric design files
        • Convert contents of PDF to JPG to attach as reference
        • Convert DWG Files to 2D DGNs instead of 3D
        • CSV files - remapping your data
        • Determine the original file format
        • DWG to DGN and the default level
        • Fence export macro
        • Keyin to do a Save As with a file name
        • Output multiple formats with batch convert
        • Save As using selection sets and fences
        • Starting Batch Convert from a command line
        • The Batch Convert application
      • +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. 

    Fence export macro

    AskInga logo

    Original Article Date: July 7, 2006

    Another gem from Robert McCartney that creates multiple files or models from the contents of a fence. Quite a handy little macro!
    2007-04-05 Updated to include minor code changes and interface enhancements.

    Download 301.zip and extract FenceExport.mvba from the zip file.
    Place the mvba in the folder pointed to by MS_VBASEARCHDIRECTORIES
    Keyin vba load fenceexport to load the project, or...
    Configure MS_VBAAUTOLOADPROJECTS to automatically load the mvba project upon startup.
    Keyin vba run [fenceexport]main to run the macro, or...
    Place the keyin on a function key or custom button for quick and easy access.

    Create Files from Fence
    Place a fence around your elements, and activate the macro.
    You can enter a Base Name if you want it to be different than the active file.
    If the Number is set to 1 then the Base Name will be a combination of the file name and the active model.
    Enter the number of files you want to create.
    Enter Prepend and Append values.
    Keyin a Separator
    Click the Create Files button. The create button will be disabled until a fence is placed and disabled when the fence is removed.
    The new files will be placed in the active file's directory.

    Create Models from Fence
    The only difference here is that you toggle the Create Models instead of files? option. Note that the macro will check for duplicate model names only once. It will then report an error the next time. If it finds an existing model name then it will adds -duplicate" to the end. Also, the models properties (type, dimension etc) are automatically inherited by the new model(s). Finally, click the Create Models button. The create button will be disabled until a fence is placed and disabled when the fence is removed.

    Note: A mark is set in the active design each time FileFence Models or Fence Files are created. This allows you to easily undo the task if desired.

    This program is supplied as is. This program does not come with support. 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 #301

    • Models
    • Askinga
    • FreewareShareware
    • Article
    • Share
    • History
    • More
    • Cancel
    • Danielle Schutz Created by Bentley Colleague Danielle Schutz
    • When: Fri, May 23 2008 9:09 AM
    • Inga Morozoff Last revision by Bentley Colleague Inga Morozoff
    • When: Mon, Jun 14 2010 9:51 AM
    • Revisions: 4
    • 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