When attempting to add new shared parameters to my users files, I go the route of swapping in a temp shared parameters file and create the definition group, definition, etc. and do all the checks for if a shared parameter already exists by GUID, etc.
I autoload parameters bound to ProjectInformation and to Levels, etc. and this all works on my testing machine. But when I deploy to users, there seems to be an issue with the Insert method... now... remember, everything works on my machine. I already control for when params need to be ReInsert-ed etc. This is the exception logging from my web logging setup. I can post code... but first want to see if anyone else has encountered this. I have had users detach from central and try... because I figure A360/worksharing might lock out the projectParameters.
From: Rollbar Notifier <notifier@mail.rollbar.com>
Date: Wed, Nov 1, 2017 at 5:50 PM
Subject: [continuum-production] production - New Error: #120 Autodesk.Revit.Proxy.Exceptions.InvalidObjectExceptionProxy: The referenced object is not valid, possibly because it has been deleted from the database, or its creation was undone.
Project: continuum-production
Environment: production
Code Version: unspecified
Host: unspecified
Timestamp: 2017-11-01 08:50 pm
A new item has occurred for the first time. View full details at:
Message
Autodesk.Revit.Proxy.Exceptions.InvalidObjectExceptionProxy: The referenced object is not valid, possibly because it has been deleted from the database, or its creation was undone.
Traceback
Traceback (most recent call last):
File "(unknown)", line 32, in validateNativeInstance(System.Void* ptr)
File "Autodesk.Revit.RevitDBAPIManagedWeakPointer<ExternalParam>", line 29, in Autodesk.Revit.RevitDBAPIManagedWeakPointer<ExternalParam>.getValidPtr()
File "Autodesk.Revit.DB.ExternalDefinition", line unknown, in Autodesk.Revit.DB.ExternalDefinition.get_Visible()
File "Autodesk.Revit.DB.ExternalDefinition", line 8, in Autodesk.Revit.DB.ExternalDefinition.get_InternalVisible()
File "Autodesk.Revit.DB.BindingMap", line 222, in Autodesk.Revit.DB.BindingMap.Insert(Autodesk.Revit.DB.Definition key, Autodesk.Revit.DB.Binding item, Autodesk.Revit.DB.BuiltInParameterGroup parameterGroup)
File "WeWork.Continuum.RevitAccess.SharedParameters.SharedParameterLoader", line 46, in WeWork.Continuum.RevitAccess.SharedParameters.SharedParameterLoader.CreateNewParameterAndInsertFirstCategoryBinding(Autodesk.Revit.DB.Category category, Autodesk.Revit.DB.Document document, Autodesk.Revit.DB.Definition definition, System.Collections.Generic.List`1[WeWork.Continuum.Logging.Logging.EventAttribute] eventAttributes)
Autodesk.Revit.Proxy.Exceptions.InvalidObjectExceptionProxy: The referenced object is not valid, possibly because it has been deleted from the database, or its creation was undone.
Params
custom.Category Project Information
custom.Environment production
custom.ExceptionDetail [(FunctionId: [(Function: validateNativeInstance), (Line: 22), (File: d:\r2\2017_px64\source\revit\revitdbapi\source\RevitDBAPIManagedWeakPointer.cpp), (Type: Autodesk.Revit.Proxy.Exceptions.FunctionI
custom.OsVersion Microsoft Windows NT 6.2.9200.0
custom.ParamGuid 2544017b-339c-4745-a08e-e3d89d5f0872
custom.ParamName Building_UUID
custom.ParamType Text
custom.RevitVersionBuild 20170816_0615(x64)
custom.RevitVersionName Autodesk Revit 2017
custom.RevitVersionNumber 2017
custom.Time Desktop 2017-11-02T00:50:40
custom.code_version 2.2.0.8
custom.user_ip 66.108.17.3
environment production
framework unknown
language c#
level error
notifier.name Rollbar.NET
notifier.version 0.3.2
person.email
person.id NYC-024704-W10
platform windows
timestamp 1509583841 - 2017-11-01 08:50:41 pm
uuid 31db7b4626624053b372e7bab13946fc