The Diagram class in the Rose Extensibility Interface (REI) contains a method called
Invalidate that will cause the diagram to be redrawn. The syntax is as follows:
theDiagram.Invalidate
Try this out and see if it works for you.
Vishu
Lance Delo wrote:
> I believe the issue is that when you change the Model via scripting, you are
> essentially changing the Explorer (under the logical view, the tree on the
> right of Rose.)
>
> Basically, and although this might not be strictly true in a logical sense,
> the Logical view maintains a one-to-one correspondence with the model.
>
> The diagrams, however, do not.
>
> Every Rose element has associated with it zero or more RoseItemViews (or is
> it RoseElementViews, or...)
>
> Point is, it is the RoseBlahBlahViews that are displayed on a-particular/the
> diagram, not the elements themselves.
>
> So, creating model elements and wiring them up, etc, will accomplish just
> that.
>
> But only as far as the internal representation of the model goes, which in
> turn gets automagically reflected (updated) in the Logical View.
>
> If you want to change a diagram, then you have to (possibly create and then)
> manipulate the RoseBlahBlahViews associated with the elements that you are
> changing.
>
> The reason the diagram updates when you delete the class and then DnD from
> the Logical View is because that user gesture forces a redraw of the
> involved elements.
>
> I believe some of the sample scripts have code that creates and manipulates
> RoseBlahBlahViews, and that is what you want to do.
>
> - Lance
>
> -----Original Message-----
> From: Knight, David (MED) [mailto:]
> Sent: Friday, August 03, 2001 10:06 AM
> To: 'Rose Forum'
> Subject: (ROSE) update diagrams from script
>
> I have written a script which changes alters some associations in a
> model. However it would be helpful if when the script completed I could
> update the diagrams to show the new relationships. Currently, these
> association changes are made but it is necessary to delete one of the
> involved classes from the diagram and drag it back into the diagram.
> Only then is the new association shown in the diagram. Ideally I could
> update the diagram from the script, however if this can be done from
> within Rose that would also be helpful.
>
> David Knight
> ------------------
> GE Medical Systems
> Software Engineering Intern
> (262) 521-6586
> [EMAIL PROTECTED]
>
> ************************************************************************
> * Rose Forum is a public venue for ideas and discussions.
> * For technical support, visit http://www.rational.com/support
> *
> * Admin.Subscription Requests: [EMAIL PROTECTED]
> * Archive of messages:
> http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
> * Other Requests: [EMAIL PROTECTED]
> *
> * To unsubscribe from the list, please send email
> *
> * To: [EMAIL PROTECTED]
> * Subject:<BLANK>
> * Body: unsubscribe rose_forum
> *
> *************************************************************************
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
> ************************************************************************
> * Rose Forum is a public venue for ideas and discussions.
> * For technical support, visit http://www.rational.com/support
> *
> * Admin.Subscription Requests: [EMAIL PROTECTED]
> * Archive of messages:
>http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
> * Other Requests: [EMAIL PROTECTED]
> *
> * To unsubscribe from the list, please send email
> *
> * To: [EMAIL PROTECTED]
> * Subject:<BLANK>
> * Body: unsubscribe rose_forum
> *
> *************************************************************************
--
---
Annamalai "Vishu" Viswanathan -- [EMAIL PROTECTED]
Rose Technical Support Engineer
Rational WW Customer Service
Check out http://www.therationaledge.com/ for tips and news for Rose users
---
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************