Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Have an icon based on a property

Hello,

 

I try to have a different icon for the same type of ItemRev but according to a property of this ItemRev.

Example ItemRev with "custo_property" value = make or buy

If "custo_property"= make I would like green icon

If "custo_property"= buy I would like blue icon

 

I am looking to have this result for the rich client and for AWC Smiley Happy

 

Best regards and happy new year.

18 REPLIES

Re: Have an icon based on a property

These are called "decorations". You can see some of the decorations in action like when an object is checked out (although that is disabled by default in later versions in the name of performance) or when using multisite and the object is a replica (two green squares on the bottom). The capability to add decorations has not been exposed to the community as far as I know. It has been something we have wanted for a while. Feel free to call GTAC and add your name to the ER (I don't know the number).


Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11.0.1.mp01 | SW 2016 | TcUA 11.2.3
Evaluating:AW 3.2

Re: Have an icon based on a property

Thank you for your response Smiley Happy

 

The GTAC does not answer to this kind of question "how to do", it always tells me that they answer to problems of software bug.

 

Maybe you know what document I could find info about this?

 

Best regards,

Re: Have an icon based on a property

Decorations are not supported and are therefore not documented.

 

You just need to rephrase your question into a problem statement Smiley Wink

"I can't add a decoration to the Revision icon based on the value of a property. I can't find the BMIDE setting." Wait for them to tell you it isn't possible then state that you want to be added to any ER and notified when the functionality has been added.


Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11.0.1.mp01 | SW 2016 | TcUA 11.2.3
Evaluating:AW 3.2

Re: Have an icon based on a property

Hi,

Please have a look at "overlay icon" in TC online help. From my understanding this is what you are looking for.

xtof

Re: Have an icon based on a property

It looks like "overlay icons" a.k.a. decorations, were added in Tc9.1 and I'm behind the times. Good catch @xtof!


Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11.0.1.mp01 | SW 2016 | TcUA 11.2.3
Evaluating:AW 3.2

Re: Have an icon based on a property

The best solution for this is the overlay icon. You can find more detailed information in the BMIDE guide

Re: Have an icon based on a property

Thank you guys for the help, 

I'm currently doing the configuration on the BMIDE, fighting with the XML...

Using the documentation from the BMIDE guide, I did this but it's not working :

 

My property in the bmide is TSS4_cate with the value 1 or 2

<?xml version="1.0" encoding="UTF-8"?>

<icons Version="1.0">

    <propertyMap name="cateMap">

<item key="1" value="TSS4TS_info_icon.png"/>

<item key="2" value="TSS4vert.png"/>

</propertyMap>

<primaryIcon source="TSS4rouge.png"/>

<overlayIcon source="TSS4_cate" mapName="cateMap" >

<visibleWhen>

<with variable="TSS4_cate">

<equals value="overlay" />

</with>

</visibleWhen>

</overlayIcon>

</icons>

 

Is there any error in there ?

Thank you in advance for any help.

 

Also is there an equivalent of the overlay icons in active workspace ?

 

Re: Have an icon based on a property

Read the restrictions (actually a Note). Can only be applied to the toString() property (object_string for WSO). You should have a key=" " value when 1 or 2 are not set? AWS may honor the overlay once you get it working but I don't know for sure.


Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11.0.1.mp01 | SW 2016 | TcUA 11.2.3
Evaluating:AW 3.2

Re: Have an icon based on a property

Hello,

 

My property is a string.

I have add :

<item key="" value="TSS4rouge.png"/>

 

But it is not working well, other than that does the code look correct ?

In the <propertyMap name="cateMap">, I wrote cateMap like the model but I'm not sure of what it is

 

 

<?xml version="1.0" encoding="UTF-8"?>

<icons Version="1.0">

<propertyMap name="cateMap">

<item key="1" value="TSS4TS_info_icon.png"/>

<item key="2" value="TSS4vert.png"/>

<item key="" value="TSS4rouge.png"/>

</propertyMap>

<primaryIcon source="TSS4rouge.png"/>

<overlayIcon source="TSS4_cate" mapName="cateMap" >

<visibleWhen>

<with variable="TSS4_cate">

<equals value="overlay" />

</with>

</visibleWhen>

</overlayIcon>

</icons>