SlabShapeEditor from a Selected Revit element Floor

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!!! :slight_smile:

heres the Code & Excersice images





LosasRoad.gh (11.5 KB)

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.

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!

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.

1 Like

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

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 :pensive:
Is it okay to ask you to upload the code you wrote with the solution?
I’ll be more than thankful,
Or

Please see this.

1 Like

Thank you Kike! Good to see that things are progressing :slight_smile: