Skip to main content

Hi,

I Would like to read a directory with 76 LandXML with one alignment each.

Replacing the current name of each Alignment name with the basename file.

and Place all the result in one LandXML or separately

- I used the StringReplacer and replace the feature Name for the basename.

Its working fine on the Inspector

but cannot exporting the landxml file.

I try to export all LandXML in one file and export all LandXML in basename alignement file..

But having problem with LandXML exporter.

Do you know how i can merge it ?

 

Thx!

Hi @syllan,

In Inspector the attribute fme_basename is empty or not?

Thanks,

Danilo


Hi !

Its not empty

The StringReplacer work, it replace the orginal name for the filename in the Inspector.

The problem its when i try to export it in LandXML.

If I just remove the StringReplacer Transformer. And joint the Reader to the Writer. Its not working too.


Hi !

Its not empty

The StringReplacer work, it replace the orginal name for the filename in the Inspector.

The problem its when i try to export it in LandXML.

If I just remove the StringReplacer Transformer. And joint the Reader to the Writer. Its not working too.

Perfect.

 

Try to enable the Fanout option in Navigator.

 

 

I simulated here with this option and its works!

 

 

 

Thanks,

 

Danilo

 


Hi !

Its not empty

The StringReplacer work, it replace the orginal name for the filename in the Inspector.

The problem its when i try to export it in LandXML.

If I just remove the StringReplacer Transformer. And joint the Reader to the Writer. Its not working too.

There was a problem writing out the `Alignments' and `Alignment' elements. The problem was: `Item id must be globally unique.'.

 


LandXML requires that 'Name' attributes are globally unique. If features have non-unique values for the 'Name' attribute, the attribute will need to be renamed.

 


There was a problem writing out the `Alignments' and `Alignment' elements. The problem was: `Item is already in a collection.'.

 


A fatal error has occurred. Check the logfile above for details

 


... Last line repeated 3 times ...

 

 

 


Hello @syllan,

 

I believe the issue you are experiencing is due to reading in multiple LandXML files and trying to write to a single output file. It appears that there are features that are required to be globally unique(values cannot be present more than once) in your current document. Secondly, it appears that there are attributes that likely share names as well.

 

Alternatively, you may be able to create a new LandXML by using a XMLTemplater. You can use your existing LandXML document as a template to populate. More information and an example can be found here:

 

 

https://docs.safe.com/fme/2017.1/html/FME_Desktop_Documentation/FME_Transformers/Transformers/xmltemplater.htm

https://knowledge.safe.com/articles/30940/xml-writing-with-xmltemplater.html


Hi !

Its not empty

The StringReplacer work, it replace the orginal name for the filename in the Inspector.

The problem its when i try to export it in LandXML.

If I just remove the StringReplacer Transformer. And joint the Reader to the Writer. Its not working too.

OK I Find the problem : 2 Files contains 2 ALINGMENT.. That why its not working.

 

The Fanout solution work THX
OK I Find the problem : 2 Files contains 2 ALINGMENT.. That why its not working.

 

The Fanout solution work THX
Oh Great, that the problem was solved @syllan :)

 


Reply