Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hi Everyone,
I need to get the container name in th format of string in my OIR to set some custom attribute. The attribute "containerReference" does not exactly equal to the container name as we use wtContainerRef.getName(); to get this.
Can any one tell how to get this?
<AttrValue id="view.id">
<Value algorithm="wt.rule.algorithm.BooleanBranch">
<Value algorithm="wt.rule.algorithm.StringEqualsTest">
<Attr id="containerReference"/>
<Arg>Test Product</Arg>
</Value>
<Arg>YES</Arg>
<Arg>NO</Arg>
</Value>
</AttrValue>
Could you try containerName instead of containerReference?
Can you set loggers on wt.rule.algorithm.StringEqualsTest class , if it is 10.2 M020 or earlier version enable verbose wt.rule.algorithm.StringEqualsTest.verbose in wt.properties . This will let you know what are the arguments passed to this rule algorithm.
Regards,
Bhushan
What are you trying to do with the view.id? I just opened up a case to get me some examples to set a default view for different part subtypes. This doesn't work anymore with setting it thru the OIR.
This also could be a problem...
Hi, My original requirement is to set different view for different containers. The View should be read only and should not be editable.
Thanks.
That's almost also my requirement. Unfortunately to set the view.id within the OIR is not supported anymore.
Hi,
It could be. But it is possible by calling an external function from OIR(using java code).
I am not sure about your exact requirement. But it seems like Part view can’t be set from OIR see below article https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS30181
Thanks
Shreyas
That is what I'm trying to say
The OIR trys to set the following attribute
<AttrValue id="view.id">
Since this doesn't work, I guess the container name is being filled out correcty, just the view.id will not being set.