Interface ILcdDGNModelDecoder

All Superinterfaces:
ILcdModelDecoder
All Known Implementing Classes:
TLcdDGNModelDecoder, TLcdDGNModelListDecoder

public interface ILcdDGNModelDecoder extends ILcdModelDecoder
This interface provides common methods for decoders of the DGN file format.

Input files

File Required Entry point Description
*.dgn x x Design file containing vector data

Since a DGN file itself doesn't specify a model reference, the corresponding model reference is retrieved with the help of the modelReferenceDecoder or as the defaultModelReference of this decoder. By default, the model reference decoder and the default model reference are unset (i.e. null).

Supported file transfer protocols

  • The supported file transfer protocols are specified by the implementations of this interface.

Model structure

  • This model decoder creates a model per DGN file.
  • All models returned by this model decoder implement ILcd2DBoundsIndexedModel.

Model descriptor

  • All models returned by this model decoder have a TLcdDGNModelDescriptor. Among other information, the descriptor contains the DGN symbology.
  • The type name of the model descriptor is the display name of this decoder.

Model elements

  • Decoded models contain elements that all implement ILcdDGNShape.
  • The supported elements are specified by the implementations of this interface.

Useful settings

Performance tips

  • By default, attributes are not decoded, potentially saving some memory and some processing time.
  • By default, decoded coordinates are stored as doubles. You can reduce the memory usage of the decoded models by storing coordinates in arrays of floats, using the following methods:

Thread safety

  • The decoding of models with one decoder is not thread-safe, unless specified otherwise by the implementation of this interface.
  • It is possible to use multiple decoders concurrently.
  • The decoded models are thread-safe for read access.

Serialization

  • The decoded models and their contents implement Serializable and can be serialized.
  • Only de-serialization from data from the same release version is supported.

