Skip to main content
1-Visitor
July 6, 2016
Solved

How to traverse feature element tree in protoolkit

  • July 6, 2016
  • 2 replies
  • 2668 views

Hi guys!

I did it in Object toolkit, but now  I have to rewrite it using protoolkit.

What I've got:

1. Use ProFeatureElemtreeExtract() to get a copy of tree: no errors.

2. create variable:

ProElempathItem depthTypePath[] = { {PRO_ELEM_PATH_ITEM_TYPE_ID, {PRO_E_EXT_DEPTH_TO_TYPE} } };

and use it for

ProElempathAlloc() + ProElempathDataSet() + ProElemtreeElementGet()

Here I got an error:

ProElemtreeElementGet returns code: PRO_TK_E_NOT_FOUND


And further call of ProElementIntegerGet() returns 0 instead of 262144.


I think, I don't know how to create a proper structure of ProElempathItem .

I tried to find info in UG and examples, but it's still not clear to me. I attached xml with my tree.

Can you pls help me with it.

Thanks,

Artem

Best answer by abursuk

OK,

It seems, a proper structure is the following:

static ProElempathItemdepth_elempath_first[] = {
{ PRO_ELEM_PATH_ITEM_TYPE_ID, {PRO_E_STD_EXT_DEPTH}},
{ PRO_ELEM_PATH_ITEM_TYPE_ID, {PRO_E_EXT_DEPTH_TO}},
{ PRO_ELEM_PATH_ITEM_TYPE_ID, {PRO_E_EXT_DEPTH_TO_TYPE} } };

It was pretty simple solution

Thanks,

Artem

2 replies

abursuk1-VisitorAuthorAnswer
1-Visitor
July 6, 2016

OK,

It seems, a proper structure is the following:

static ProElempathItemdepth_elempath_first[] = {
{ PRO_ELEM_PATH_ITEM_TYPE_ID, {PRO_E_STD_EXT_DEPTH}},
{ PRO_ELEM_PATH_ITEM_TYPE_ID, {PRO_E_EXT_DEPTH_TO}},
{ PRO_ELEM_PATH_ITEM_TYPE_ID, {PRO_E_EXT_DEPTH_TO_TYPE} } };

It was pretty simple solution

Thanks,

Artem

1-Visitor
May 17, 2019

Hello Artem,

 

I'm working on a similar topic, but can't extract the XML tree with object toolkit. Since you said you've already done that, can you help me out with some hints? Which methods do you use to get the tree? Could you maybe upload an example for a complete tree (so far I have no idea how that looks like).

Thanks a lot in advance.

 

Tim