How can i get IFC_GUID from IFC(f.e. made by Tricad)?

Hello,

How can i get IFC Guid? I want to make dictionary with “IfcGUID : Revit ID” and later search via IfcGUID…

doc = DocumentManager.Instance.CurrentDBDocument

elems = IN[0]
myGuids = []
for elem in elems:
    myGuids.append(elem.UniqueId)

OUT = myGuids

this script search for an other ID! is there also for IFCGuid?
2021-02-09_17h49_16

KR

AndreasGetIfcGUID.dyn (16.1 KB)
2021-02-09_20h53_09

@Draxl_Andreas Can you share a sample Revit file with IFC data?

Not sure if this will work. But see if this yields anything.

import clr
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

out = []

for e in UnwrapElement(IN[0]):
	BIP = BuiltInParameter.IFC_GUID
	ifcguid = (e.get_Parameter(BIP)).AsString()
	out.append(ifcguid)
    
OUT = out
2 Likes

Sorry, file is too big! but thank you

1 Like