SVG Export

SVG Unreadable by Third-Party Applications

I'm puzzled about SVG export: it doesn't produce files that are readable by other applications.

Attached is a PDF of a simple example: it's dimensioned in modest master units, close to the model's origin. Yet when I export this, the SVG file has absurd coordinates. Design file setting is 10,000 UOR per master. For example, here's one of the lines:

line x1="7.39147e+006" y1="-7.39146e+006" x2="7.39249e+006" y2="-7.39146e+006"

The e+006 is exponential notation for 10 to the power 6, which is one million. How does a line 7m long translate in SVG to 7 million units?

Corel Paint Shop Pro says that example.svg, created from the same model as the PDF, is not valid SVG. I don't have Illustrator, so haven't been able to test. But the Adobe SVG plug-in for web browsers won't display a MicroStation exported SVG either.

What's the position with SVG: How was the exporter tested?  How do we obtain a successful export? I don't see many settings options in the export.

  • I don't think they have worked it all out yet.  However you can get a lot of solutions by printing a pdf to scale then using inkscape to import the pdf and save as svg.
  • John,

    I opened your example.svg in Adobe Illustrator CS3 (Version 13.0.2 German).
    The result is indeed very discouraging. Illustrator opened the file without error message, but the result was a blank page.

    Then I did a test with a own sample in MicroStation V8i (Version 08.11.05.17 German)
    Illustrator prompted with an error message that it could not open the file.

    Then I tried to open my sample file in Inkscape (Version 0.46).
    The result for this file was very close to perfect.

    When I tried to open your sample file in Inkscape, the result was the same as in Illustrator. No error message, but a blank page.

    So this problem seems to be connected with well formed SVG and different levels of tolerance of applications.
    Given the fact, that Inkscape which relies fully on SVG opened my sample file without difficulties, the problem may not be on Bentleys side only. However Bentley should make sure that major applications like Adobe SVG viewer or Adobe Illustrator are capable to display the file correctly. Having a partnership with Adobe this shouldn´t be a big deal.

    HTH

    Gunnar 

  • Unknown said:
    I don't think they have worked it all out yet ...

    Unknown said:
    I tried to open my sample file in Inkscape (Version 0.46). The result for this file was very close to perfect.

    Thanks for your comments — it's useful to know that I'm not alone in having trouble. I posted the topic because I had suggested using SVG in reponse to the question, "How do I export DGN vectors to Illustrator?" I had assumed that the SVG export option in MicroStation was added for just that purpose, but I made the wrong assumption. Jared's comment seems to summarise the state of play.

     
    Regards, Jon Summers
    LA Solutions

  • Jon Summers:
    posted the topic because I had suggested using SVG in reponse to the question, "How do I export DGN vectors to Illustrator?"

    John,

    Using Postscript is the traditional way. In the V7 days there has been an excellent Bentley Technote or MicroStation Manager article by Frank Conforti about achieving good results in producing postcript for illustration purposes. PDF is a good alternative to Postscript. Results of imported PDF to Illustrator are as expected. Both are great if you do not want to edit the imported graphics in Illustrator, but just place it in your illustrator illustration.

    However, I didn´t manage to import a pdf with levels to an illustrator file with levels yet. (MicroStation V8i V08.11.05.17 German and Illustrator CS3 V13.02 German) Importing the level structure IMO is crucial if you want to edit the graphics in Illustrator effectively to improve its appeareance. In this case IMO the best way to get DGN to Illustrator is DWG. Illustrator recreates the whole level structure so that for programmers it should be easy to apply Illustrator level styles to the imported DWG levels using VBA. Even if you do this manually, you can give your DGN files a stylish look in Illustrator very quickly.

    In some cases I had issues with text, but this can be solved if you drop the text to conturs before you save to DWG. Compared to PDF import the imported graphics from DWG the lines may have different weights. But for the workflow I mentioned above this isn´t an issue, because you will change this anyway.

    Adobe is a member of the Open Design Alliance, so I expect them to use the alliances OpenDWG libraries. In any case the DWG import to Illustrator is excellent. 

    IMO SVG is intended and useful for creating web content.

    HTH

    Gunnar 

     

  • Unknown said:

    SVG is intended and useful for creating web content.

    SVG is a vendor-neutral public format for describing 2D illustrations. Because it's an XML grammar, it has other benefits. For example, it's possible to pass other data with the drawing, including hyperlinks. It would be straightforward to add attributes, such as level names, to the SVG vectors.

    PostScript and PDF both depend on the goodwill of a single a vendor. While I have nothing but admiration for Adobe, ultimately one company owns & controls those data formats.

    There is value in Bentley supporting SVG. But, the present SVG Export option seems unworkable. As you suggest, PostScript provides a useful workaround.

     
    Regards, Jon Summers
    LA Solutions