Question

Merge DWGs to 1DWG and put all objects to one new layer named as the original filename

  • 13 November 2017
  • 11 replies
  • 93 views

I have 1000 dwg that has text and lines on 2 layer, i want to merge them all in one dwg and the final dwg should have as layer names all the filename and all the objects (text,lines) should be in only one layer which is the filename the come from.

e.g t1.dwg, t2.dwg... -> merge.dwg (with two layer t1,t2...) every object from t1.dwg should be inside t1 layer in the merged dwg, same with the object from t2.dwg should be all inside t2 layer on the merged dwg, and so one for all the dwgs used as input.


11 replies

Userlevel 4
Badge +30

Hi @shefqetlulja,

I created a example to read a Folder ( files: file1 and file 2 ).

Steps:

1) Generate Workspace:

2) Expose the format attribute fme_basename on Reader option:

3) On Writer: Feature Type -> Layer Name = fme_basename

Thanks,

Danilo

Hi @shefqetlulja,

I created a example to read a Folder ( files: file1 and file 2 ).

Steps:

1) Generate Workspace:

2) Expose the format attribute fme_basename on Reader option:

3) On Writer: Feature Type -> Layer Name = fme_basename

Thanks,

Danilo

It says that Layer " '004016B' is not defined " which 004016b is the name of one of the dwg file 004016b.dwg

 

Userlevel 4
Badge +30
It says that Layer " '004016B' is not defined " which 004016b is the name of one of the dwg file 004016b.dwg

 

Could you share the lof file?

 

 

Could you share the lof file?

 

 

Here it is

 

error.txt

 

Userlevel 4
Badge +30

Thanks for the log file @shefqetlulja.

Could you share the Workspace?

Thanks for the log file @shefqetlulja.

Could you share the Workspace?

Here it is

 

acad2acad.fmw

 

 

Thanks for the log file @shefqetlulja.

Could you share the Workspace?

here you have the datasets too

 

004016b.dwg004016c.dwg004016d.dwg

 

 

Userlevel 4
Badge +30
here you have the datasets too

 

004016b.dwg004016c.dwg004016d.dwg

 

 

Please, try this Workspace .

 

workspace-dwg-edit.fmw

 

 

Please, try this Workspace .

 

workspace-dwg-edit.fmw

 

 

Yes, it work. what was the problem?

 

 

Userlevel 4
Badge +30
Yes, it work. what was the problem?

 

 

 

I am happy that its works :) the problem was in Writer configurated by Dynamic.

 

Thanks

 

Danilo

 

I am happy that its works :) the problem was in Writer configurated by Dynamic.

 

Thanks

 

Danilo
Do you have any idea how can i split dwg every 300 or any other value, i dont want that my final dwg files has 19000 layers.

Reply