Hi All,
I have rdb file like blow,
####################
top_opcV 1000
cdvar
19 19 1 Oct 28 16:46:46 2015
IL: cdvar
p 1 4
CN top_opcV 1 0 0 1 0 0 1
min_relative 0.0105
max_relative 0.0145
CLASS_FLAT_COUNT 1
-14752 11146
-14614 11146
-14614 11620
-14752 11620
p 2 4
min_relative 0.0105
max_relative 0.0145
CLASS_FLAT_COUNT 1
-14752 14146
-14614 14146
-14614 14620
-14752 14620
#########################
I want use python script to filter this rdb file.
However, I could not get tag name when I test it. My script is,
####
import pya
rdb = pya.ReportDatabase('test')
rdb.load('case.rdb')
for aa in rdb.each_item():
print aa.tags_str
####
I think tags_str function will show tags name list like, min_relative, max_relative ...
However, it return empty string. Then, how could I get these tags name?
Thanks,
Dion
Comments
Hi Dion,
That's not a RDB file, it's a Calibre RVE database ...
The concept that you are looking for is "tagged values". Items and values can be tagged. In your case, the properties are mapped to tagged values. You can obtain the tag ID from the value, use
RdbValue#tag_id
object. To get the tag ID to look for, useReportDatabase#tag_id(name)
.Regards,
Matthias
I add a function in src/gsiDeclRdb.cc
const std::string &database_tag_name(const rdb::Database *db, rdb::id_type tag)
{
return db->tags ().tag (tag).name ();
}
Now I could get tag name for RVE db. Maybe you could consider add it in next release.
Thanks,
Dion
Thanks. That's already planned :-)
Matthias