Hello everyone, i'm using the ProRule object to retrieve all components
from an assembly wich has a parameter set to a particular value wich i'm
loking. This is the code that i used:
ProRule rule;
ProAsmcomppath* p_comp_list;
int p_list_size;
ProLine line;
ProExpression proexpr;
err=ProArrayAlloc(0,sizeof(ProLine),1,(ProArray*)&proexpr);
err=ProMessageStringRead( PRO_LINE_SIZE, line );
err=ProArrayObjectAdd( (ProArray*)&proexpr,0, 1,line);
err=ProRuleInitExpr(proexpr,&rule);
err=ProRuleEval ((ProSolid)this
->aMdl,&rule,&p_comp_list,&p_list_size);
When i execute the code ProE shows an input window for write the
expresion that i want, thats right, i write the following expresion: TEST
== "MyTest" where TEST it's a parameter that it's in all models wich are
hanging from my top level assembly (this->aMdl variable in code shown
before) some models have the TEST parameter empty and others are filled
with "MyTest" value (10 models exactly).
Well the expected result of ProRuleEval execution would be a
component list with exactly 10 items, one for each model that has TEST
parameter equal to "MyTest". But the real result it's zero!!! it looks
like ProRuleEval doesn't find models that can satisfy the expresion
despite off i knowns that there are 10 models that have exactly the value
wich i'm looking for. I have tried to do it manually using ProE interface
and simplified representations. I write the same expresion as used in code
sample inside my simplified representation rule and when i execute it give
to me exactly 10 components, as expected, so im sure that the expresion
it's not the problem. So the problem must be in the code, but where? What
i am doing wrong? I hope someone can help me, im really confused.
Thanks in advance.
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.