Automatically filling of Title block by Excel database

Automatically filling of Title block by Excel database

LenzHAXHQ
Explorer Explorer
377 Views
3 Replies
Message 1 of 4

Automatically filling of Title block by Excel database

LenzHAXHQ
Explorer
Explorer

Hello,

I'm trying to fill our title block in a new Drawing .idw automatically by just clicking on the "iTrigger" button.

I always get  an error code when i want ot open a new drawing out of our template . idw that the excel file cant be found or that 

 

When  I'm working in the template . idw everything is fine and my iLogic rules work very well and the data are refreshed by clicking on the iTrigger button with the right data out of the excel file, but always I'm opening a new drawing it doesnt work.

 

Here is one of my rules for example.

 

Screenshot 2023-04-04 131156.jpg

 

Is there just a fault in my rule or doenst it work in general to automaticcaly fill the title Block of a new .idw  which is created out of the template.idw when the data for the needed properties are referred to an excel file?

 

Thanks for Help.

 

0 Likes
Accepted solutions (1)
378 Views
3 Replies
Replies (3)
Message 2 of 4

A.Acheson
Mentor
Mentor

Hi @LenzHAXHQ 

Have you checked the excel file is found? What is the error message your seeing? 

 

I am not familiar with the open text method your using. I would remove the "oread" lines as it isn't adding anything to the go excel function. Do you know the purpose of them? 

 

This is the standard method to read a file using go excel. See help file here. 

Dim fileName as String ="C\Temp\Excel File.xlsx"
GoExcel.FindRow("filename", "sheetname", "first column title", "operator", value to look for, "second column title", "operator", value to look for, "third column title",...)

 

In your version you are reading a part of the filepath (the filename and extension) and this could be causing the issue. If the drawing file is not saved it won't be able to find the excel file in the drawings directory. So either save the file and or give the full filepath of where the file is saved. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 3 of 4

LenzHAXHQ
Explorer
Explorer

Hello Alan,

 

many thanks for your reply and sorry if my english isnt that good to explain my problem.

 

Here is one of the error code i get when i open a new .idw file from the template:

Screenshot 2023-04-05 082850.jpg

as i read this error code, my rule can find the excel file but cant find the column "Nachname", right?

 

The error code is for all lower rules AD_Mail_Tel-auto_fill, Zeichner_Mail_Tel_auto_fill or Autofill_Bauherr equally and it cant find a specific column

 

Here are the rules for which i get same errors with column :

Screenshot 2023-04-05 085408.jpg

Screenshot 2023-04-05 085441.jpg

Screenshot 2023-04-05 085633.jpg

Have i changed it right?

 

Many Thanks.

Daniel 

 

0 Likes
Message 4 of 4

A.Acheson
Mentor
Mentor
Accepted solution

Your filename line is not being used in the find row function therefore it cannot find the file and the column to search.

Correct

Dim filename as String ="C\Temp\Excel File.xlsx"
i = GoExcel.FindRow(filename,......)

Incorrect

i = GoExcel.FindRow("filename",........)

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan