Solved

Update DWG with Excel table

  • 15 December 2017
  • 2 replies
  • 2 views

Hi there. I'm trying to update the .dwg Attribute autocad_text_string with attribute values from a corresponding excel file that was created from the same .dwg and manually corrected. The xlsx file is structured in a way that each sheet represents a layer corresponding to the .dwg and the column header is named autocad_text_string.

The feature merger only takes the first column value of an excel sheet and gives all other dwg attributes of that layer that same value. Do you have any suggestions how to update each features autocad_text_string with the corresponding row value from the excel file?

icon

Best answer by takashi 17 December 2017, 03:18

View original

2 replies

Userlevel 4
Badge +30

Hi @dl,

Could you share us your Workspace template (.FMWT ) ?

Thanks,

Danilo

Userlevel 2
Badge +17

Hi @dl, if it's sure that the order of features output from the DWG reader feature type is match the order of rows in corresponding Excel spreadsheet, you can add sequential number to each feature with a Counter, expose "xlsx_row_id" attribute in the Excel reader feature type, and then use the sequential number and "xlsx_row_id" as join key to merge desired text string to each feature.

Note that "xlsx_row_id" stores row number starting with 1. That is, the row number of the first data row would be 2 if the first row in the spreadsheet was field names row. You will have to set the first data row number to the "Count Start" parameter in the Counter.

Reply