Link IFC Files stored in BIM360 using RevitLinkType.CreateFromIFC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good day everyone!
As the title says, I'm using Revit 2022, and some other different software.
I have access to APS information, and hence I can access ModelGUIDs published using the Get_Items method from APS. When it's a Revit Cloud model I can access to the ModelGUID and then pass it into Revit API, something that looks like this:
link_model_id=Guid.Parse(model_guid)
link_path=ModelPathUtils.ConvertCloudGUIDsToCloudPath(ModelPathUtils.CloudRegionUS,project_id,link_model_id)
link_load_result = RevitLinkType.Create(doc,link_path, RevitLinkOptions(False))
doc.GetElement(link_load_result.ElementId).AttachmentType=AttachmentType.Attachment
RevitLinkInstance.Create(doc,link_load_result.ElementId)
We want to link those files now, as just plain IFC files that are already being stored on BIM360, It can be done manually, but since we have hundreds of those models I want to run a program that checks all the links, their status, if there's a new IFC file that's not linked, to add it, if one was delete it, to delete it so there are no errors when opening those Revit Cloudshared Models.
So, for this method:
public static LinkLoadResult CreateFromIFC( Document document, string ifcFilePath, string revitLinkedFilePath, bool recreateLink, RevitLinkOptions options )
Or this one:
public static LinkLoadResult CreateFromIFC( Document document, ExternalResourceReference resourceReference, string revitLinkedFilePath, bool recreateLink, RevitLinkOptions options )
I'm really not sure how to use the ExternalResourceReference.
I tried inspecting the element on BIM360 using APS API, but there's no GUID for IFCs. How can I link and manage those files from BIM360?
Thanks for your help and hope you have a nice day!