Package com.luciad.format.dwg
Interface ILcdDWGModelDecoder
- All Superinterfaces:
ILcdModelDecoder
- All Known Implementing Classes:
TLcdDWGModelDecoder
,TLcdDWGModelListDecoder
This interface provides common methods for decoders of the
DWG
file format.
Input files
File | Required | Entry point | Description |
---|---|---|---|
*.dwg | x | x | Drawing file containing vector data |
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 DWG file.
- All models returned by this model decoder implement
ILcd2DBoundsIndexedModel
.
Model descriptor
- All models returned by this model decoder have a
TLcdDWGModelDescriptor
. Among other information, the descriptor contains the list of DWG layers and line styles. - The type name of the model descriptor is the display name of this decoder.
Model reference
- Since a DWG file itself doesn't specify a model reference, the
corresponding model reference is retrieved with the help of the
modelReferenceDecoder
, if it is set. - Alternatively, the decoder sets the
defaultModelReference
.
Model elements
- Decoded models contain elements that all implement
ILcdDWGShape
. - The supported elements are specified by the implementations of this interface.
Useful settings
- By default, invisible objects and invisible or frozen layers are not decoded. You can modify this behavior using the following methods:
- By default, extended entity data are decoded. You can control the decoding of extended entity data based on the data types you are interested in, using the following methods: In addition, you can specify the extended entity strings you are interested in, as described in the following paragraph.
- By default, all extended entity strings are decoded. You can control the decoding of extended entity strings based on the string prefixes you are interested in, using the following methods:
Performance tips
- Invisible or frozen objects or layers are not decoded by default, potentially saving some memory and some processing time.
Thread safety
- The decoding of models is not thread-safe, unless specified otherwise by the implementation of this interface.
- 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 Summary
Modifier and TypeMethodDescriptionvoid
addExtendedEntityString
(String aStringPrefix) Adds a string prefix to the set of prefixes that determine which extended entity strings are decoded.void
addExtendedEntityType
(int aType) Adds a DWG extended entity type to the set of types that is decoded.void
Clears the set of DWG extended entity strings that is decoded.void
Clears the set of DWG extended entity types that is decoded.Returns the default model reference for decoded models.Returns the model reference decoder that is for creating model references for decoded models.boolean
Returns whether DWG layers that are marked as frozen are decoded.boolean
Returns whether DWG layers that are marked as invisible are decoded.boolean
Returns whether DWG objects that are marked as invisible are decoded.void
Resets the set of DWG extended entity strings that is decoded.void
Resets the set of DWG extended entity types that is decoded.void
setDecodeFrozenLayers
(boolean aDecodeFrozenLayers) Specifies whether DWG layers that are marked as frozen should be decoded.void
setDecodeInvisibleLayers
(boolean aDecodeInvisibleLayers) Specifies whether DWG layers that are marked as invisible should be decoded.void
setDecodeInvisibleObjects
(boolean aDecodeInvisibleObjects) Specifies whether DWG objects that are marked as invisible should be decoded.void
setDefaultModelReference
(ILcdModelReference aDefaultModelReference) Sets the default model reference for decoded models, in case the model reference decoder doesn't provide one.void
setExtendedEntityStringSelection
(String[] aStringPrefixes) Sets the set of DWG extended entity strings that is decoded.void
setExtendedEntityTypeSelection
(int[] aTypes) Sets the set of DWG extended entity types that is decoded.void
setModelReferenceDecoder
(ILcdModelReferenceDecoder aModelReferenceDecoder) Sets the model reference decoder that will be used for creating model references for decoded models.Methods inherited from interface com.luciad.model.ILcdModelDecoder
canDecodeSource, canDecodeSource, decode, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources, getDisplayName
-
Method Details
-
setModelReferenceDecoder
Sets the model reference decoder that will be used for creating model references for decoded models. The default isnull
. -
getModelReferenceDecoder
ILcdModelReferenceDecoder getModelReferenceDecoder()Returns the model reference decoder that is for creating model references for decoded models. -
setDefaultModelReference
Sets the default model reference for decoded models, in case the model reference decoder doesn't provide one. The default isnull
. -
getDefaultModelReference
ILcdModelReference getDefaultModelReference()Returns the default model reference for decoded models. -
setDecodeInvisibleObjects
void setDecodeInvisibleObjects(boolean aDecodeInvisibleObjects) Specifies whether DWG objects that are marked as invisible should be decoded. The default isfalse
. -
isDecodeInvisibleObjects
boolean isDecodeInvisibleObjects()Returns whether DWG objects that are marked as invisible are decoded. -
setDecodeInvisibleLayers
void setDecodeInvisibleLayers(boolean aDecodeInvisibleLayers) Specifies whether DWG layers that are marked as invisible should be decoded. The default isfalse
. -
isDecodeInvisibleLayers
boolean isDecodeInvisibleLayers()Returns whether DWG layers that are marked as invisible are decoded. -
setDecodeFrozenLayers
void setDecodeFrozenLayers(boolean aDecodeFrozenLayers) Specifies whether DWG layers that are marked as frozen should be decoded. The default isfalse
. -
isDecodeFrozenLayers
boolean isDecodeFrozenLayers()Returns whether DWG layers that are marked as frozen are decoded. -
resetExtendedEntityTypeSelection
void resetExtendedEntityTypeSelection()Resets the set of DWG extended entity types that is decoded. All extended entity data types will now be included in the models when decoding DWG files.- See Also:
-
clearExtendedEntityTypeSelection
void clearExtendedEntityTypeSelection()Clears the set of DWG extended entity types that is decoded. None of the extended entity data types will now be included in the models when decoding DWG files.- See Also:
-
setExtendedEntityTypeSelection
void setExtendedEntityTypeSelection(int[] aTypes) Sets the set of DWG extended entity types that is decoded. Only extended entity data with the specified types will now be included in the models when decoding DWG files.- Parameters:
aTypes
- a list of extended entity types.- See Also:
-
addExtendedEntityType
void addExtendedEntityType(int aType) Adds a DWG extended entity type to the set of types that is decoded.- Parameters:
aType
- an extended entity type.- See Also:
-
resetExtendedEntityStringSelection
void resetExtendedEntityStringSelection()Resets the set of DWG extended entity strings that is decoded. All DWG extended entity strings will now be included in the models when decoding DWG files.- See Also:
-
clearExtendedEntityStringSelection
void clearExtendedEntityStringSelection()Clears the set of DWG extended entity strings that is decoded. None of the DWG extended entity strings will now be included in the models when decoding DWG files.- See Also:
-
setExtendedEntityStringSelection
Sets the set of DWG extended entity strings that is decoded. Only DWG extended entity strings with the specified prefixes will now be included in the models when decoding DWG files.- Parameters:
aStringPrefixes
- a list of string prefixes.
-
addExtendedEntityString
Adds a string prefix to the set of prefixes that determine which extended entity strings are decoded.- Parameters:
aStringPrefix
- a list of string prefixes.
-