Rev2016 GetBuildingConstruction() throws InternalExceptionProxy - cannot find...

Rev2016 GetBuildingConstruction() throws InternalExceptionProxy - cannot find...

eN27
Contributor Contributor
635 Views
6 Replies
Message 1 of 7

Rev2016 GetBuildingConstruction() throws InternalExceptionProxy - cannot find...

eN27
Contributor
Contributor

 

Why this code under Revit 2016 throws exception? On Revit 2015 everything was fine ...

 

 

Document document = cmdData.Application.ActiveUIDocument.Document;
ElementId eid = EnergyDataSettings.GetBuildingConstructionSetElementId(document);
MEPBuildingConstruction mEPBuildingConstruction = document.GetElement(eid) as MEPBuildingConstruction;
Construction c = mEPBuildingConstruction.GetBuildingConstruction(Autodesk.Revit.DB.Analysis.ConstructionType.Door);

 

 

Autodesk.Revit.Proxy.Exceptions.InternalExceptionProxy: cannot find creator to create the public API instance.
   in PublicAPIRuntimeMap.getPublicAPICreator(Object proxyObject)
   in PublicAPICommonTypeConverter.ProxyToPublic<class System::Collections::Generic::Dictionary<enum Autodesk::Revit::Proxy::DB::Analysis::ConstructionTypeProxy,class System::Collections::Generic::Dictionary<class System::String ^,class Autodesk::Revit::Proxy::DB::ConstructionProxy ^> ^>,class System::Collections::Generic::Dictionary<enum Autodesk::Revit::DB::Analysis::ConstructionType,class System::Collections::Generic::Dictionary<class System::String ^,class Autodesk::Revit::DB::Construction ^> ^> >(Dictionary`2 pProxyObj, Dictionary`2& pPublicObj)
   in Autodesk.Revit.DB.Mechanical.MEPBuildingConstruction.getConstructions()
   in Autodesk.Revit.DB.Mechanical.MEPBuildingConstruction.GetBuildingConstruction(ConstructionType constructionType)
0 Likes
636 Views
6 Replies
Replies (6)
Message 2 of 7

jeremytammik
Autodesk
Autodesk

Dear eN27,

 

Thank you for your query.

 

Which exact line throws that exception?

 

Have you looked at the various elements involved in RevitLookup?

 

What happens there?

 

In order for us to say anything more at all, we will need a reproducible case to explore including an absolutely minimal external command implementation and an absolutely minimal sample model to execute it it:

 

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

 

I hope this helps.

 

Best regards,

 

Jeremy



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

0 Likes
Message 3 of 7

eN27
Contributor
Contributor

Which exact line throws that exception?

Last one, method GetBuildingConstruction() from MEPBuildingConstruction class.

 


  

In order for us to say anything more at all, we will need a reproducible case to explore including an absolutely minimal external command implementation and an absolutely minimal sample model to execute it it

 


Please see attachment RevitSample.zip, as a minimal model you can use any empty model, based on any default Revit template (Construction Template for example), it should work always.

 

I'am trying get these informations:

 

WhatIWantToGet.png

Under Revit 2015, it works perfect.

 

Under Revit 2016, 16.0.428.0 20150220_1215(x64) I get:

 

Exception.png

 

For me, it looks like internal Revit exception ....

0 Likes
Message 4 of 7

jeremytammik
Autodesk
Autodesk

Dear eN27,

 

Thank you for your reproducible case.

 

I logged the issue REVIT-67814 [GetBuildingConstruction throws InternalExceptionProxy] with our development team for this on your behalf as it requires further exploration and possibly a modification to our software. Please make a note of this number for future reference.

 

I hope this helps.

 

Best regards,

 

Jeremy



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

Message 5 of 7

jeremytammik
Autodesk
Autodesk

Dear eN27,

 

Thank you for your patience.

 

The initial issue REVIT-67814 [GetBuildingConstruction throws InternalExceptionProxy] was closed, because a more complicated code fix in was required in the development stream.

 

The new code fix issue was submitted as REVIT-68476 [GetBuildingConstruction throws InternalExceptionProxy] and has now also been resolved and closed.

 

The fix will become available in the next major release.

 

I hope this helps.

 

Best regards,

 

Jeremy



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

Message 6 of 7

eN27
Contributor
Contributor

Thank you so much for your help with this issue 🙂

0 Likes
Message 7 of 7

jeremytammik
Autodesk
Autodesk

Dear eN27,

 

More good news:

 

The initial issue REVIT-67814 [GetBuildingConstruction throws InternalExceptionProxy] and the code fix issue REVIT-68476 [GetBuildingConstruction throws InternalExceptionProxy] have now both been resolved and closed.

 

The fix will become available both in the next major release and in an upcoming service pack for the current release.

 

Best regards,

 

Jeremy



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