Author Topic: AddNew method does not work anymore in EA 6.5.800  (Read 2509 times)

rainstar79

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: AddNew method does not work anymore in EA 6.5.
« Reply #15 on: April 03, 2007, 05:42:18 am »
Hey Folks,
I've got the same problem under Build 804:

EA.Element requPartition = (EA.Element) el.Elements.AddNew("Requestor", "ActivityPartition");

throws an exception!!!!.....BUT my Add-In worked fine under Build 79x!!!

The exception is: Invalid Parent for ActivityPartition (Class)

Why shouldn't it be allowed to add a new ActivityPartition under a Class?!?!?!

Has anyone a solution????

Thanks

bittercoder

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
  • .Net developer
    • View Profile
Re: AddNew method does not work anymore in EA 6.5.
« Reply #16 on: April 03, 2007, 11:03:17 am »
I also noticed that disabling UI updates (Repository.EnableUIUpdates = false) appears to cause problems when adding child elements... thanks for confirming this ablaz.

Which leads me to wonder what use that property is at all... disabling UI updates while adding 30 child elements seems like  best practice to me.

PY

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
  • I love Python
    • View Profile
Elements.AddNew doesn't work  within Artifact
« Reply #17 on: July 18, 2007, 08:07:25 am »
Hi all,

I am using the automation interface with Python and so far I can recreate all the structure I need, but I have problems adding child elements (specificically: a 'Class') into Artifacts. I always get the error:

...add_Class Failed: (-2147352567, 'Exception occurred.', (10, 'EA', 'Invalid parent for Class (Artifact)', None, 0, 0), None)

however, adding a 'Class' child element into a 'Class' element works fine.

adding an 'Artifact' into an 'Artifact' works also fine.

what can I do? I work in EA 6.5.806 but I tested it also in EA 7.0.810 (Beta) with same results.

thanks for any useful help in advance,

Best Regards,

Pablo

PS: maybe this is somehow related to the topic: "AddNew method does not work anymore in EA 6.5.800" but the solution there didnt help me at all.
« Last Edit: July 18, 2007, 08:16:17 am by PY »

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6453
  • Karma: +55/-6
    • View Profile
Re: AddNew method does not work anymore in EA 6.5.
« Reply #18 on: July 18, 2007, 01:04:48 pm »
There was a fix in build 814 that corrected this behaviour.  The automation interface should now allow all the same nesting rules as the project browser.
Simon

support@sparxsystems.com