The problem is I cannot get the association to recognize and set "Element
A" as it appears when viewing the specification of the link.

When created interactively I get (under the General Tab)

  Role A : blank    Element A: Gauge_Diameter
  Role B:  blank    Element B : Parent_Directory

When created from my application I get :

  Role A : blank    Element A:  blank
  Role B:  blank    Element B : Parent_Directory

This is a snippit of my code

  '  Get the class for "Element A" of the link
        rcID = cc.FindFirst (pname)
        Set rc = cc.GetAt(rcID)
 ' Set the qualified name
        qname = qname & "::" & pname

        msgbox (cnest.Name & " " & rc.Name & vbCrLf & qname)
 ' Add the association
        set pref = cnest.AddAssociation ("",qname)
        pref.Stereotype = "Pointer"


The result of the messagebox is :
 Parent_Directory   Gauge_Diameter
Logical View::DS
Data::Engine_Data::TopEnd_Data::Valvetrain_Data::Valve_Data::Intake::Package::Gauge_Diameter

This breaks down to
View  ::  Category ::  RootClass :: Nested Class1 :: Nested Class2  ::
Nested Class3  :: Nested Class4  :: Nested Class5 :: Target Class

I am using this as the name Gauge_Diameter occurs multiple times in the
model depending on the names of the nested classes, in this case Nested
Class 4 can be Intake or Exhaust and the documentation says if the name
appears twice you must use the fully defined name. I have tried it with
just rc.Name and it still does not work.

I would be grateful if anyone could point out what I'm doing wrong in my
AddAssociation.

Mark Hampshire
                                            
 Knowledge             Location   263 E3000 
 Engineering, TCC                     S2E11 
                                            
 800 Chrysler Drive    Tie Line    754-0818 
                                            
                                            
 Auburn Hills, MI      Phone          (248) 
 48326                             944-0818 
                                            
 CIMS 483-01-13        Fax            (248) 
                                   576-2185 
                                            






****************************************************************************

The information contained in this transmission, which may be
confidential and proprietary, is only for the intended recipients.
Unauthorized use is strictly prohibited. If you receive this
transmission in error, please notify me immediately by telephone
or electronic mail and confirm that you deleted this transmission
and the reply from your electronic mail system.
****************************************************************************



************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Post or Reply to: [EMAIL PROTECTED]
* 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
*************************************************************************

Reply via email to