Possible Error/Bug in Document.Delete() - (Revit 2017)

Possible Error/Bug in Document.Delete() - (Revit 2017)

Sherbs
Contributor Contributor
463 Views
2 Replies
Message 1 of 3

Possible Error/Bug in Document.Delete() - (Revit 2017)

Sherbs
Contributor
Contributor

Hi Folks,

 

I think I just stumbled upon an error in Document.Delete().

 

According to this: http://www.revitapidocs.com/2017/a0461dd1-71d9-4581-1604-2ef8c211dd60.htm Document.Delete() should return the set of deleted elements.

 

In the following scenario, it seems to return incorrect information.

 

If a user calls Document.Delete() with a list containing a single element (or more perhaps, I haven't tested) that is owned by another work-sharing user,  we get the familiar popup explaining that the element cannot be modified.  That much is good.  The problem arises when the user then cancels out of that dialog.  Document.Delete() returns a list with the Element Id of the element that could not be deleted.

 

I'd expect in this specific case that the returned list of Element Ids would be empty, no?

 

Thanks for any input!

-Greg-

 

 

 

0 Likes
464 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk

Dear Greg,

Thank you for your report.

Yup, that sounds like an error to me.

 

I would like to pass it on to the development team to take a look.

Is it possible for you to set up a minimal reproducible case for them to analyse?

http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b

Remember, they do not have access to an add-in development environment, so it is easier for them if you can provide a macro that demonstrates the
problem.

 

Alternatively, the exact detailed steps to reproduce the problem from scratch at their end might do.

Thank you!

Best regards,

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 3

Sherbs
Contributor
Contributor

Hi Jeremy,

 

I'll see what I can put together in terms of a test case - I'm not very adept with macros but I can probably sort it out...

 

Either way, detailed steps are probably necessary to reproduce the error as I see it.  The specific error in this case comes from the attempt to delete work-shared content owned by another revit user.

 

Thanks much!

-G

 

 

0 Likes