Cleaning up LineStyles when using DGNLIBS

Here is the situation....
We have recently updated many linestyles where we have CHANGED the display characteristics, but have retained the exact same name.  The process we followed was we opened the DGNLIB file that contained the linestyes, and then imported the new linestyle definitions (they are based on the AutoCAD ASCII  LIN format).  The dialog confirmed that existing linestyle definitions already existed in the file with the same names.  I confirmed to replace with the new definitions.  The DGNLIB was updated with the new LineStyle definitions.  To confirm, I exited the file, and re-entered just to confirm he new definitions were correctly displaying.  All is good! 

However, what I am concerned about are instances where the "old" linestyles are imported into existing DGN files.  Since we are using DGNLIB's to manage the use of linestyles what I am not sure about is what happens when I open an existing file that has "old" linestyles (by the same name) already in the file?  Will the the properties of the DGNLIB LINESTYLE file be used instead of the definition that is in the active DGN file? My concern is that the DGNLIB linestyle definition will be ignored, consequently the linestyle will not display correctly based on the current DGNLIB.

Parents
  • Be aware that importing new linestyles does not replace existing ones in dgnlib if it is attached as current dgnlib. After around 10 times importing the same linestyles the dgnlib starts to get corrupted. There is a flaw that after each import dgnlib file gets bigger. To be safe backup dgnlibs regulary then import linestyles only when dgnlib is detached and compress file after importing (filed ST8001413294)

    Regarding updating existing DGN files then yes linestyles from DGNLIB are not automatically updated as it was with RSC linestyles. So if it is needed that linestyles are instantly updated then do not import them in dgnlib but use RSC files. Linestyles from DGNLIB are imported in DGN automatically on first use so later this file can be opened on another machine without need to provide rsc or dgnlib only drawback is that they are not updated.

    There is a key-in: "dgnlib update all" which updates all customizations from dgnlib, only except element templates and linestyles which of no use in this case .

    To update you could export linestyles from DGNLIB to RSC. Then use other key-in "linestyle import todgn used linestyle.RSC" as batch process on all existing DGNs. Maybe there are other ways of which I do not know. It would be great to hear from Bentley which is the right way to do.

  • Thanks for the info. we've done more testing. what we are finding is that in all instances IF a dgn file has linestyles imported, the local instance of the linestyle is ALWAYS used, regardless if a DGNLIB or a RSC file that has the same named linestyles is configured.  

    We had thought (hoped for!) that if we use the RSC file in configuration (MS_SYMBRSRC > "Myfilename".rsc) that regardless if the active DGN had linestyles imported, it would use the RSC definition, instead of the local file definition.  This is proving to be a bad assumption.  It looks like the precidence is as follows:

     1-Local definition

     2-RSC definition

     3-DGNLIB definition

    Regardless of how configuration reads, or loads (First or Last), it looks like the local file always wins.   I would really like to have someone from Bentley confirm this!

    -tim

    Tim Kohn

Reply
  • Thanks for the info. we've done more testing. what we are finding is that in all instances IF a dgn file has linestyles imported, the local instance of the linestyle is ALWAYS used, regardless if a DGNLIB or a RSC file that has the same named linestyles is configured.  

    We had thought (hoped for!) that if we use the RSC file in configuration (MS_SYMBRSRC > "Myfilename".rsc) that regardless if the active DGN had linestyles imported, it would use the RSC definition, instead of the local file definition.  This is proving to be a bad assumption.  It looks like the precidence is as follows:

     1-Local definition

     2-RSC definition

     3-DGNLIB definition

    Regardless of how configuration reads, or loads (First or Last), it looks like the local file always wins.   I would really like to have someone from Bentley confirm this!

    -tim

    Tim Kohn

Children
  • I'll put some closure to this topic, as I did spend quite some time with bentley support working this issue.

    1.  When linestyles are used from a resource (RSC) file, the linestyles are NOT inserted into the dgn file.  The dgn file does however know that the linestyle uses an external RSC.  If the RSC file is not found, the line displays as a solid line.
    2. Continuing from the previous statement, if the RSC is not found, but a DGNLIB is used (that has the same named linestyles) the linestyles placed initially using the RSC file as the source will display.  However, if additional linestyles are inserted into the file using the same names as when the RSC was used, the linestyles are NOT inserted into the file, even though the only source is the DGNLIB.  This was confirmed by existing the file, detaching in configuration the DGNLIB, and then opening the file with no configuration for RSC or DGNLIB.  All lines in the file were solid, regardless if placed when the RSC or DGNLIB were attached via configuration.
    3. Continuing on.... if i reattach the DGNLIB via configuration, and then place more lines, using a NEW linestyle that had not previously been used in the file, the linestyles are embedded in the file.  To test, I once again exited the file, detached the DGNLIB in configuration, and then when re-opening the file, I had a mixture of solid lines and lines with linestyles.  Linestyles were only displayed for the elements that were inserted when a new linestyle was used from a DGNLIB.

    Conclusion:

    Linestyles that are embedded in the DGN file, either directly imported, or through the use of the DGNLIB, have the highest precidence.  Attaching via configuration an external RSC, or DGNLIB, will not automatically refresh the linestyle display of linestyles of similar names.  

    If linestyles display has changed, the new linestyles (from RSC or DGNLIB) must be re-imported into the DGN file.  This can be done using the custom linestyle tool, or via keyin:

    $ linestyle import todgn used $(ACM_RootDrivePath)G04-Styles/DGN/$(ACM_MSversion)/$(ACM_MSunits)/DGNLIB/_ACM-G-LINESTYLES.rsc
    Note that in the keyin example, I also show that the configuration variables can be used with the keyin.  This keyin will refresh the DGN linestyles that have been used. 

    Having gone through this extensive testing, there are two scenarios that will drive the best practice:

    If you work in a 100% MSTN environment, and if you rarely exchange files outside of your organization, using an RSC will enable you to instantaneously refresh linestyles from a single source, as the DGN file will always look for the RSC file.  If you need to share your DGN files outside of your organization, you will also need to supply the RSC, and also make sure that the external organization properly configures Microstation to use the RSC. 

    If you work in a mixed environment of AutoCAD and Microstation, and you often exchange files outside of your organization, do NOT use RSC files.  Use DGNLIB. Using the DGNLIB will embed the used linestyles into the DGN file, thus ensuring that AutoCAD, or external organizations, will see EXACTLY the same linestyle.

    If you are concerned about 100% compatibility with AutoCAD linetypes, define the line styles in a LIN file format (ASCII file), and import from LIN.  This statement is based on conditions that some of the custom linestyles that can be created in Microstation may not work in AutoCAD.

    Tim Kohn