Skip to main content

Hi all

I want to Check the presence of one or more layers (which I already know the names) and in each of the layers verifies the existence of one or more attributes (already known) when reading the data source.

Thank for advance

You can for example use a Tester for the known layer name based on fme_feature_type, followed by a NoFeaturesTester (from the FME Hub) to get a trigger if it doesn't exist.


You can for example use a Tester for the known layer name based on fme_feature_type, followed by a NoFeaturesTester (from the FME Hub) to get a trigger if it doesn't exist.

Thank you david. I've installed the "NoFeaturesTester", but I don't know how it work. It does not offer configuration options.

 

 


Thank you david. I've installed the "NoFeaturesTester", but I don't know how it work. It does not offer configuration options.

 

 

Have a look at the description, it's fairly straight-forward:

 

https://hub.safe.com/transformers/nofeaturestester

 

Not sure you need it though, it depends on what you want to achieve.
Have a look at the description, it's fairly straight-forward:

 

https://hub.safe.com/transformers/nofeaturestester

 

Not sure you need it though, it depends on what you want to achieve.
This process check if the layer exist in the list of my layer. But how to check that I have all of my presnt layer list in my input data set

 

 


This pattern will read a DWG and check for a layer called "Sector", notably

  1. That the layer "Sector" has at least one feature
  2. That every feature in the "Sector" layer has an attribute called "LabelString"

When creating the reader, make sure to create it as a merged feature type and to expose the format attribute "fme_feature_type":


Thank you david. I do not see the patern. The image is not visible


Thank you david. I do not see the patern. The image is not visible

In e.g. Chrome, right-click and select Open image in new tab.

 

It will open this file: https://i.imgur.com/g4BafRL.png

Thank you david. The image is visible. I will test it and I inform you of the result


Come to think of it, here's also the workspace pictured above.

acad2none.fmwt


Thanks david. I hope you had a good weekend.

The workbench works with the test of a single layer. But when I specify the name of two layers in the tester field, it doesn't work


Anyone knows how to specify the search for two layers ?


Thanks david. I hope you had a good weekend.

The workbench works with the test of a single layer. But when I specify the name of two layers in the tester field, it doesn't work

Can you please be a bit more specific? What happens and what do you expect?

So I will try to be more precise:

I have a DWG file from a designer. This file contains several layers.
My workbench must check that among these layers are the layers: tree_layer, building_layer, and root_layer.

Then it must also verify that tree_layer contains the attributes: name, type, size. And that the building_layer contains the attributes: name, type, surface. If one of the layers or attributes I have specified does not exist then my workbench writes the errors to another layer. I hope it's clearer now

So I will try to be more precise:

I have a DWG file from a designer. This file contains several layers.
My workbench must check that among these layers are the layers: tree_layer, building_layer, and root_layer.

Then it must also verify that tree_layer contains the attributes: name, type, size. And that the building_layer contains the attributes: name, type, surface. If one of the layers or attributes I have specified does not exist then my workbench writes the errors to another layer. I hope it's clearer now
Can you show a screenshot of how you configured the Tester?

 


Here's how I configured to search for my two layers


Here's how I configured to search for my two layers

There's the error, the value of "fme_feature_type" can't be both "tree_layer" AND "building_layer" at the same time.

Yes indeed. That's why I'm looking for a transformer that will allow me to enter several layer names I'm looking for


Yes indeed. That's why I'm looking for a transformer that will allow me to enter several layer names I'm looking for

Maybe the TestFilter can help you out. Make an output port for each of your required layers and re-direct each to their own NoFeaturesTester etc. There is no single transformer to do exactly what you need, you'll have to "program" the logic using the existing transformers.
Maybe the TestFilter can help you out. Make an output port for each of your required layers and re-direct each to their own NoFeaturesTester etc. There is no single transformer to do exactly what you need, you'll have to "program" the logic using the existing transformers.
Yes exactly, I have to put together several transform to do it. But since last week I don't come up with a very good solution

 

 


Yes exactly, I have to put together several transform to do it. But since last week I don't come up with a very good solution


read the fme_data_set (dwg name) and group the fme_feature_types (layers in the dwg) and or the attributes.

Use a listbuilder or aggregator for that.

Search the list for the items you require.

(you may want to test of the features contain objects maybe too.)

An autocad layer does not require it to have objects. (a no feature feature_type can exist)


Reply