Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic System Architect (steve huntington)
Decrease font size
Increase font size
Topic Title: get related diagram of one definition via VBA?
Topic Summary:
Created On: 28-Jul-2008 09:11
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.
 28-Jul-2008 09:11
User is offline View Users Profile Print this message


chunjia wang

Posts: 39
Joined: 11-Oct-2007

Hi,all.
In one diagram , there is a symbol of definition named A , I want to know which diagrams contains the definition(A).
How should I do via VBA , thanks.
Report this to a Moderator Report this to a Moderator
 28-Jul-2008 09:42
User is offline View Users Profile Print this message


Peter Crabb-Wyke

Posts: 73
Joined: 3-May-2007

I am assuming a reasonable knowledge of VBA here.

'get realated symbols
Set collSymbols = defApplication.GetRelatedObjects(RELDEFINES)
collSymbols.ReadAll
' work through the list of symbols
For Each symApplication In collSymbols
'get all diagrams using that symbol - should be only one
Set collDiagrams = symApplication.GetRelatedObjects(RELCONDIAGRAM)
collDiagrams.ReadAll
'diagram is always first item in colleciton, collection always has count of 1
Set diagDiagram = collDiagrams(1)
'now do what ever you want with the diagram
...................................................................
Next symApplication
Report this to a Moderator Report this to a Moderator
 28-Jul-2008 10:20
User is offline View Users Profile Print this message


chunjia wang

Posts: 39
Joined: 11-Oct-2007

thanks,above.
'**************************************************************
'get all diagrams using that symbol - should be only one
Set collDiagrams = symApplication.GetRelatedObjects(RELCONDIAGRAM) '3
'**************************************************************
the result is itself,but I want to konw the definition(A) , which other diagrams contain it except itself.

how , thanks.
Report this to a Moderator Report this to a Moderator
 28-Jul-2008 12:15
User is offline View Users Profile Print this message


Arif Hussain

Posts: 53
Joined: 22-Dec-2005

Hi Chunjia,

Please read solution again and you will find that Peter has fully answered your query. You are getting the diagram names one by one in a loop.

Starting with your symbol, get its defintion (assumed)

RELEDEFINES --> get all symbols that use that defintion in all diagram
For each symbol
RELCONDIAGRAM - get the diagram (can only be one for this symbol)
next symbol
Report this to a Moderator Report this to a Moderator
 29-Jul-2008 04:34
User is offline View Users Profile Print this message


chunjia wang

Posts: 39
Joined: 11-Oct-2007

thanks, above.
the problem is solved.
I am a beginner of SA VBA, can anyone provide some information about the SA VBA or forum.
thanks.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic System Architect forum.
There are currently 1 users logged in.
The most users ever online was 16 on 30-Oct-2008 at 14:46.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

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