Unable to relinquish in BIM360 file

Unable to relinquish in BIM360 file

kite15
Advocate Advocate
388 Views
2 Replies
Message 1 of 3

Unable to relinquish in BIM360 file

kite15
Advocate
Advocate

Hi,

I have one tool to update some parameter values. However, while its going to update the same parameter into BIM360 shared model its throwing an error ..

 

Applied this not works. Please, help how to manage this:

    class SurveyElevationCommitPreprocessor : IFailuresPreprocessor
    {
        public FailureProcessingResult PreprocessFailures(FailuresAccessor failuresAccessor)
        {
            IList<FailureMessageAccessor> failList = new List<FailureMessageAccessor>();
            failList = failuresAccessor.GetFailureMessages();
            foreach (FailureMessageAccessor failure in failList)
            {
                FailureDefinitionId failID = failure.GetFailureDefinitionId();
                if (failID == BuiltInFailures.RoomFailures.RoomTagNotInRoom ||
                    failID == BuiltInFailures.RoomFailures.RoomTagNotInRoomToArea ||
                    failID == BuiltInFailures.RoomFailures.RoomTagNotInRoomToRoom ||
                    failID == BuiltInFailures.RoomFailures.RoomTagNotInRoomToSpace)
                {
                    failuresAccessor.DeleteWarning(failure);
                }
            }

            return FailureProcessingResult.ProceedWithCommit;
        }
    }

 

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

moturi.magati.george
Autodesk
Autodesk

Hi @kite15,

There are multiple causes of the said error.

The error has been documented on the link below with possible solutions.
https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/When-opening-Revit...

  Moturi George,     Developer Advocacy and Support,  ADN Open
0 Likes
Message 3 of 3

GaryOrrMBI
Collaborator
Collaborator

Trying to catch the error is one thing, but it may be better if you avoid the error...

 

Before selecting the objects that you want to modify check to see if the document is workshared:

thisDoc.IsWorkshared

 

If it is workshared then checkout the entities that you want to work on:

WorksharingUtils.CheckoutElements(thisDoc, elemIDs)

 

then loop through the returned collection to check each item's model update status for deleted in Central or Modified in Central:

WorksharingUtils.GetModelUpdatesStatus(thisDoc, elemId)

ModelUpdatesStatus.UpdatedInCentral

ModelUpdatesStatus.DeletedInCentral

 

Log anything that can't be checked out and/or has been deleted or modified in central and feed that back to the user if desired (or inform the user that everything can't be checked out at this time and they should run the function again after everyone else has synced and the user has reloaded latest).

 

-G

 

Gary J. Orr
GaryOrrMBI (MBI Companies 2014-Current)
aka (past user names):
Gary_J_Orr (GOMO Stuff 2008-2014);
OrrG (Forum Studio 2005-2008);
Gary J. Orr (LHB Inc 2002-2005);
Orr, Gary J. (Gossen Livingston 1997-2002)
0 Likes