Hi,
I don't think FME can read DWT format (save in DWG format and pass the file) as well as if you want to read the layers from dwt file then atleast one feature should be present in each layer in dwt file. If you have the dwt file as required then you can expose autocad_layer attribute (with attribute exposer transformer) and consider unique layer names by using duplicate remover transformer.
Merging the layer name to each feature (in MapInfo data) as required has to be carried out with the help of feature merger. Before writer you have to ensure that autocad_layer attribute should not be null with the help of tester and pass the data to AutoCAD writer with fanout option in writer properties
Seems to be big procedure but when you try using it, it will be simple
Hope this helps
Hi,
I don't think FME can read DWT format (save in DWG format and pass the file) as well as if you want to read the layers from dwt file then atleast one feature should be present in each layer in dwt file. If you have the dwt file as required then you can expose autocad_layer attribute (with attribute exposer transformer) and consider unique layer names by using duplicate remover transformer.
Merging the layer name to each feature (in MapInfo data) as required has to be carried out with the help of feature merger. Before writer you have to ensure that autocad_layer attribute should not be null with the help of tester and pass the data to AutoCAD writer with fanout option in writer properties
Seems to be big procedure but when you try using it, it will be simple
Hope this helps
Thanks for the feedback @pratap. You my have misunderstood my goal. I'm READING Mapinfo and WRITING DWG. For interest, DWT appears in the list of file types accepted for the Template File.
Thanks for the feedback @pratap. You my have misunderstood my goal. I'm READING Mapinfo and WRITING DWG. For interest, DWT appears in the list of file types accepted for the Template File.
I know this option. This option will create the layer names in dwg but you cant get the layer list while translation.
Layernames has to be extracted first and then assign the layer name to the features in MapInfo.
Hi @andyew,
I think @pratap showed you an important start. This way you can use the template and ain't it necessary to use the DWGStyler transformer to create a style per layer.
When you add a writer, you have an option for importing the feature types
from a dataset, this way you can import all layers as feature types.
Figure 1. Import Feature Types from a dataset (you will need a DWG, a DWT probably want work)
However, you can also choose to create a conversion table and use a
single writer where the AutoCAD layer is served as an attribute. This
way you do not have to set connections to all individual layers.
Figure 2. Use an attribute as the Layer Name.
You can
use e.g. a AttributeValueMapper to map a certain attribute to the
correct layer and then pass it on to the writer.
Figure 3. Use a AttributeValueMapper for mapping attributes to a Layer Name
If you do want to use all DWG layers as feature types, you could use a
AttributeFilter to have output ports for different attribute values.
Within the AttributeFilter you can import the values from a dataset,
this also counts for the AttributeValueMapper. You have to pay attention that you use the option 'Import from Attribute Values' and not 'Attribute Names'.
Figure 4. Import Attribute values for use in AttributeFilter or AttributeValueMapper
Hi @andyew,
I think @pratap showed you an important start. This way you can use the template and ain't it necessary to use the DWGStyler transformer to create a style per layer.
When you add a writer, you have an option for importing the feature types
from a dataset, this way you can import all layers as feature types.
Figure 1. Import Feature Types from a dataset (you will need a DWG, a DWT probably want work)
However, you can also choose to create a conversion table and use a
single writer where the AutoCAD layer is served as an attribute. This
way you do not have to set connections to all individual layers.
Figure 2. Use an attribute as the Layer Name.
You can
use e.g. a AttributeValueMapper to map a certain attribute to the
correct layer and then pass it on to the writer.
Figure 3. Use a AttributeValueMapper for mapping attributes to a Layer Name
If you do want to use all DWG layers as feature types, you could use a
AttributeFilter to have output ports for different attribute values.
Within the AttributeFilter you can import the values from a dataset,
this also counts for the AttributeValueMapper. You have to pay attention that you use the option 'Import from Attribute Values' and not 'Attribute Names'.
Figure 4. Import Attribute values for use in AttributeFilter or AttributeValueMapper
Thanks @lars_de_vries and @pratap. I just want be clear, I don't mean to sound ungrateful. If that's how I sound I apologise. I just try to be very clear.
I've read and re-read your comments and I just get the feeling I'm missing something fundamental. Perhaps if I explain my expectation it might make my mis-understanding of the information provided more obvious.
To explain further, a DWT in the CAD world is a very definitive standard to which a drawing must adhere. It represents a standard that a given DWG drawing can be evaluated against and exceptions reported.
I presumed (apparently incorrectly) the writer would seek to use the Template to enforce these same adherences, or at least expose these standard values(layers) to ensure a mapping could be made to the layers.
I understand the information you have both kindly provided but it just seems a little odd that the DWT option is there but doesn't seem to provide an active target. The documentation on this setting pretty much says what I've said but does not explain its value in the conversion process.
It seems an unnecessary effort to have to create a fake object per layer just so the parser can enumerate a target, particularly since the DWG\\DWT already defines the layer and by virtue of placing an object on that layer enforce the standard colour\\linestyle etc. but I guess that's how the tool works.
Thanks again for your guidence.
Hi @andyew,
I think @pratap showed you an important start. This way you can use the template and ain't it necessary to use the DWGStyler transformer to create a style per layer.
When you add a writer, you have an option for importing the feature types
from a dataset, this way you can import all layers as feature types.
Figure 1. Import Feature Types from a dataset (you will need a DWG, a DWT probably want work)
However, you can also choose to create a conversion table and use a
single writer where the AutoCAD layer is served as an attribute. This
way you do not have to set connections to all individual layers.
Figure 2. Use an attribute as the Layer Name.
You can
use e.g. a AttributeValueMapper to map a certain attribute to the
correct layer and then pass it on to the writer.
Figure 3. Use a AttributeValueMapper for mapping attributes to a Layer Name
If you do want to use all DWG layers as feature types, you could use a
AttributeFilter to have output ports for different attribute values.
Within the AttributeFilter you can import the values from a dataset,
this also counts for the AttributeValueMapper. You have to pay attention that you use the option 'Import from Attribute Values' and not 'Attribute Names'.
Figure 4. Import Attribute values for use in AttributeFilter or AttributeValueMapper
@lars_de_vries and @pratap I wanted to provide some feedback. Both your advices were very helpful. However my confusion came directly from the difference in the way FME works when you use the Wizard versus starting with a blank workspace and adding readers and writers. I had no idea they would perform so differently. Once I started with a very simple example your advice became clear. Thank you both again.