Skip to main content
Hi All, 

 

 

I created a Workbench reading a set of DGN Files, set with a publisehd parameter. The parameter was created by right-clicking on the input field for the DGN files. For some reason, it has no type, and I can't pick another one. So far, so good.

 

 

I try to run this Workbench within a WorkspaceRunner, where I concatenate the filepaths, separated by a comma:

 

D:\\MyDocuments\\National_Map\\Data\\LIM\\lim.dgn,D:\\MyDocuments\\National_Map\\Data\\LIM\\extra_dgn\\5_industrie.dgn

 

 

The WorkspaceRunner returns following error:

 

  IGDS Reader could not open file D:\\MyDocuments\\National_Map\\Data\\LIM\\lim.dgn,D:\\MyDocuments\\National_Map\\Data\\LIM\\extra_dgn\\5_industrie.dgn for input Program Terminating   Translation FAILED.

 

However, when I copy-paste the string with the paths to the respective Workbench, it runs smoothly. So, the paths are correct, but I have the impression that the comma is not applied as separator when it is received from the WorkspaceRunner.

 

 

Any ideas what I've missed here? Is there another way to pass multiple files to a Workbench? What type of Published Parameter should I set up?

 

 

best regards, 

 

Jelle

 

Hi Jelle,

 

 

Did you try the directory (existing) parameter type?
Hi Itay, 

 

 

yes, I had tried it already, but I think I can't use this type. The files are in mulitple directories and it are not all files in the directory. I tried the Filename (existing) parameter as well, but it leads to the same problem.

 

 

Of what type is the parameter that is automatically created? There, I can open the 'Advanced Browser' and select all the DGN files I need. I my workspace runner, I read them from an excel list.

 

I also noticed that as soon as I connect another parameter to the file input, the automatically created one disappears.

 

 

If I only pass one DGN file from the WorkspaceRunner, the DGN is processed. 

 

 

I'm not really in fond of the FeatureReader (don't know why, probably a prejudice), but I think I will have to read the ExcelFile in the main workbench and pass it to the feature reader. I think, this is the only way I can avoid passing the file paths from the WorkspaceRunner.

 

 

 

best regards, 

 

Jelle
this doesn't work either. It is not possible for the FeatureReader to specify the file path from an attribute... the feature type is, but that is not what I want to do.

 

 

No Workaround so far.

 

 


Hi David, 

 

 

thank you for the suggestion. I tried it, but it leads to exactly the same result. The concatenation in the WorkspaceRunner is: 

 

 

"D:\\MyDocuments\\National_Map\\Data\\BXL\\BXL.dgn" "D:\\MyDocuments\\National_Map\\Data\\BXL\\extra_dgn\\0_Ref_Boundaries_bxl.dgn"

 

No files are imported, but when I copy-paste this value in the main workbench, it works like a charm.

 

 

Sending each DGN file separately would take too long, since I need to read Oracle tables to link. Besides, I need all the DGN files of a set to do the right analyses. 

 

 

There must be some workaround to this problem.

 

 

 

best regards,

 

Jelle

 

 

 
Hi,

 

 

if you have a long-ish list of filenames it will become a problem passing them on the command line anyway, so I suggest you consider writing the filenames to a temporary file and pass only the filename to your second workspace.

 

 

David
Hi Jelle,

 

 

Could it be that the paths are not recognized? have you tried UNC paths ?
Hi David, 

 

 

I think the length of the string passed might be the cause of the problem indeed. I had just started writing a PythonScript Parameter in the second workbench. This is, however, not flexible.

 

 

Your suggestion would be much more flexible indeed. But I would have to read the temprary file in the second workbench before I start loading the DGN files. How could I do that? Or have I misunderstood what you mean?

 

 

 

best regards, 

 

Jelle

 

 


Hi Itay, 

 

 

I'll give that  a try as well.

 

 

Thanks,

 

Jelle

 

 


Hi All, 

 

 

it looks like it doesn't have anything to do with the WorkspaceRunner. If I create this string as a Python Parameter: D:\\MyDocuments\\National_Map\\Data\\BXL\\BXL.dgn,D:\\MyDocuments\\National_Map\\Data\\BXL\\extra_dgn\\0_Ref_Boundaries_bxl.dgn it doesn't work. But if I change the Input Parameter of the DGN again to the automatical parameter (the one without a type), and I copy paste this string, the two files are imported without any problem.

 

 

So, the input field can only be filled in manually if there is more than one DGN file. 

 

 

UNC file notation has the same outcome.

 

 

Rather than writing a temp file with the filepaths, I think I will have to merge the DGN files to one single temp DGN file and pass this through the WorkspaceRunner. But this is an extra step, where I have to hardcode the paths. An Excel file would have been nicer and easier to maintain.

 

 

 

best regards, 

 

Jelle

 

 

 

 


Hi Itay and David, 

 

 

thank you for your support today! 

 

 

Unfortunately, I had to solve it the pragmatic way and change my folder structure. A shame that it did not work out with the values read from the Excel File. 

 

 

 

best regards,

 

Jelle

 

 


Hi Jelle,

 

 

Most of the times it is more pragmatic and efficient to make good agreements on issues such as data location, instead of trying to solve everything in FME.

 

This is one of the first issues I try to agree with the client, before going into the FME solution.

 

 

Cheers,

 

Itay

Reply