cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

How to traverse feature element tree in protoolkit

abursuk
12-Amethyst

How to traverse feature element tree in protoolkit

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

ACCEPTED SOLUTION

Accepted Solutions
abursuk
12-Amethyst
(To: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

View solution in original post

2 REPLIES 2
abursuk
12-Amethyst
(To: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

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

Announcements


Top Tags