Hi all, I have these x,y coordinates in excel which i wish to import into microstation and form lines from these coordinates. I know Autocad is able to do so, but is there anyway to do this in microstation ?
Hi Vivian,
because this is MicroStation Programming forum, do you ask how to import the coordinates using own code and you plant to write it, using e.g MicroStation VBA or C++?
If you question is about using / existence of a user tool in MicroStation, without programming, I recommend to move your question to normal MicroStation forum. To move existing discussion to another forum, use More > Move tool, available under your original post. Please, do not ask again (duplicate the post), but move it.
Also, please follow the best practices and always specify exactly not only products, but also its version (e.g. using build number), because an answer can be different for current MicroStation CE Update 16 and old V8i (SELECTseries 1).
Vivian LIM said:I have these x,y coordinates in excel which i wish to import into microstation
To import coordinates, you can use Import Coordinates tool from XYZ Toolbox. It requires to export Excel into plain text file. The problem of this tool is it does not create line, but points, so the line must be created manually, which is not problem for a few short lines, but not suitable when the import should be done regularly.
Vivian LIM said:and form lines from these coordinates
Alternative approach, allowing to create a line directly, is to use key-in script. The key-in to enter a data point is xy=<x>,<y>[,<z>], e.g. xy=10.2, -6.12. So the script, which can be also created easily from Excel file, should be something like
place line xy=10.2, 6.8 xy=12.4, 7.6
When used, it starts MicroStation tool and enters all coordinates as data points.
Vivian LIM said:x,y coordinates in excel
From you Excel picture it looks like the format is wrong, because both x and y are in the same cell. At first, you should split the cell to have x and y in individual cells, which makes export to text file easier.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Vivian LIM said:I have these x,y coordinates in Excel which i wish to import into MicroStation and form lines from these coordinates
Post your question to the MicroStation Forum, and mark it for the attention of Lorys who is an Excel aficionado. If you search that Forum you will find other questions similar to yours.
As Jan describes, you can adjust your Excel worksheet to contain columns of X, Y coordinates and write those to a CSV file. Use a text editor to add the commands that Jan mentions. Then invoke the file as an @script (look for Script Files just over half-way down that page) to create your DGN line elements.
Vivian LIM said: I know Autocad is able to do so
For many years, AutoCAD has imitated MicroStation's capabilities!
Regards, Jon Summers LA Solutions