Skip to main content
Question

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


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

danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • November 13, 2017

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


danilo_fme wrote:

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

 


danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • November 13, 2017
shefqetlulja wrote:
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?

 

 


danilo_fme wrote:
Could you share the lof file?

 

 

Here it is

 

error.txt

 


danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • November 13, 2017

Thanks for the log file @shefqetlulja.

Could you share the Workspace?


danilo_fme wrote:

Thanks for the log file @shefqetlulja.

Could you share the Workspace?

Here it is

 

acad2acad.fmw

 

 


danilo_fme wrote:

Thanks for the log file @shefqetlulja.

Could you share the Workspace?

here you have the datasets too

 

004016b.dwg004016c.dwg004016d.dwg

 

 


danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • November 13, 2017
shefqetlulja wrote:
here you have the datasets too

 

004016b.dwg004016c.dwg004016d.dwg

 

 

Please, try this Workspace .

 

workspace-dwg-edit.fmw

 

 


danilo_fme wrote:
Please, try this Workspace .

 

workspace-dwg-edit.fmw

 

 

Yes, it work. what was the problem?

 

 


danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • November 14, 2017
shefqetlulja wrote:
Yes, it work. what was the problem?

 

 

 

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

 

Thanks

 

Danilo

danilo_fme wrote:

 

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.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings