-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hi.
I have a bunch of files with wrong item type (I did not make them). I need to re-write the eumUnit and eumItem but re-writing the files is not an option since each file is +100GB.
I am currently using DataUtility which takes like a second but I need to click in each item of each file (it is 4 items and 50 files, so lots of clicks).
I tried this, but does not work. File date is updated, but the items remain unchanged.
mikecore-python/tests/examples_dfs2.py
Lines 47 to 58 in bdccb53
| def ModifyDfs2ItemInfo(filename): | |
| # Open the file for editing | |
| file = DfsFileFactory.Dfs2FileOpenEdit(filename); | |
| # Original name is "Landuse" (7 characters), "GroundUse" is truncated to "GroundU" | |
| file.ItemInfo[0].Name = "GroundUse"; | |
| # Provide a new quantity (updating the item and unit of the quantity directly does not work!) | |
| file.ItemInfo[0].Quantity = eumQuantity(eumItem.eumIAreaFraction, eumUnit.eumUPerCent); | |
| # done | |
| file.Close(); |
is there any suggestion?
daniel-caichac-DHI
Metadata
Metadata
Assignees
Labels
No labels