Skip to main content

Since I am new to FME I have no idea if this is even possible.

I have an Access database that contains projects that are related to specific AutoCAD drawing located in the project folder. I want to create a KML file showing not only place markers (with attribute table in it) for each project but also DWG route. Place markers are easy to do, already done it but I am having trouble figuring out how to implement AutoCAD drawings.

Is it possible to do it through Access database , or I have to use separate Reader for DWG files.

Thank you

Hi @klika68,

You can't read the DWG data through the Access database, but you can use the file locations in Access to control a FeatureReader transformer. The FeatureReader reads the DWG data just like the DWG reader would, but allows you to choose the file(s) to read from the input feature rather than user input.

For more information on the FeatureReader, please see this article: The FeatureReader Transformer.


Hi Dave,

ok I am using FeatureRader that is suppose to read DWGLocation attribute from Access database which is actually a link to DWG file to local drive. Now I am stuck with FeatureReader itself, do I use DWGLocation in Dataset , what about constraints? After entering DWGLocation in Dataset box I get pop-up window asking for Generating Output Ports, so confusing .......

Thanks

featurereader.png


If you click the down arrow to the right of the Dataset box, it should allow you to choose the file location from an input feature attribute. If the attribute does not contain a full path, you may need to use an AttributeCreator to prefix the file name with the path.

Ignore the Constraints section - this is more for databases.

Under Output, set the Output Ports to Single Output Port. Otherwise, you will get a separate port for each layer in the DWG file.


If you click the down arrow to the right of the Dataset box, it should allow you to choose the file location from an input feature attribute. If the attribute does not contain a full path, you may need to use an AttributeCreator to prefix the file name with the path.

Ignore the Constraints section - this is more for databases.

Under Output, set the Output Ports to Single Output Port. Otherwise, you will get a separate port for each layer in the DWG file.

Hi Dave, thanks for your prompt reply.

 

As you can see, there is an attribute in Access database DWGLocation that contains full path to DWG drawing. I guess I do not need Attribute creator.

 

I am not sure what I am doing wrong but I do not get any result in MZL file. Which output should I use in FeatureReader, Schema, Generic, ......

 

As you can see in thepic, kml file iz empty, on the left side you can see kml_1 all the way to kml_179 which is exactly the number of layers contained in DWG file. The otherquestion is, how do I filter and select only layers from DWG that I need and show them in KML.

 

 

Thank you very much for your help!

 

access2.png

 

capture2.png

 

kml.png

 

 


Hi Dave, thanks for your prompt reply.

 

As you can see, there is an attribute in Access database DWGLocation that contains full path to DWG drawing. I guess I do not need Attribute creator.

 

I am not sure what I am doing wrong but I do not get any result in MZL file. Which output should I use in FeatureReader, Schema, Generic, ......

 

As you can see in thepic, kml file iz empty, on the left side you can see kml_1 all the way to kml_179 which is exactly the number of layers contained in DWG file. The otherquestion is, how do I filter and select only layers from DWG that I need and show them in KML.

 

 

Thank you very much for your help!

 

access2.png

 

capture2.png

 

kml.png

 

 

Sorry, I forgot to say that the DWG features will come out of the Generic port.

 

The Schema port outputs a Schema feature, which is handy if you are reading data with attributes, and using a dynamic writer.

 

The format attribute autocad_layer will contain the AutoCAD layer. You can expose this attribute by clicking the Parameters button for the reader in the FeatureReader, then picking Schema Attributes - Additional Attributes to Expose. Click the box beside autocad_layer to expose it.

 

You can then use a Tester or AttributeFilter to keep only the desired layers.

 

 


Reply