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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Getting the container name in OIR

jselvaraj
5-Regular Member

Getting the container name in OIR

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>

9 REPLIES 9

Could you try containerName instead of containerReference?

jselvaraj
5-Regular Member
(To:BineshKumar1)

Dear Binesh,

Thanks for your reply..

I tried the same.. however it is not seems to be working...
BhushanNehe
14-Alexandrite
(To:jselvaraj)

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...

jselvaraj
5-Regular Member
(To:BjoernRueegg)

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. 

jselvaraj
5-Regular Member
(To:BjoernRueegg)

Hi, 

 

It could be. But it is possible by calling an external function from OIR(using java code).

satre-3
5-Regular Member
(To:jselvaraj)

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 Smiley Wink

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.

Top Tags