I just want the resulting dwg to have the exact same layer colors and linetypes as the source.
Anyone succeeded in doing so?
I just want the resulting dwg to have the exact same layer colors and linetypes as the source.
Anyone succeeded in doing so?
I figured it out, I had to set to using a template file(the source file) in the writer.
Now comes the hard part, I want to use this for multiple files in a folder, get all files from a folder, reproject and write the same number of files but for every file use his source as template, that's tough for me.
Apparently I need to use fanout dataset with multiple workspaces and therefore a Workspacerunner.
But that is another question... oh God help me!😁
Hi @_mp7_,
good catch on using the template file! It sounds like you're on the right track with your layer (fme_feature_type) fanout as well. For setting writer templates with multiple different files, you can use a user parameter for your template file instead of hardcoding it to one specific template file.
Source dataset user parameter:
Notice in the Navigator panel (View > Windows > Navigator), your reader has an icon with a purple cog and a person silhouette, it should say something like (Linked to SourceDataset_ACAD) at the end of the data source path and that's FME automatically creating a user parameter for the source data. You can then specify in the template file parameter on the writer, the down arrow > User Parameters > SourceDataset_ACAD to use the corresponding source file (layers colours /line type etc..) to write out. You may need to add the writer to the canvas first, I noticed that I couldn't select User Parameters from the dropdown immediately until after I had plopped the writer down and went back to edit it.
Here's a few resources to check out for more information:
Hope that helps a bit!
Hi @jovitaatsafe ,
thx so much for replying, it certainly helped a lot. In the meantime I made some progress, I managed to make it transform multiple files (every .dwg from a folder) to another folder with every single dwg transformed. The only problem is when using this method, I'm trapped at my problem from the start, as here I can't select the input file to be used for template, because I end up with layers being of the same color and linetype.
Apparently I need to use 2 workspaces, one with PATH reader and on the other treats one file at a time and so I can use traditional readers/writers with the template linked to the input file.
Sounds easy but being a beginner it's hard :)
Hi @jovitaatsafe ,
thx so much for replying, it certainly helped a lot. In the meantime I made some progress, I managed to make it transform multiple files (every .dwg from a folder) to another folder with every single dwg transformed. The only problem is when using this method, I'm trapped at my problem from the start, as here I can't select the input file to be used for template, because I end up with layers being of the same color and linetype.
Apparently I need to use 2 workspaces, one with PATH reader and on the other treats one file at a time and so I can use traditional readers/writers with the template linked to the input file.
Sounds easy but being a beginner it's hard :)
DWG Writer doesn't allow this but FeatureWriter set as DWG does.
You can set Template via attribute
So try it and let us know 😁
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.