Revit 2014 IFC Guid Problem

Revit 2014 IFC Guid Problem

Anonymous
Not applicable
1,300 Views
3 Replies
Message 1 of 4

Revit 2014 IFC Guid Problem

Anonymous
Not applicable

Hi,

 

In Revit 2013 to get the element IFCGuid I had a cache that I saved the value returned by  Autodesk::Revit::DB::IFC::ExporterIFCUtils::CreateGUID(Element^), but it is now obsolete and suggested to use Revit::IFC::Export::Utility::GUIDUtil::CreateGUID(Element^) instead, the problem is the new GUIDUtil::CreateGUID method throws an "NullReferenceException" for all elements.

 

Any idea what I need to do ? cause this method is not documented so I have no idea what to change or what to do.

0 Likes
Accepted solutions (1)
1,301 Views
3 Replies
Replies (3)
Message 2 of 4

conoves
Autodesk
Autodesk
Accepted solution
Hello,

There is an expectation in GUIDUtil.CreateGUID(Element) that an options class is set before calling the function. If you are using the function outside of the exporter, it won't currently work, as that variable isn't initialized. We intend to fix the open source code to correct this issue, so I would suggest using the obsolete version for now, and then waiting until the end of August for the latest version of the open source exporter. Then you can upgrade to it and start using GUIDUtil.CreateGUID(Element). If you really need the new function to work, there is a workaround, but that workaround will stop working when you upgrade exporters, so I would recommend against it.

Thanks,
Angel


Scott Conover

Senior Engineering Manager, Revit

0 Likes
Message 3 of 4

Anonymous
Not applicable

Hi,

 

Thank you for your reply, will continue to use the obsolete version until the upgrade is released.

0 Likes
Message 4 of 4

Anonymous
Not applicable

Hello

Has this issue ever been solved?
I am preparing upgrading our products to support Revit 2015 (Meridian) and the ExporterIFCUtils.CreateGUID(Element) is removed. But still I can not make GUIDUtil.CreateGUID(Element) work. It throws a NullReferenceException.
If a workaround exists I would surely like to know about it!

I have been using the newest version of Revit.IFC.Export.dll 3.9.0.0 on Revit 2014 UR 2.

And - by the way: The Revit installation and the open source IFC Exporter both includes a Revit.IFC.Export.dll. How is this supposed to play along?

 

Henrik

0 Likes