Original Article Date: March 19, 2004
MicroStation's HTML Author allows you to quickly create a web-ready HTML page of a selected cell library. Once created, the resulting web-page can be used to drive the placement of cells inside of a MicroStation design file.
Let's see how this works...Open MicroStation and pop into any design file.Connect to the browser from within MicroStationFor V8 users, open this link in the browser: /askingapics/190_V8_Cells.htmAnd for other MicroStation users, use this link:/askingapics/190_V7_Cells.htmOnce the page has loaded, you'll see an array of cells that are ready for placement into the open design file.
At this point you can poke on the image of the cell you want to place and notice this activates the Place Active Cell tool. You can then adjust the settings and follow the prompts. Nothing to it! To create your own web page of cells, start by opening a design file and ensure that you've opened the Print/Plot dialog at least once. The reason for this is that the HTML Author creates images for the web page which requires the use of MicroStation's plotting sub-system. Failure to pre-load the plotting sub-system will result in image files with no image or perhaps an error message stating that it's unable to open the print config file.Select Utilites > HTML AuthorEnsure that Cell Library is the option selected.
Navigate and select the cell library of your choice. At this point you'll notice that MicroStation does two things:It closes your active file and opens either uhtm2d.dgn or uhtm3d.dgn depending upon the version of MicroStation you're using. This file is a sort of a 'template' file which is used to generate the images of the cells for the web page.You will also be presented with a dialog containing various options.
Although most of the options in the dialog are self-expanitory, there are a couple of things to point out:By default the image format is set to JPEG.If the Image Format option is blank/greyed out, it's more than likely due to the plotting sub-system not been pre-loaded as described above.Tweak the settings in the dialog as desired and press OK. In doing so, you'll be presented with another dialog that allows you to set the folder locations for the files that will be created.
Selecting the last OK will kick off the process of creating the web page and if you look closely you'll notice that MicroStation is actully plotting individual images using the appropriate print driver. Once complete, the web page is ready for testing and loading onto a web server. Of course you can also use it "as is" on your local drive.Note, if the web page is on a web-server, ensure that the mime type is set up for application/microstation and that the word microstation is all lower case. If you are using UNC naming conventions to load the page, it may fail to place the cells. To overcome this, edit the source code as shown:
Original code: A href="production.cel?fmt=raw#GATE_VALVE" Modified code: A href="ustnkeyin://ac=GATE_VALVE"
You can learn a whole lot about how this is set up by looking at the HTML source code for the cell library web pages I put together. Help yourself...it's a great starting point.
Lastly, you may also want to look at the other HTML Author options, the concept is pretty much the same as doing a web page for a cell library, so I'm sure you won't have any problems at all. Have fun!
AskInga Article #190
If people are having issues with web browser prompting to open / save file when clicking on a cell, I found that you need to connect the browser first by selecting Utilities -> Connect Web Browser
This solved the issue for me and correctly places the cell following this procedure.
Message "do you want to open or save this file", reproducible in Windows 7 - 64bit OS with IE 10 installed.
Turning off Enable Protected Mode under Internet Options > Security > Internet solved activating selected cell in current session.
Thanks for this great idea
Creating htm page works, but not to place a cell.
I tried it by changing the source code like shown here, but if I click a picture on the web page there is a microstation window opening and asking "do you want to open or save this file" and showing the name of my cel library and the location of it.
do you know the full source code for the Microstation command and for the browser window to close automatically once the selection has been made? I have this but it is not closing the browser:
<A HREF="ustnkeyin://ac=ANNO-ADDREF"onClick="MM_callJS('BLOCKED SCRIPTself.close()')"><IMG SRC="anno-addref.jpg" ALIGN=MIDDLE HEIGHT=78 WIDTH=124><BR>