# SlabShapeEditor from a Selected Revit element Floor

**URL:** <https://discourse.mcneel.com/t/slabshapeeditor-from-a-selected-revit-element-floor/130506>\
**Category:** Revit\
**Tags:** windows\
**Created:** [September 21, 2021, 6:08pm UTC](https://discourse.mcneel.com/t/slabshapeeditor-from-a-selected-revit-element-floor/130506 "2021-09-21T18:08:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![fbanarq](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/fbanarq/32/180322_2.png) [@fbanarq](https://discourse.mcneel.com/u/fbanarq)\
**Post date:** [September 21, 2021, 6:08pm UTC](https://discourse.mcneel.com/t/slabshapeeditor-from-a-selected-revit-element-floor/130506/1 "2021-09-21T18:08:31Z")

</div>

Hello!  
Im trying to edit one selected element within rhino.inside.revit in grasshopper that is a RevitFloor, and im trying to write a simple script with C# Grasshopper Node, that change the subelements(Points) of this floor given a list of points of a sloping curved surface within the same perimeter curves (similar to the Adapt floor points from Topography.Points Algorithm), but in this case im using a simple surface to extract the points, so i build the main algorithm to extract the SlabShapeEditor Object from my selected Revit Floor in Grasshopper(RIR), but when i run mi C# Script the algorithm does not work, it does not perform any action, I’ve been reading on the topic of handling transactions in Rhino.Inside.Revit resources and it doesn’t seem to work.

¿Have you guys have some knowledge on why does my script doesnt change the Slab shape?,I incorporate images from my script and the grasshopper file.

If you could guide or advise me, I would appreciate it very much!!! 🙂

heres the Code & Excersice images

 ![code](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/e/8/d/e8dfd87f557d2994846de7eb47601037e9a17e36.png)  
 ![Context](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/b/6/ab67689a85d3310b091621c63ff5f3cdcf787f1c.png)  
 ![REVITfLOORsELECTED](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/e/a/6eaa3a1851515336dc3f640e73585395235d8f14.png)  
 ![Rhino Selected Geometry Surface](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/f/1/d/f1d30d84c74d4ceaad43a4037c8fbf5f6e514cd3.png)  
[LosasRoad.gh](https://discourse.mcneel.com/uploads/short-url/vjbe7sNaoSVSXeCtF9LADabGORh.gh) (11.5 KB)

---

<div class="post-metadata">

**Author:** ![kike](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/kike/32/608657_2.png) [@kike](https://discourse.mcneel.com/u/kike)\
**Post date:** [September 21, 2021, 6:17pm UTC](https://discourse.mcneel.com/t/slabshapeeditor-from-a-selected-revit-element-floor/130506/2 "2021-09-21T18:17:57Z")

</div>

Hi @fbanarq,

I never used this API before but looks like the DrawPoint returns you a `SlabShapeVertex` object that you should move latter to correct Z position.

---

<div class="post-metadata">

**Author:** ![fbanarq](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/fbanarq/32/180322_2.png) [@fbanarq](https://discourse.mcneel.com/u/fbanarq)\
**Post date:** [September 21, 2021, 6:29pm UTC](https://discourse.mcneel.com/t/slabshapeeditor-from-a-selected-revit-element-floor/130506/3 "2021-09-21T18:29:41Z")

</div>

Hi! thank you very much for taking the time to read and answer my question :P, look when i run this algorithm (Only the Code Inside of my transaction) within the SlabShapeEditor Object in Revit’s Macro Manager environment or within Dynamo Python script it works withour moving the SlabShapeVertex, the DrawPoint() Method does the job i wiil try to edit the Position property of the SlabShapeVertex in orther to see if theres something wrojg with my code, specially within RIR. Thanks!

---

<div class="post-metadata">

**Author:** ![kike](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/kike/32/608657_2.png) [@kike](https://discourse.mcneel.com/u/kike)\
**Post date:** [September 21, 2021, 6:33pm UTC](https://discourse.mcneel.com/t/slabshapeeditor-from-a-selected-revit-element-floor/130506/4 "2021-09-21T18:33:40Z")

</div>

I also see that you are not using the Conversion methods to convert from `Point3d` to `XYZ`.

I would call `ToXYZ` on each input point, this should take care of unit conversion from Grasshopper points to Revit points.

---

<div class="post-metadata">

**Author:** ![fbanarq](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/fbanarq/32/180322_2.png) [@fbanarq](https://discourse.mcneel.com/u/fbanarq)\
**Post date:** [September 23, 2021, 5:57pm UTC](https://discourse.mcneel.com/t/slabshapeeditor-from-a-selected-revit-element-floor/130506/5 "2021-09-23T17:57:57Z")

</div>

Nice!!! it works! the issue was the conversion method! thank you very much !!!

---

<div class="post-metadata">

**Author:** ![Or\_Tsafir](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/or_tsafir/32/507995_2.png) [@Or\_Tsafir](https://discourse.mcneel.com/u/Or_Tsafir)\
**Post date:** [July 14, 2022, 6:33am UTC](https://discourse.mcneel.com/t/slabshapeeditor-from-a-selected-revit-element-floor/130506/6 "2022-07-14T06:33:09Z")

</div>

Hello, I am trying as same as you to project a rhino surface to a certain level and to make slabs from the points. Tried to correct your code with the ToXYZ method but with no success 😔  
Is it okay to ask you to upload the code you wrote with the solution?  
I’ll be more than thankful,  
Or

---

<div class="post-metadata">

**Author:** ![kike](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/kike/32/608657_2.png) [@kike](https://discourse.mcneel.com/u/kike)\
**Post date:** [July 14, 2022, 9:28am UTC](https://discourse.mcneel.com/t/slabshapeeditor-from-a-selected-revit-element-floor/130506/7 "2022-07-14T09:28:55Z")

</div>

Please see this.

> [@How to Create Revit Floor from Rhino Topography Surface or Mesh](https://discourse.mcneel.com/t/how-to-create-revit-floor-from-rhino-topography-surface-or-mesh/118832/62):
>
> Hi @chris3, We have added a component for this task in v1.9. [RiR-SlabShape.gh](https://discourse.mcneel.com/uploads/short-url/asLc0chdXV1PNH6b9sOFTTZJPEc.gh) (20.9 KB)

---

<div class="post-metadata">

**Author:** ![Or\_Tsafir](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/or_tsafir/32/507995_2.png) [@Or\_Tsafir](https://discourse.mcneel.com/u/Or_Tsafir)\
**Post date:** [July 14, 2022, 12:00pm UTC](https://discourse.mcneel.com/t/slabshapeeditor-from-a-selected-revit-element-floor/130506/8 "2022-07-14T12:00:12Z")

</div>

Thank you Kike! Good to see that things are progressing 🙂
