# Enquiry about IfcSlab creation‏‏ with Xbim library

**URL:** <https://forums.buildingsmart.org/t/enquiry-about-ifcslab-creation-with-xbim-library/3685>\
**Category:** Developers\
**Tags:** ifc4\
**Created:** [May 29, 2021, 10:24am UTC](https://forums.buildingsmart.org/t/enquiry-about-ifcslab-creation-with-xbim-library/3685 "2021-05-29T10:24:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![IbrahimMassoud](https://avatars.discourse-cdn.com/v4/letter/i/bcef8e/32.png) [@IbrahimMassoud](https://forums.buildingsmart.org/u/IbrahimMassoud)\
**Post date:** [May 29, 2021, 10:24am UTC](https://forums.buildingsmart.org/t/enquiry-about-ifcslab-creation-with-xbim-library/3685/1 "2021-05-29T10:24:17Z")

</div>

I have a problem with creating ifcSlab particularly with this attribute coordList,  
I did not know how to pass the slab vertices “slab profile” to this attribute.

model.Instances.New (def =\>  
def.OuterCurve = model.Instances.New (pc =\>  
pc.Points = model.Instances.New (cp2d =\>  
cp2d.CoordList.Add (

```
                                                                // What to add here?

                                                                                          ) )));

```

this image is a screenshot from an IFC file exported from Revit as IFC 4 includes a simple floor.

---

<div class="post-metadata">

**Author:** ![Moult](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/moult/32/196_2.png) [@Moult](https://forums.buildingsmart.org/u/Moult)\
**Post date:** [May 30, 2021, 12:40am UTC](https://forums.buildingsmart.org/t/enquiry-about-ifcslab-creation-with-xbim-library/3685/2 "2021-05-30T00:40:12Z")

</div>

I haven’t used XBim before, but I assume the CoordList requires a list of lists of IfcLengthMeasure, depending on the dimensionality of the curve, e.g:

```auto
[[0,0], [1,1], [1,0], ...]

```

---

<div class="post-metadata">

**Author:** ![IbrahimMassoud](https://avatars.discourse-cdn.com/v4/letter/i/bcef8e/32.png) [@IbrahimMassoud](https://forums.buildingsmart.org/u/IbrahimMassoud)\
**Post date:** [June 3, 2021, 3:21pm UTC](https://forums.buildingsmart.org/t/enquiry-about-ifcslab-creation-with-xbim-library/3685/3 "2021-06-03T15:21:10Z")

</div>

I tried this piece of code and it goes well, Thanks Dion Moult.   
var outerCurvepoints = model.Instances.New();  
outerCurvepoints.CoordList.GetAt(0).AddRange(new IfcLengthMeasure { -14500.0, 13250.0 });  
outerCurvepoints.CoordList.GetAt(1).AddRange(new IfcLengthMeasure { -14500.0, -14750.0 });  
outerCurvepoints.CoordList.GetAt(2).AddRange(new IfcLengthMeasure { -1500.0, -14750.0 });  
outerCurvepoints.CoordList.GetAt(3).AddRange(new IfcLengthMeasure { -1500.0, -18750.0 });  
outerCurvepoints.CoordList.GetAt(4).AddRange(new IfcLengthMeasure { 19500.0, -18750.0 });  
outerCurvepoints.CoordList.GetAt(5).AddRange(new IfcLengthMeasure { 19500.0, 20250.0 });  
outerCurvepoints.CoordList.GetAt(6).AddRange(new IfcLengthMeasure { -3500.0, 20250.0 });  
outerCurvepoints.CoordList.GetAt(7).AddRange(new IfcLengthMeasure { -3500.0, 13250.0 });  
outerCurvepoints.CoordList.GetAt(8).AddRange(new IfcLengthMeasure { -14500.0, 13250.0 });  
var outerCurve = model.Instances.New();  
outerCurve.SelfIntersect = false;  
outerCurve.Points = outerCurvepoints;  
var representationMap = model.Instances.New();  
var mappedRepresentation = representationMap.MappedRepresentation = model.Instances.New();  
mappedRepresentation.Items.Add(model.Instances.New(eas =\>  
{  
eas.Depth = Thickness;  
eas.SweptArea = model.Instances.New(apdwv =\>  
{  
apdwv.ProfileType = IfcProfileTypeEnum.AREA;  
apdwv.ProfileName = ProfileName;  
apdwv.OuterCurve = outerCurve; \<\<===========  
});  
});
