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