Skip to main content

@Michael257

The format attributes fme_basename and fme_dataset are unique, in that they are not created unless they are exposed on the input feature types. You can expose them by right-clicking on the input feature type and choosing Properties from the menu, then choosing the Format Attributes tab.


Thanks Dave but my input feature types are arriving from a FeatureReader fed by a Schema reader of a cad file. Your solution doesn't seem to work. I should add that the problem only occurs on one of the 10 or so feature types (each one a cad layer) leaving the FeatureReader. It's bizarre as it works fine with version 0 and fails with version 1.


Thanks Dave but my input feature types are arriving from a FeatureReader fed by a Schema reader of a cad file. Your solution doesn't seem to work. I should add that the problem only occurs on one of the 10 or so feature types (each one a cad layer) leaving the FeatureReader. It's bizarre as it works fine with version 0 and fails with version 1.

In the reader Parameters in the FeatureReader, please click the triangle beside Schema Attributes, then the ... button beside Additional Attributes to Expose. This will bring up a dialog from which you can select fme_basename to expose.

You could also use the FileNamePartExtractor on the attribute containing the filename on the feature being input to the FeatureReader, but try exposing fme_basename first.


Thanks Dave - I had actually added the fme_basename and fme_dataset to the additional attributes to expose dialogue in the FeatureReader parameters before you mentioned it. This was to no avail. The fme_basename is gone but not forgotten after the FeatureReader. I'm not sure why the upgrade to the AttributeExposer has caused this problem. However, I've come upon a solution that is working. By adding a variablesetter before the FeatureReader, I'm able to retrieve the fme_basename later in the process and successfully continue processing to the end.


Thanks Dave - I had actually added the fme_basename and fme_dataset to the additional attributes to expose dialogue in the FeatureReader parameters before you mentioned it. This was to no avail. The fme_basename is gone but not forgotten after the FeatureReader. I'm not sure why the upgrade to the AttributeExposer has caused this problem. However, I've come upon a solution that is working. By adding a variablesetter before the FeatureReader, I'm able to retrieve the fme_basename later in the process and successfully continue processing to the end.

In that case, I think you want to disable the fme_basename in the FeatureReader, since it will overwrite the one you want to keep from the CAD file. In the FeatureReader, please check that Attribute and Geometry Handling - Accumulation Mode is set to Merge Initiator and Result, to keep the attribute from the CAD file.


Hi Dave - as I used a different name ('filename') than fme_basename in the variable setter it's not overwriting the fme_basename and persists through the downstream side of the FeatureReader. Do you think I should still set the accumulation mode to Merge Initiator and Result? I'll give it a try yet just to see what happens, but everything is working fine now.


Reply