查看单个帖子
旧 2009-05-07, 05:25 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】rying To Add Plotstyle To Database

trying to add plotstyle to database
trying to add plotstyle to database
i am trying to add the plotstyle "black" to the database
i can not compile the code.
the routine setat wants a (oddbobject *) as second argument.
what can i do ?
{
oddbdictionarywithdefaultptr ppsdic;
odpsplotstyleptr pentry;
ppsdic = pdb->getplotstylenamedictionaryid().openobject(oddb::k forwrite);
pentry = odpsplotstyle::createobject();
ppsdic->setat("black", pentry);
}

database's plotstyle dictionary doesn't hold real plot style information. the single its function is to associate some objectid (handle) with plot style name. this association is necessary to store objectid of plotstyle (small key info, not its name) in oddbentity .
plotstyle dictionary is used only in case named plotstyles are used in database. objects that are stored in this dictionary have type oddbplaceholder. these are fictive objects.
real plotstyle information are stored in ctb and stb files, dd doesn't contain yet functionality for editing files of such type.
sincerely yours,
george udov
thank you very much for the fast reply.
i use now oddbplaceholder in the plotstyle dictionary.
i only needed the name of the plotstyle to be inserted in the database.
this works very fine for me.
so, my problem is solved.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)