Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to: (i) import Excel files (ii) change Fence display 1

Status
Not open for further replies.

Project2002

Structural
Nov 10, 2002
11
Hi,
I am a newbie, and I hope someone can help me.
(i) How do I import an Excel file into Microstation SE. I tried using "Import text", and all I got was a file that was inverted 90 degrees, with lots of gibberish. Please provide step-by-step procedures, ok?
(ii) Fence display. When you use the cursor to fence a group of objects, say, most of the time you get a group of "dots" showing the corners of the Fence. This is the default setting, I believe. However, you can also set it so that when you fence a group of objects, instead of the "dots", the group of objects, or text, are highlighted in the color of your choice. This is easier to work with, I think. I actually managed to set my Fence to "highlight" the objects, but I can't remember how I did it. Can someone please explain.

Thank you so much, and have a nice day.

Dan
 
Replies continue below

Recommended for you

Here's what I've been able to find out after placing my post.

(i) To import Excel files, place the file in the Clipboard. You may do this, say, by Edit Copy in the Excel environment. Then in Microstation, just key in Edit Paste, and the Excel file is imported into Microstation. However, I found a flaw in this. It seems that Microstatin imports the Excel as individual files. Say you have a number, "7.4" in Excel. When imported, it is no more "7.4", but three different numbers, i.e. "7" "." "4". Something's not right. Can someone help, please?

(ii) Go to "Workspace" key in "Preferences", then in the "Input" section, make sure to check the box that says "Highlight selecteded Elements", and when you use fence, it will highlight your selection, instead of merely displaying square dots at the corners of your selection.

Thanks, and hope someone can help with (i) above.

Dano
 
Go into MS Excel.
Highlight the area you want ....
{BUT TRY to limit the highlight ... Set your zoom in Excel to 100% and only highlight what you CAN SEE. Pan down and repeat the step AFTER YOU INSERT the each section into MicorStation!}

OK,
Highlight & CTRL + C (For copy in Excel)

Pop into MicorStation ....
Pull down "Edit" > "Paste Special" > "Link to MS Excel"

Click on the black space on your screen to "Paste" the excel sheet.

Continue this process in "Pieces" until your done.

****
One more note about your text rotating ....
You need to 1st pre-set your text in Microstation and your active angle.

Type
aa=0
ft=1
(Before you paste in your text)

Hope this helps.
Rich
 
Thanks, Rich. I sure will give your suggestion a try, and see how it works. I did so something previously quite "similar" to what you suggested, but it didn't turn out the way I intended.

Another way of importing Excel (*.xls) files into Microstation is this. Please let me if this works for all Microstation users, or is it just because I have a special Macros in my machine.

1. Save the Excel files as an *csv file. This is a "comma delimited" file, and yo can do this in the Excel environment when your Excel file is open. After saving, close the file.

2. In Microstation, draw a blank table to "receive" the file. In particular, note your row height.

3. Go to Utilities | Macros, and select the "table" macros. Click Run.

3. The Table Input File opens, and you browse to choose the *.file you need.

4. The Table Characteristics box appears, and you need to configure the values for column width, row height, text width, and text height. These are different for different files. Column width is basically your largest Excel column times your text width, plus a few extra inches to make sure you have sufficient space. Row height is the row height of the table you just created. Text width and text height are basically what you want them to be in your Microstation file.

5. Only after inputting all these variables, then yo click OK.

6. The Excel file (in *.csv format) should be imported into your Microstation file.

7. Now you need to do some manual "cut and paste" to move the imported file into your prepared box.

8. One important thing to note is that you must take out all the "commas" from your *.csv file. You can replace them with another character, and change them back when the file is imported. Commas in the *.csv messes up the import process.

9. Please let me know if this works for everyone, and if anyone can provide some suggestions to make the process even better.

Thanks.

Newbie Dano.

 
Dano,
I tried your method ... as described ... and the macro ran but the results weren't the same as the method I described.

The CSV method works well for basic "formatted" excel sheets but when you get into more complex "Worksheets" the "CSV" method seems cumbersome. The "Linked" method brings in the Excel format better (as you see it on screen in Excel).

Not discourage anyone from using the CSV method or the LINKED method ... I guess its what output you're looking for ... which should dictated which one to use.

Hope that helps anyone out there.
Rich
 
Rich,

I have tried to "Copy & Linked" method you described, and found that I am able to "import" my Excel file into Microstation. As my file was large, I had to do this in "pieces" as you described. I have a few questions, though, and I hope you can help clarify them.

1. I was not able to "edit" the Excel after it was imported into Microstation. Please also see the second post in this thread above; actually a response to my own questions.

For some reason, the text in each of my Excel boxes becomes "disjointed" after being imported into Microstation via the "Copy & Linked" method. It is as if the text in Microstation (instead of being a single continuous sentence) has become many individual single text characters very closely spaced together, and I wasn't able to "edit" the text after it has been imported, short of retyping everything again, which defeats the purpose of importing, of course. Do you have this problem, and if so, how did you correct it?

2. Is there a way to specify what size the text of the Excel file will be after it is "Copy & Linked", or does it automatically take on whatever size the Microstation file happens to have as a default at the time?

Thank you so much for your informative response, and I hope you can shed some light on my queries above.

Newbie Dano
 
Dano,
Ans. to 1
Not sure if this is answered ... but you got me "stumped" ... your Excel sheet shouldn't be locked. If I understand the problem correctly?
It might be the memory on the machine, not sure.

Ans. to 2
YES!
MicroStation will import the Excel sheet based on the current TEXT attributes in the MicroStation file you are in!

That's why I said you may have to type in ...

AA=0
FT=1

AA is the active angle.
FT is the current font type.
LS is line spacing.
TH is text height.
TW is text width.

The above are more variables which may need to be PREset BEFORE you IMPORT the excel sheet.
Otherwise you may have to type it over ... as you did.
OR delete the imported file and re-import file again after YOU DO your pre-sets.

Afterwards you can change your settings for other annotations.

Hope this clarifies some issues.

Rich
 
With the Excel link - you WON'T be able to edit the table in Microstation. You can, however, go into Excel and chagne the table there. Provided you don't add or remove rows or columns, the changes should be reflected in the MS file. If not, go to Edit>Object Links... select the OLE file you want to update, and click the Open Source button. This way, as you edit the Excel file, the changes will immediately update to the MS file.

About fences, let's make sure that we are using our terminology correctly. Everyone who started using Microstation under DOS with version 3.5 or earlier, please raise your hand...

What is being talked about in this post is a Selection Set, which in not the same thing as a fence (in the DOS versions, fences are all we had). Fences are very powerfull tools when you know how to use them.

Hope this helps...

(Disregard the quote below)
Robert Weber, EI
Maurer-Stutz, Inc
"I am satisfied that your answer is correct. I am not, however, satisfied that your answer is right."
 
Thanks, RAWeber. You hit the nail right on the head! I had imported the Excel file, as Rich has explained in a previous response, but once the Excel file was in my Microstation file, I couldn't edit it. This has me worried, obviously, because there are always changes to be made to files.

But you seem to have provided a way to edit the Excel file, and I sure will give it a try.

Have you tried saving the Excel file as *.csv, and using the "table" command of Macros to import the file? Please let us know.

Once again, thank you very much.

Newbie Dano.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor