Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
MicroStation
  • Product Communities
  • More
MicroStation
MicroStation Wiki How to place a line using XYZ Coordinates using a Key-In Script
    • Sign in

    • -MicroStation Wiki
      • +Learning Tips
      • -MicroStation
        • +3D Printing - MicroStation
        • +Animation - MicroStation
        • +Archive / Backup - MicroStation
        • +Base Geometry - MicroStation
        • +Batch Processing - MicroStation
        • +CONNECT Advisor - MicroStation
        • CONNECT Integration - MicroStation
        • +CONNECTION Client
        • +Cells - MicroStation
        • +Change Tracking - MicroStation
        • +Configuration - MicroStation
        • +Coordinate Systems - MicroStation
        • +Curves - MicroStation
        • +Custom Linestyles - MicroStation
        • +DGN - MicroStation
        • +DWG - MicroStation
        • +Database - MicroStation
        • +Detailing Symbols - MicroStation
        • -Dimensions - MicroStation
          • Dim Audit - Dimensions - MicroStation
          • +Dim Styles - Dimensions - MicroStation
          • +Display - Dimensions - MicroStation
          • -General - Dimensions - MicroStation
            • Can a segment be trimmed out of one of the crossing extension line and still retain the dimension association to the object?
            • Dimension extension lines do not show up
            • Dimension Linear command does not appear to be working the same as it did in the previous version.
            • Dimension text not holding line spacing
            • Dimensioning a scaled reference
            • Dimensions are not associative, despite association lock being switched ON.
            • Dimensions are placed as separate elements even though the association.
            • Dimensions placed using Angular Dimension have tolerances with plus and a minus
            • Display of dimensions in a rotated view in MicroStation J.
            • Does the active angle affect the Rotated Box or Rotated Hexagon setting?
            • Drafting tools are missing in MicroStation V8 XM Edition
            • Dual Dimensions appear to be floating above the dimension line
            • Ghost dimension appears when file is referenced.
            • Having trouble with Dimension Scales in MicroStation V8
            • How to change the size of the spacing between the Dimension Text and the Dimension Line in MicroStation 95.
            • How to dimension in Inches in MicroStation J?
            • How to Dimension Radius and Diameter in CONNECT edition
            • How to edit dimension text as any other text
            • How to eliminate the space between the master units and sub-units when using automatic dimensioning.
            • How to get the placement of dimensions to work like it did in Microstation J?
            • How to group the dimension items.
            • How to identify dimensions not associated to elements and methods to reassociate dimensions
            • How to place a line using XYZ Coordinates using a Key-In Script
            • How to place multiple points along a path where the path intersects with other surfaces
            • How to snap a tangent dimension line.
            • How to temporarily drop a dimension
            • In V8 the extension line must be turned on in order to modify, is there a setting to change that?
            • Is it possible to rejoin a dropped dimension?
            • Is there a way to add to the extension line for the Ordinate Dimension?
            • Place dimension - the order of selecting dimension points.
            • Placing dimensions with Arbitrary mode
            • Problem with DGNLIB files related to Dimension Settings in MicroStation v8.
            • Significance of a dimension style that is in blue text or highlighted in blue when selected from the dimension style dialog box.
            • Unable to change the inline leader of the place callout tool.
            • When opening a V7 file that was upgraded to V8 the dimensions are being exploded.
            • When placing the dimension the stacked fraction will appear to be in the horizontal direction versus the diagonal direction
            • Why does the Dimension Line position change when I modify a dimensions Extension Line?
            • Working in DWG mode and dimensioning
          • +Labels - Dimensions - MicroStation
          • +Notes - Dimensions - MicroStation
          • +Tools - Dimensions - MicroStation
        • +Documentation & Help - MicroStation
        • +Drawing Aids - MicroStation
        • +Exception - MicroStation
        • +FAQ - MicroStation
        • +Feature Based Solids Modeling - MicroStation
        • +File Access - MicroStation
        • +GUI - MicroStation
        • +General - MicroStation
        • +Graphics Display - MicroStation
        • +Groups - MicroStation
        • +Hardware / Input Devices - MicroStation
        • +Import/Export - MicroStation
        • +Installation - MicroStation
        • +Interchange - MicroStation
        • +Interference - MicroStation
        • +Internationalization - MicroStation
        • +Levels - MicroStation
        • +Licensing - MicroStation
        • +Manipulation - MicroStation
        • +Markup / Redline - MicroStation
        • +Measure - MicroStation
        • +Mesh - MicroStation
        • +Models - MicroStation
        • +Multi-Lines - MicroStation
        • +OLE - MicroStation
        • +Other - MicroStation
        • +Parametrics - MicroStation
        • +Patterning - MicroStation
        • +Point Cloud - MicroStation
        • +Printing - MicroStation
        • +Programming - MicroStation
        • +Project Navigation - MicroStation
        • +Properties - MicroStation
        • +RSS Feeds - MicroStation
        • +Reference - MicroStation
        • +Security - MicroStation
        • +Selection - MicroStation
        • +Settings - MicroStation
        • +Sheet Composition - MicroStation
        • +Solids - MicroStation
        • +Standards - MicroStation
        • +Surfaces - MicroStation
        • +Tables - MicroStation
        • +Text - MicroStation
        • +UI Customization - MicroStation
        • +Units - MicroStation
        • +View - MicroStation
        • +Visualization - MicroStation
        • Welcome Page - MicroStation
        • +Accreditation - MicroStation
        • +i.Models - MicroStation
        • +ProjectWise Integration
        • +Raster - MicroStation
    • +Administration Wiki
    • +Annotations Wiki
    • +Bentley View Wiki
    • +MicroStation PowerDraft
    • +Programming Wiki
    • +Visualization Wiki

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

    How to place a line using XYZ Coordinates using a Key-In Script

      Product(s): MicroStation
      Version(s): V8i / CONNECT Edition
      Environment: N\A
      Area: Dimensions
      Subarea: General

    How to place a line in a Design Model using XYZ coordinates contained within a Text file using a Key-In Script

    Text file format:

    324.477,278.3686,0
    81.8949,242.823,0
    .....

    Background

    A line can be placed manually in a Design Model, by first selecting the Place Line tool and then manually entering the XYZ coordinates of each vertex point. Alternatively, a long Key-In could be used such as:

    Place Line;XY=324.477,278.3686,0;XY=81.8949,242.823,0;.............;Reset

    Another approach may be to use the 'Import Coordinates' tool to place Points at each XYZ coordinate followed by the Place Line tool to join the Points.

    However, these methods can be very tedious and time consuming as well as being prone to errors.

    Steps to Accomplish

    An alternative approach would be to copy and modify the Text file to include the required MicroStation Commands and then use a Key-In Script to place the Line in the Design Model.

    To accomplish this first add a Line to the top of the file, containing the MicroStation Command to be run, in this Instance 'Place Line' but could be 'Place Curve' depending on required element type. Then at the end of the file add a line with 'Reset' to finish the selected command. Then in front of each XYZ coordinate add XY= for example:

    Place Line
    xy=-324.477,278.3686,0
    xy=-81.8949,242.823,0
    ....
    ....
    Reset

    Tip: Use Microsoft Excel to modify / save the CSV file, its easier to add a column of XY= to each rows XYZ coordinate values. Plus, if required the 'X' 'Y' 'Z' columns can be reordered easily if required.

    1. Open the Design Model
    2. Set the Active Attributes as required (Level, Color, Weight ...)
    3. Open the 'Key-In' dialog (Drawing > Home > Primary > Key-In)
    4. Select the 'Top' View (The Coordinates in the text file being X,Y,Z in this example)
    5. Enter the following Key in:

              @D:/temp/coordinate.txt

    Where D:/temp/coordinate.txt is the path and name of the file containing the coordinates. Note if there is a space character in the path use quotes for example @"D:/temp/import files/coordinate.txt"

    See Also

    Help

    • GENERAL
    • V8i / CONNECT Edition
    • MicroStation
    • Dimensions
    • en
    • Share
    • History
    • More
    • Cancel
    • Carl Myhill Created by Bentley Colleague Carl Myhill
    • When: Thu, Sep 23 2021 11:19 AM
    • Carl Myhill Last revision by Bentley Colleague Carl Myhill
    • When: Thu, Sep 23 2021 11:27 AM
    • Revisions: 2
    • 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

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