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?
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 articlecommunities.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.
The ticket is assigned to my colleague, as soon as possible you will receive assistance. With the files that you attached to the ticket, I was not able to reproduce the issue. To my knowledge, no tool can scan the broken elements or replaced elements with different symbology. Perhaps you can attach the original DGN as a reference and compare the missing broken lines.
I suggest creating a new post in the programming forum. Maybe there could have a VBA who can help you.
Benedetta Ridolfi said:Perhaps you can attach the original DGN as a reference and compare the missing broken lines
This is an incredibly unhelpful suggestion!
Do you know how many thousand elements there can be in a single design file? Doubled, tripled or more if there are multiple models. Multiply that by however many drawings there my be in a project. You really think that it is acceptable to tell us to visually inspect every element to find the one or two where the SHX file was not found correctly?
The software knows that this SHX file was required for something - that's why it can generate an error message. Why can that error message not also report What that SHX file was required for?
Microstation 08.11.09.919Power GeoPak 08.11.09.918Power InRoads 08.11.09.918
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/.../
Benedetta Ridolfi said:I suggest creating a new post in the programming forum. Maybe there could have a VBA who can help you
Oto said:[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 Don H. Fu, 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...)
Don H. Fu said: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.
No it is totally wrong approach. We use only AutoCAD compatible linetypes so there should be no nonstandard SHX in the first place. At least it should place the shx file in same folder as file and not in some obscure place. Even if using remapping utility it should remap all linestyles to correct linetypes by LIN file but of course sometimes mistakes happen.
As the conversion process is nontransparent to user there is no control when conversion fails for some linestyles so that is why we ask for some more detailed report to avoid dealing with those wrong translated linestyles and avoid delivering dgnstyle garbage files.
It also doesn't address files that we receive from other places. In that case, I am not outputting anything. I am opening a DWG file of unknown origin. I have no control over what SHX files were or were not delivered. I might not even have them. I would like a way to know what they were used for.
Sounds like you may be encountering a different problem - you might be opening a DWG file that contains line types imported from a DGN file by ACAD?
If saving DGN as DWG is still the process I thought you had the issue with, mapping linestyles should give you line types you want in the target file. If you still get SHX font converted from original DGN line style, that's not expected.