[CE] DWG:could not find SHX font

Any ideas how to check which lines are missing shp symbols when opening a DWG file? The message "could not find SHX font [dgnlstyle]" is not very informative as I would like to know which line was not correctly converted to DWG. The missing symbols are replaced with dots or question marks but it is only visual indicator or is there some way to actually scan and find those broken lines?

Parents
  • Hi Oto, if you please share the file I will search for a way to scan all the elements with the not converted SHP symbols.


    DWG line styles are a subset of MicroStation line styles. Because of this disparity, there are several features in MicroStation line styles that do not translate directly to DWG. Some features are lost in the translation, while other line styles will not translate at all.

    I suggest checking the path where MicroStation searches the SHP fonts in these two variables MS_FONTPATH and MS_DWGFONTPATH. Check this article
    communities.bentley.com/.../fonts-in-microstation

    Because all point symbols in DWG line styles must be represented as shapes in an SHX shapefile, the elements in the point symbol are converted to a shape during the translation. The font file is named dgnlstyle.shx and will appear in your DWG fonts directory just like other fonts. Check these configuration variables:
    MS_DWG_LSTYLE_FONTPATH determines the location for the font file.
    MS_DWG_LSTYLE_FONTNAME determines the name of the font file (and therefore the name of the font)

    I suggest looking closely at this article:
    communities.bentley.com/.../line-styles-and-dwg-files

  • There is active SR (7001254219) regarding this as old MS_ACADDIR also doesn't seem to work the same it used in v8i.

    Will try these variables but original question is not regarding how to provide correct SHX but how to check which lines are not DWG compatible as there is no indication which are unsupported only when converting. The hardcoded workflow that creates dgnlstyle.shx in some system directory is bad approach and doesn't solve any real issues. After conversion checking file on same computer shows correctly but no option to check which SHX files are linked to this DWG. Users forget to include dgnlstyle when delivering DWG so it is too obscured.

  • Hi Mary B., I know the complexity of a file but there is not such a tool as Oto asked so my suggestion is to try to post on the programming forum to find a VBA that is able to do it.


    For now, you can only have the error message without all the information that you are asking for, you can write on the Idea Community this needed implementation: communities.bentley.com/.../

  • MaryB

    Power GeoPak 08.11.09.918
    Power InRoads 08.11.09.918
    OpenRoads Designer 2021 R2

        

  • I suggest creating a new post in the programming forum. Maybe there could have a VBA who can help you
    [Programming Forum] How to check which lines are missing shp symbols when opening a DWG file?

    When peering into the intimate details of a file, particularly a file originating from another application, VBA is not a good tool for the job.  VBA's purpose is to automate user actions, which it does very well.

    Understanding DWG content and why MicroStation fails to interpret it is not a user task.  It requires someone knowledgeable about file formats and how MicroStation's DWG schema is designed to accommodate those dusty corners of another app.  VBA is not a substitute for a MicroStation DWG expert.

    The AutoCAD guru at Bentley Systems was , but I haven't seen any activity from him in recent (2021) times.  Is there a new Bentley Systems DWG expert?

     
    Regards, Jon Summers
    LA Solutions

  • Many elements can use the same line style.  Reporting each and everyone of them in the text window is probably not desired.  Reporting only the first instance may be better, but it still does not address your concern of locating all elements that use the same line style.  Most users care about getting the missing font resolved in the delivery.  Benedetta's suggestion of using the config vars to locate the output fonts is the right way to address the issue.  Once you know where your SHX fonts are located through the SaveAs process, you can deliver your the font files to the correct target folders based on the product (ACAD, MicroStation, etc) that will use them.



  • I actually don't care about specific elements. I care about the linestyle in general. As in, which linestyle is using the font that is missing?

    Yes, seeing that a font is missing is helpful so that I can go to people and ask them if they can send it to me. But it would be even better to be able to have an answer when they ask "What do you need it for?" (Your ditch flowline...)

    MaryB

    Power GeoPak 08.11.09.918
    Power InRoads 08.11.09.918
    OpenRoads Designer 2021 R2

        

Reply
  • I actually don't care about specific elements. I care about the linestyle in general. As in, which linestyle is using the font that is missing?

    Yes, seeing that a font is missing is helpful so that I can go to people and ask them if they can send it to me. But it would be even better to be able to have an answer when they ask "What do you need it for?" (Your ditch flowline...)

    MaryB

    Power GeoPak 08.11.09.918
    Power InRoads 08.11.09.918
    OpenRoads Designer 2021 R2

        

Children
No Data