![]() |
Telelogic System Architect (steve huntington) | ![]() |
Topic Title: Symbols without Handle and ddId Topic Summary: Symbols created by a macro using Application.Interface("ISAImf") don´t have Handle or ddId values Created On: 9-Jul-2008 17:19 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi,
I am using the ISAImf interface do create diagrams (of the type Explorer) based on the repository's information. The code to create the symbols is the following: Set ISA = Application.Interface("ISAImf") Set symbDom = diag.CreateSymbol(dom.name, ETUSER22) ISA.SASetSymbolField diagram.Handle, symbol.Handle, SYMFLD_SIZE, size_X & " " & size_Y ISA.SASetSymbolField diagram.Handle, symbol.Handle, SYMFLD_LOC, position_X & " " & position_Y ISA.SASetSymbolField diagram.Handle, symbol.Handle, SYMFLD_FONTHEIGHT, fontSize symbol.FillColor = RGB(R_COLOR, G_COLOR, B_COLOR) Everything runs ok and looks fine. But when we click on the symbol to open the definition, System Architect says that definition is a Model Object instead of a Dictionary Object. No problem with that, I thought... Later, after some debug, I have discovered that the symbols created and designed by the macro don´t have no Handle value and no ddId value. The consequence is that, I can´t use a Explorer Relationship Report that should work fine, because it works fine on diagrams designed by hand (not with the macro in VBA). The report doesn't recognize the symbols/definitions and shows the correspondent error message... How can I solve this? Edited: 9-Jul-2008 at 17:22 by Eugénio Marques |
|
![]() |
|
![]() |
|
I have never worked out how to define the definition type that a definition symbol is supposed to point to. I can see that you are not doing this in your code which I would guess is at least part of the problem.
If you find an answer please post it. |
|
![]() |
|
![]() |
|
This isn't an answer, but some insight into what worked elsewhere.
In the UML world the following works for creating usecase symbols. In VBA - Create the definition and a symbol of the same name. At the GUI - The symbol 'magically' opened the correct defintion. I assured the usecase definition and symbol were the same type paring as GUI generated definitions i.e. DFXOOUSECASE and ETOOUSECASE respectively. I havent researched which definition a symbol pairs with when two definitions of the same name exist. i.e. packageA.usecaseX and packageB.usecaseX Things on hindsight that may have helped: The diagram was in the same package as the usecase. NB One vaguely related constraint I've noted is that given 'a usecase definition is uniquely identified only in the context of the package that contains it', I've noticed that if you change the parent package of a usecase (via VBA) the symbol disappears from diagrams. I am hoping a bit of careful symbol manipulation might get around this. |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.