Book a Demo

Author Topic: Locked property  (Read 3844 times)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Locked property
« on: March 09, 2012, 03:21:47 am »
Has anyone successfully used the Element.Locked property with Require Lock to Edit? A non-locked element returns 1 (true) while a locked returns 0 (false). I tried setting a non-locked element to 0 and update. But the lock did not change.

(I guess it's simply not working and I need to write a SQL by myself.)

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Locked property
« Reply #1 on: March 09, 2012, 04:26:16 am »
To make it a bit more confusing (I like EA!): Applied to diagrams the property is named "isLocked". Not only that. It returns 0 (false) for a non-locked diagram AND for a locked diagram. So its contents is simply wrong!

I have to write a SQL to check locking too! What for is this "API" if I have to code the database access all by myself?

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Locked property
« Reply #2 on: March 12, 2012, 07:33:58 pm »
Hmm, yeah, I gave up the API and wrote my own functions to lock and unlock elements.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Locked property
« Reply #3 on: March 12, 2012, 10:18:06 pm »
I remembered what you said lately and did that too. Probably the best way to cope with bugs in EA.

You don't know how fast they corrected bugs in the beginning. Sigh, lucky you...

q.