![]() |
Telelogic System Architect (steve huntington) | ![]() |
Topic Title: Using VBA to extract leveled process diagrams Gane & Sarson Topic Summary: Extensibility VBA Created On: 30-Aug-2006 05:48 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
We have a need to extract every process (in order based in Number, for example 1, 2,3) of a level 0 diagram and open the child diagram attached to every process and extract the all process in it (in order and leveled, for example 1.1, 1.2,1.3). |
|
![]() |
|
![]() |
|
Ramon, ------------------------- Thanks, MattS |
|
![]() |
|
![]() |
|
Matt
It work but Symbols that came from the parent diagram appears in the child diagram at the same level, including the parent symbol container which is diferentiate because its type is "PARENT".
I need diferentiate which symbol are really belonging to the diagram level and ignore the other that came from parent level.
Thank you very much
Ramón
|
|
![]() |
|
![]() |
|
Ramon,
I guess you only care about the "Process" symbols on a diagram. It appears that there is only one "Parent" symbol on each child diagram. You can get its type and choose to use it or ignore it. See attached code. If colSymbols.Item(i).GetField(SYMFLD_TYPE) = 15 then ' I am a process symbol, read my meta data End If If colSymbols.Item(i).GetField(SYMFLD_TYPE) = 242 then ' I am a Parent symbol and you can ignore me! End If I got the integer values of the symbol types from the file "SYMBOLS.BAS" ------------------------- Thanks, MattS |
|
![]() |
|
![]() |
|
Matt
The parent is not the problem because the parent is the explode symbol and in any case it is a diferent type which I could ignore.
The problem are the process symbols that came from the parent diagram and are in the child diagram to reference the relationship between parent and explode child process by means of data/material flows.
|
|
![]() |
|
![]() |
|
Ramon, ------------------------- Thanks, MattS |
|
![]() |
|
![]() |
|
Matt
I have all the recursive code to find child diagram but my problem is with the symbols that appears in it. Let my show and example:
1. Diagram leve 0 Study have two process named Analyze (P1) and Diagnostic (P2) and data flow between P1 and P2 named Result.
2. When created a child diagram of Analyze (P1) SA create a Parent Symble named Analyze (P1), a process symbol named Diagnostic (P2) and the data flow named Result
3. I create two process named "Search Component" (P1.1) and "Identify Component" (P1.2). SA assign the level number automatically
Here when the problem appears and it is that I can not find a way to diferentiate the process P1.1 and P1.2, which really belong to level 1 from process P2 which really belong to level 0
We are expornint this diagram structure to feed other system and it is a requirement to send only the symbols that really belong to the diagram level
Thanks
Ramón
PS: yor last recomendation is good but we already tried it and we try also using
SaveHandle = SAOpenRelatedObject(SymHandle, RELISEMBEDDEDBY)
SaveHandle = SAOpenRelatedObject(SymHandle, RELEMBEDS)
|
|
![]() |
|
![]() |
|
Ramón, ------------------------- Thanks, MattS |
|
![]() |
|
![]() |
|
Matt I have resolved this problem calculating the position of every symbol respect the parent symbol. If the symbol is inside the parent position then it belong to the current diagram level, if no, it is only a reference from a parent diagram. |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.