Author Topic: creating package structure on menu click  (Read 2691 times)

Zavael

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
creating package structure on menu click
« on: February 01, 2012, 01:24:33 am »
hi, i am working at addin that should create an package structure on the package, where the context menu was called...
so when i click with mouse right button on the package, i want to create new packages in it... i created the menu item and i am cathing a menu click but dont know hot to get the right package where to create my structure...
and how can i create new packages in model? thanks a lot :)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: creating package structure on menu click
« Reply #1 on: February 01, 2012, 01:34:23 am »
Try GetTreeSelectedObject

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13241
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: creating package structure on menu click
« Reply #2 on: February 01, 2012, 07:54:07 pm »
Quote
and how can i create new packages in model? thanks a lot :)
Use Package.Packages.AddNew()

Geert