There is a new comment on your post!
If this comment helps you, consider marking it as best reply.
AC

Hello all,

I am developing a report for changing the position of object occurrences in a model. At the report's core all I have is a loop that calls SetPosition for each occurrence.

for each occ in model:
  ...
  calculate x and y
  ...
  occ.SetPosition(x, y)
  ...

 

I run the report with model closed, to assure occurrence positions can be changed successfully.

However, when I open the model inside Designer after running the report,  occurrence positions have not changed. What I find odd is that internally, occurrence positions are being set! I have spent many hours debugging and experimenting with simple cases and still can't find why the model graphics aren't being updated.

Is there is some kind of model layout cache that is not being updated after the new positions are set using occurrence.SetPosition()?

I am using ARIS 7.0.2., is this a known bug..?

Thanks

by Torsten Haase
Posted on Thu, 02/03/2011 - 10:44

Hi Kyle,

there is no such bug known.

- Do you do anything else in your report? Do you maybe set the flag "LAYOUT_ON_OPEN"?

- What is the return value (boolean) of SetPosition? If true is returned, the position should be stored correctly

BR,

Torsten

0
by Deleted User Author
Posted on Thu, 02/03/2011 - 17:00

Hello and thanks for your quick reply.



Regarding interactions with the model, my report only queries occs and connections (OccList/CxnList) and sets occurrence positions.



The SetPosition() returns true and the position is in fact changed, that's the odd part...! However, when I open the model in designer... the layout stays the same.



I'm not setting any flags. More, I have never messed up with model flags. However I'm going to investigate that further.



Maybe it's relevant to say all the models I'm trying to modify with the report are being created also using reports. Everything from model creation to occurrence and connection creation is automated. When I open one of the models it's already using the default layout.



Here is my workaround to the problem:

1. create a macro that opens, saves and closes a model, in this order

2. for each model I want to re-layout:

 2.1. run macro created in 1.

 2.2. run report to set new desired layout (where SetPosition is called for occs)



And it works.



This idea came to me when I noticed that saving manually the model *before* running the report actually allowed the positions to be "visually" changed.



What it seems is that Designer keeps some kind of visual layout cache until some user interactions occur...Or it's just some flag that is set and I'm not aware of it.



Thanks for helping!

0
by Torsten Haase
Posted on Thu, 02/03/2011 - 17:44

Hi!

In this case, it's surely the LAYOUTONOPEN - flag, which is set when the models are created by a report.

Please try removing this flag from the model flags in the report which sets the positions using Model.SetFlags():

if( (model.Flags() & Constants.MODEL_LAYOUTONOPEN)==Constants.MODEL_LAYOUTONOPEN )
    model.SetFlags( model.Flags() - Constants.MODEL_LAYOUTONOPEN )

 

0
by Deleted User Author
Posted on Fri, 02/04/2011 - 10:36

Hi, that solved the problem, no need for macros!

Many Thanks!

0
by Vasiliy Chernov
Posted on Mon, 06/07/2021 - 08:51

Hi, can I see your solution with a macro? How do you run a macro from a report?

Thank you in advance.

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock