I have a workbench to translate a shapefile to Microstation DGN. In the workbench I have a parameter to let the user specify on with attribute of the shapefile the layernames in the DGN should be based. When I run the workbench in FME Workbench everything works fine and the layers in the DGN are named by the content of the attribute. But when I run the workbench in FME QuickTranslator, the layer in the DGN is named by the attribute itself.
Is this a bug?DGN-layernames based on the content of an attribute
Best answer by mark2atsafe
OK, it's a sort of bug. Workbench and the Quick Translator are interpreting the value differently. But it's partly because I don't think this is the best way to handle this.
Your published parameter has two options - but they are just strings you are selecting. You aren't selecting an attribute. This video shows how the icon changes from attribute to string when you make a selection:
https://www.screencast.com/t/wAQbOGkh
Workbench chooses to interpret this selection as an attribute, because an attribute of that name already exists. The Quick Translator doesn't. If anything I'd say the Workbench behaviour is wrong, but I doubt we would want to change it now.
The solution is this: In your published parameter definition, instead of the configuration being GME_NAAM%WPSNAAMNEN (i.e. strings) change it to @Value(GME_NAAM)%@Value(WPSNAAMNEN) (i.e. each entry is specified as an attribute).
That way works, but it's a little bit of a hack.
Another solution ought to be to change the parameter type to Attribute Name and then change the writer feature type name to @Value($(_layer)). But that doesn't work (I think it should), and even if it did you'd be giving the end user the full set of attributes to choose from.
Anyway, try that first solution and see what you think. It works for me.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.