Supported versions and specifications

  • The supported versions are specified by the implementations of this interface.
  • Method Details

    • setModelReferenceDecoder

      void setModelReferenceDecoder(ILcdModelReferenceDecoder aModelReferenceDecoder)
      Sets the model reference decoder that will be used for creating model references for decoded models.
    • getModelReferenceDecoder

      ILcdModelReferenceDecoder getModelReferenceDecoder()
    • setDefaultModelReference

      void setDefaultModelReference(ILcdModelReference aDefaultModelReference)
      Sets the default model reference for decoded models, in case the model reference decoder doesn't provide one.
    • getDefaultModelReference

      ILcdModelReference getDefaultModelReference()
    • setDatabaseURL

      void setDatabaseURL(String aDatabaseURL)
      Sets the default database URL that is assigned to all decoded attributes. The URL can then be used by the application.
    • getDatabaseURL

      String getDatabaseURL()
    • setUseFloat

      void setUseFloat(boolean aUseFloat)
      Specifies whether to use memory-conserving floating point data structures for the decoded models.
    • isUseFloat

      boolean isUseFloat()
    • resetLevelSelection

      void resetLevelSelection()
      Resets the list of DGN levels that is included into decoded models. As a result, all DGN levels will be included in the models when decoding DGN files.
    • clearLevelSelection

      void clearLevelSelection()
      Clears the list of DGN levels that is included into decoded models. As a result, only level 0 will be included in the models when decoding DGN files.
      See Also:
    • setLevelSelection

      void setLevelSelection(int[] aLevels)
      Sets the list of DGN levels that is included into all decoded models. Level 0 is always included, irrespective of the selection setting.
      Parameters:
      aLevels - the levels to be included in the decoded models. They can be listed in any order, and duplicate numbers are allowed.
    • addLevel

      void addLevel(int aLevel)
      Adds a level to the list of DGN levels that is included into all decoded models.
      Parameters:
      aLevel - the level to be included in the decoded models.
    • clearLevelNameSelection

      void clearLevelNameSelection()
      Clears the list of names of DGN levels that are to be included into all decoded models. As a result, only levels specified in the numeric level selection will be included.
      See Also:
    • setLevelNameSelection

      void setLevelNameSelection(String[] aLevelNames)
      Sets the list of names of DGN levels that are to be included into all decoded models, in addition to the numeric level selection.
      Parameters:
      aLevelNames - the names of levels to be included in the decoded models. They can be listed in any order, and duplicate names are allowed.
    • addLevelName

      void addLevelName(String aLevelName)
      Adds a name of a DGN level to the list of names of DGN levels that are to be included into all decoded models, in addition to the numeric level selection.
      Parameters:
      aLevelName - the name of the level to be included in the decoded models.
    • resetElementClassSelection

      void resetElementClassSelection()
      Resets the list of DGN element classes that is included into decoded models; As a result, all DGN element classes will be included in the models when decoding DGN files.
    • setElementClassSelection

      void setElementClassSelection(int aElementClasses)
      Sets the list of element classes that is included into decoded models. This property allows to exclude certain classes from the decoded models, e.g. construction elements.
      Parameters:
      aElementClasses - a bitmask, specifying the element classes to be included in the decoded models. It is a logical OR of 1-bits that are shifted left by the following constants:
      • TLcdDGNDisplayInfo.CLASS_PRIMARY
      • TLcdDGNDisplayInfo.CLASS_PATTERN
      • TLcdDGNDisplayInfo.CLASS_CONSTRUCTION
      • TLcdDGNDisplayInfo.CLASS_DIMENSION
      • TLcdDGNDisplayInfo.CLASS_PRIMARY_RULE
      • TLcdDGNDisplayInfo.CLASS_LINEAR_PATTERN
      • TLcdDGNDisplayInfo.CLASS_CONSTRUCTION_RULE
    • getElementClassSelection

      int getElementClassSelection()
      Gets the the bitmask specifying list of element classes that is included into decoded models.
    • setElementClassSelection

      void setElementClassSelection(int[] aElementClasses)
      Sets the list of element classes that is included into decoded models. This property allows to exclude certain classes from the decoded models, e.g. construction elements.
      Parameters:
      aElementClasses - the element classes to be included in the decoded models. They can be listed in any order, and duplicate entries are allowed.

      The available DGN element classes are

      • TLcdDGNDisplayInfo.CLASS_PRIMARY
      • TLcdDGNDisplayInfo.CLASS_PATTERN
      • TLcdDGNDisplayInfo.CLASS_CONSTRUCTION
      • TLcdDGNDisplayInfo.CLASS_DIMENSION
      • TLcdDGNDisplayInfo.CLASS_PRIMARY_RULE
      • TLcdDGNDisplayInfo.CLASS_LINEAR_PATTERN
      • TLcdDGNDisplayInfo.CLASS_CONSTRUCTION_RULE
      See Also:
    • addElementClass

      void addElementClass(int aElementClass)
      Adds an element class to the list of element classes that is included into decoded models. This property allows to exclude certain classes from the decoded models, e.g. construction elements.
      Parameters:
      aElementClass - the element class to be included in the decoded models.

      The available DGN element classes are

      • TLcdDGNDisplayInfo.CLASS_PRIMARY
      • TLcdDGNDisplayInfo.CLASS_PATTERN
      • TLcdDGNDisplayInfo.CLASS_CONSTRUCTION
      • TLcdDGNDisplayInfo.CLASS_DIMENSION
      • TLcdDGNDisplayInfo.CLASS_PRIMARY_RULE
      • TLcdDGNDisplayInfo.CLASS_LINEAR_PATTERN
      • TLcdDGNDisplayInfo.CLASS_CONSTRUCTION_RULE
    • resetUserAttributeTypeSelection

      void resetUserAttributeTypeSelection()
      Resets the set of DGN MSLINK attributes that is decoded. All MSLINK attributes will now be included in the models when decoding DGN files.
      See Also:
    • clearUserAttributeTypeSelection

      void clearUserAttributeTypeSelection()
      Clears the set of DGN MSLINK attributes that is decoded. None of the MSLINK attributes will now be included in the models when decoding DGN files.
      See Also:
    • setUserAttributeTypeSelection

      void setUserAttributeTypeSelection(String[] aTypes)
      Sets the set of DGN MSLINK attributes that is decoded. Only MSLINK attributes with the specified types will now be included in the models when decoding DGN files.

      Note that the attribute entities to be decoded have to be specified as well, using the addAttributeEntity method.

      Parameters:
      aTypes - a list of MSLINK attribute types, specified as numbers in RAD50 format (strings of length 3, e.g. "ODB"). Note that RAD50 is actually radix 40, with the following 40 digits: <space> A...Z $ . 0...9
    • setUserAttributeTypeSelection

      void setUserAttributeTypeSelection(int[] aTypes)
      Sets the set of DGN MSLINK attributes that is decoded. Only MSLINK attributes with the specified types will now be included in the models when decoding DGN files.
      Parameters:
      aTypes - a list of MSLINK attribute types, specified as integers (unsigned shorts, e.g. 0x5e62, which corresponds to 'ODB' in radix 50).
      See Also:
    • addUserAttributeType

      void addUserAttributeType(String aType)
      Adds a DGN MSLINK attribute type to the set of types that is decoded.
      Parameters:
      aType - an MSLINK attribute type specified as a number in RAD50 format (a string of length 3, e.g. "ODB"). Note that RAD50 is actually radix 40, with the following 40 digits: <space> A...Z $ . 0...9
      See Also:
    • addUserAttributeType

      void addUserAttributeType(int aType)
      Adds a DGN MSLINK attribute type to the set of types that is decoded. Only MSLINK attributes that have types in this set are decoded.

      Note that the attribute entities to be decoded have to be specified as well, using the addAttributeEntity method.

      Parameters:
      aType - an MSLINK attribute type specified as an integer (an unsigned short, e.g. 0x5e62, which corresponds to 'ODB' in radix 50).
      See Also:
    • resetAttributeEntitySelection

      void resetAttributeEntitySelection()
      Resets the set of DGN database attributes that is decoded. All DGN database attributes will now be included in the models when decoding DGN files.
      See Also:
    • clearAttributeEntitySelection

      void clearAttributeEntitySelection()
      Clears the set of DGN database attributes that is decoded. None of the DGN database attributes will now be included in the models when decoding DGN files.
      See Also:
    • setAttributeEntitySelection

      void setAttributeEntitySelection(int[] aEntities)
      Sets the set of DGN database attributes that is decoded. Only DGN database attributes with the specified entity numbers will now be included in the models when decoding DGN files.
      Parameters:
      aEntities - a list of entity numbers of database attributes (user or non-user).
    • addAttributeEntity

      void addAttributeEntity(int aEntity)
      Adds an attribute entity number to the set of numbers that is decoded. Only attributes that have entity numbers in this set are decoded.

      Note that, for decoding user attributes, the user attribute types to be decoded have to be specified as well, using the addUserAttributeType method.

      Also note that the fill color, which is also stored as an element attribute, is an exception: it is always decoded as part of the display info.

      Parameters:
      aEntity - an entity number of an database attribute (user or non-user).
    • resetTagSetSelection

      void resetTagSetSelection()
      Resets the set of DGN tag sets that is decoded. All tag sets and their attributes will now be included in the models when decoding DGN files.
      See Also:
    • clearTagSetSelection

      void clearTagSetSelection()
      Clears the set of DGN tag sets that is decoded. None of the tag sets will now be included in the models when decoding DGN files.
      See Also:
    • setTagSetSelection

      void setTagSetSelection(String[] aTagSetNames)
      Sets the set of DGN tag attributes that is decoded. Only the specified tag sets and their attributes will now be included in the models when decoding DGN files.
      Parameters:
      aTagSetNames - a list of tag set names.
    • addTagSet

      void addTagSet(String aTagSetName)
      Adds a tag set name to the set of names that is decoded. Only the specified tag sets and their attributes will now be included in the models when decoding DGN files.
      Parameters:
      aTagSetName - a tag set name.