cancel
Showing results for 
Search instead for 
Did you mean: 

Attribute driven shape selection

Solved
New Contributor

Attribute driven shape selection

Hi Community,

 

I would like to change the shape of an object dependent from a certain attribute value.

E.g.. if the attribute "state" of an object is "enabled" a green shape must be the representation of the object, if it the value is "disabled",

the shape must be red.

 

Has anyone already had this kind of requirement ?

How could this be implemented ?

 

Many thanks in advance

Oliver 

Tags (1)
4 Replies
Highlighted
Contributor

Re: Attribute driven shape selection

Hello Oliver,

 

yes, you can easily change the shape of a MetaClass depends on the value of one of his MetaAttribut.

Take a look on MetaClass "Actor" which changes when specified internal or external.

To find the specific shape, explore a MetaAttributValue. You'll find it under MetaPicture folder.

You can also specify a shape depends on more conditions, it's just a little bit longer to implement.

Best regards,
Jean-Yves
New Contributor

Re: Attribute driven shape selection

Hi Jean-Yves,

 

thanks a lot for your immediate feedback.

 

I´ve looked how it is implemented for the Org Unit, I thinks this is what you´ve meant instead of Actor.

For me it is more or less clear how to handle this für the Symbol/Icon, but what I would like to chane is he color of

the shape in a diagramm, can this be done in the same way ?

 

Thanks and regards

Oliver

Contributor

Re: Attribute driven shape selection

Sorry yes, you are right, I meant Org-Unit instead of Actor.

Unfortunatly, changing only color  "on the fly" of a shape is currently not possible as far I know.

For your purpose, you need to create a shape for each color you wish.

This can be done by using the shape editor, under tools.

 

You can find usefull informations on :

http://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=50120000000mqxEAAQ

 

and on Mega Help.chm, under Diagrams chapter

Best regards,
Jean-Yves
New Contributor

Re: Attribute driven shape selection

The general idea was to "prepare" shapes and store them in the "mega_usr" directory and assign them in dependency of a specific attribute of an object. The change on the fly is not required, but the currect shape shall be displayed, when opening a diagramm.

 

Thanks and regards

Oliver