Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: No documentation for addLink() in COM API
Topic Summary:
Created On: 16-Mar-2006 12:24
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 16-Mar-2006 12:24
User is offline View Users Profile Print this message


Jim Brentnell

Posts: 3
Joined: 20-Jan-2006

I'm trying to get some models into Rhapsody using the COM API. I can't seem to find any documentation on the addLink() interface. The best I have is it has 5 parameters:

addLink(
IRPInstance fromInstance,
IRPInstance toInstance,
IRPRelation assoc,
IRPPort fromPort,
IRPPort toPort)

I really need to create a link between 2 ports. Any help would be appreciated.

Thanks,
Jim
Report this to a Moderator Report this to a Moderator
 17-Mar-2006 19:22
User is offline View Users Profile Print this message


Jim Bella

Posts: 21
Joined: 30-Jun-2004

Here is a small example that will hopefully get you going.

...
Sub test()
Dim pkg As RPPackage
Set pkg = getProject.addPackage("MyPkg")

Dim clsA As RPClass
Set clsA = pkg.addClass("clsA")
clsA.addNewAggr "Port", "A_Port"

Dim clsB As RPClass
Set clsB = pkg.addClass("clsB")
clsB.addNewAggr "Port", "B_Port"

Dim aInst As RPInstance
Set aInst = pkg.addGlobalObject("A_inst", clsA.name, pkg.name)

Dim bInst As RPInstance
Set bInst = pkg.addGlobalObject("B_inst", clsB.name, pkg.name)

Dim tempRel As RPRelation

pkg.addLink aInst, bInst, tempRel, clsA.ports(1), clsB.ports(1)

End Sub
...
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 1 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.