Sharjith Naramp... Tue, 01/27/2009 - 08:51 Forums: Other usage issuesHow can I iterate through the OCAF document main label and populate my application's treeview instead of using the DFBrowser? Dirk B Tue, 01/27/2009 - 09:16 Hi Nair, here's a little code for the task: void Traverse( TDF_Label label, TreeView tv ) { TreeItem ti = tv.AddTreeItem(); AddAttributesToTreeItem( label, ti ); for( TDF_ChildIterator it( L, Standard_False ); it.More(); it.Next() ) Traverse( it.Value(), tv ); } Log in to post comments Sharjith Naramp... Tue, 01/27/2009 - 10:53 Dirk, Thanks a lot. You have given me a good direction. Regards N. Sharjith Log in to post comments
Tue, 01/27/2009 - 09:16
Hi Nair,
here's a little code for the task:
void Traverse( TDF_Label label, TreeView tv )
{
TreeItem ti = tv.AddTreeItem();
AddAttributesToTreeItem( label, ti );
for( TDF_ChildIterator it( L, Standard_False ); it.More(); it.Next() )
Traverse( it.Value(), tv );
}
Tue, 01/27/2009 - 10:53
Dirk,
Thanks a lot. You have given me a good direction.
Regards
N. Sharjith