To load a control unit from the REI, there is a method called <controllableunit>.load(). ControllableUnit is a super class of category (UC Packages, Logical Packages), subsystems (component Packages), and DefaultModelProperties so everything a user can control through the gui should be accessible from the REI.
As to the original question, how to copy a class from one model to another via the REI, an earlier response suggesting control units is probably the best way outside of the REI. If one really wanted to create a program that copied over one or more classes from one model to another, that program would have to: 1. Open up 2 models (i.e. source and destination). 2. All "important" aspects of the source class would have to be extracted and reinstantiated in the target. An alternative is to use the programmatic interfaces to the control unit by: 1. Creating a temporary package in the source model 2. Relocating classes into temp package 3. Control temp package 4. Save the temp package only 5. Open target model without saving current model 6. Import temp control unit 7. Uncontrol temp package -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 31, 2001 11:38 PM To: [EMAIL PROTECTED] Subject: RE: (ROSE) Extensibilty: importing classes Hi, That's not it Roger, Assuming Brian wants to do it through the Rose Extensibility Interface, this is not an option. Rose extensibility interface doesn;t let you load controlled units through the REI. If i am wrong, i would very much like to know how to do that. The proposed solution of Brian won't work either because: theNewClass = theCategory.AddClass( theName ) Just creates an empty class. Iassume that that's not what you want Brian. Again, i am very interested in howto load a controlled unit from the extensibility interface. Regards Rob Roger St-Amand <[EMAIL PROTECTED]>@rational.com on 10-30-2001 10:34:16 PM Please respond to Roger St-Amand <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: (bcc: Rob Westgeest/EHV/CE/PHILIPS) Subject: RE: (ROSE) Extensibilty: importing classes Classification: A simple way. Control a unit with your rose items from the source Rose model and import that unit in the destination Rose model and uncontrol the imported unit. That's it. Roger -----Original Message----- From: Annamalai Viswanathan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 30, 2001 9:41 AM To: Brian Mclean Cc: [EMAIL PROTECTED] Subject: Re: (ROSE) Extensibilty: importing classes Brian, How are you trying to accomplish this, i.e. are you trying to do a copy to clipboard and then pasting from the clipboard or are you trying to create a petal of .cat file?? Vishu Brian Mclean wrote: > I'd very much appreciate input on how to use the REI to copy a class to from > one model to another. > > I'm using VB and referencing the Rose Objects. So far I am able to get the > class object from the model in which it exists, but can't work out how to > insert it into the other model > > Many Thanks > > Brian McLean > > Rubico (Pty) Ltd - The Business Component Company > Tel: +27 (11) 808 1000 > Direct: +27 (11) 808 1298 > Cell Phone: +27 82 669 5548 > http://www.Rubico.com > > ************************************************************************ > * 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/support/usergroups/rose/rose_forum.jsp > * 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/support/usergroups/rose/rose_forum.jsp * Other Requests: [EMAIL PROTECTED] * * To unsubscribe from the list, please send email * * To: [EMAIL PROTECTED] * Subject:<BLANK> * Body: unsubscribe rose_forum * ************************************************************************* ************************************************************************ * 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/support/usergroups/rose/rose_forum.jsp * Other Requests: [EMAIL PROTECTED] * * To unsubscribe from the list, please send email * * To: [EMAIL PROTECTED] * Subject:<BLANK> * Body: unsubscribe rose_forum * ************************************************************************* ************************************************************************ * 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/support/usergroups/rose/rose_forum.jsp * Other Requests: [EMAIL PROTECTED] * * To unsubscribe from the list, please send email * * To: [EMAIL PROTECTED] * Subject:<BLANK> * Body: unsubscribe rose_forum * *************************************************************************
