Class IfcStoreCopyItemsExtensions
Inheritance
Inherited Members
Namespace: Xbim.Ifc
Assembly: Xbim.Ifc.dll
Syntax
public static class IfcStoreCopyItemsExtensions
Methods
| Improve this Doc View SourceInsertCopy(IModel, IEnumerable<IIfcProduct>, Boolean, Boolean, XbimInstanceHandleMap)
This is a higher level function which uses InsertCopy function alongside with the knowledge of IFC schema to copy over products with their types and other related information (classification, aggregation, documents, properties) and optionally geometry. It will also bring in spatial hierarchy relevant to selected products. However, resulting model is not guaranteed to be compliant with any Model View Definition unless you explicitly check the compliance. Context of a single product tend to consist from hundreds of objects which need to be identified and copied over so this operation might be potentially expensive. You should never call this function more than once between two models. It not only selects objects to be copied over but also excludes other objects from being copied over so that it doesn't bring the entire model in a chain dependencies. This means that some objects are modified (like spatial relations) and won't get updated which would lead to an inconsistent copy.
Declaration
public static void InsertCopy(this IModel model, IEnumerable<IIfcProduct> products, bool includeGeometry, bool keepLabels, XbimInstanceHandleMap mappings)
Parameters
Type | Name | Description |
---|---|---|
IModel | model | The target model |
System.Collections.Generic.IEnumerable<IIfcProduct> | products | Products from other model to be inserted into this model |
System.Boolean | includeGeometry | If TRUE, geometry of the products will be copied over. |
System.Boolean | keepLabels | If TRUE, entity labels from original model will be used. Always set this to FALSE if you are going to insert products from multiple source models or if you are going to insert products to a non-empty model |
XbimInstanceHandleMap | mappings | Mappings to avoid multiple insertion of objects. Keep a single instance for insertion between two models. If you also use InsertCopy() function for some other insertions, use the same instance of mappings. |