cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Picture condition

farhad
MEGA Partner
MEGA Partner

Hi, I like to display hosted object list depends on shape. As example there is "MBS Appserver" application connected to Artifact SLSUABACK001.SL.SE. So if they use "WithHostedObject.mgs" shape then connected Applications (here MBS Appserver) will be visible as screenshot and if use "WithoutHostedObjects.mgs" shape then connected Applications wont be visible like standard. I can show hosted object list in WithHostedObject shape (as attached file WithHosted...) but when using WithoutHostedObject shape, there should show only current object name, NO Hosted objects(as attached file Without...). Any idea how to do so, in case of WithoutHostedObject shape?

2 Replies

Hi Philippe, Thanks I will try that...

 

pvandeginste
Honored Contributor

Hi Farhad,

 

1) you can set a condition on a MetaPicture, in the properties of the MetaPicture. The condition can be based on a MetaAttribute value, a specific MetaAssociation, etc. and will automatically apply the MetaPicture if the condition is met. If you have multiple MetaPictures for a MetaClass, and some have conditions, and the default MetaPicture doesn't, make sure to reorder your MetaPictures so the default one (the one without any conditions) appears at the bottom of the list.

 

2) In your case, if hosted apps are showing on the MetaPicture where they're not supposed to (and you don't want to apply a condition on the MetaPicture), open the properties of the MetaPicture and in the "_StdFile" tab find the name of the "MGS Format" file - that's the actual shape file used in the diagram. Open the Shape Editor, then open that shape file. Save it with the same name in the MEGA_Usr folder so you don't overwrite the out-of-the-box shape. Then all you need to do is find the calculated field in the shape that displays the list of hosted applications: the field will look like a text field "&name of the field&". Remove that field, and save the shape file. When HOPEX opens the diagram it will now use that shape file you saved in the MEGA_Usr (if you saved it without changing the name).

 

Hope this helps.

 

Philippe