Book a Demo

Author Topic: Create a diagram with a specific meta type  (Read 3417 times)

Lars J.

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Create a diagram with a specific meta type
« on: April 03, 2012, 09:08:35 pm »
Hi all,

how can I create an EA.Diagram object with a MetaType set to a Diagram type from one of my profiles using the automation interface

If I add an element to a package.Diagrams collection using AddNew I cannot specify it. And afterwards setting the MetaType property is not possible because it is read-only  :(

thanks in advance

Lars

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Create a diagram with a specific meta type
« Reply #1 on: April 04, 2012, 08:56:50 am »
I think you have to provide a qualified diagram type in the AddNew command, e.g.

package.Diagrams.AddNew("Name", "SysML1.2::BlockDefinition")
The Sparx Team
[email protected]

Lars J.

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Re: Create a diagram with a specific meta type
« Reply #2 on: April 04, 2012, 05:07:09 pm »
Quote
I think you have to provide a qualified diagram type in the AddNew command, e.g.

package.Diagrams.AddNew("Name", "SysML1.2::BlockDefinition")

Thanks, originally I specified the type "Logical" and thought I need to do something else. That helped....

Lars