<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SlabShapVertexArray don't work for me in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/slabshapvertexarray-don-t-work-for-me/m-p/9941823#M29586</link>
    <description>&lt;P&gt;Yeah I see why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to call Document.Regenerate if you are Enabling a slab not already enabled and manipulating the SubElements in the same transaction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Private Function TObj137(ByVal commandData As Autodesk.Revit.UI.ExternalCommandData,
ByRef message As String, ByVal elements As Autodesk.Revit.DB.ElementSet) As Result
        If commandData.Application.ActiveUIDocument Is Nothing Then Return Result.Cancelled Else
        Dim UIDoc As UIDocument = commandData.Application.ActiveUIDocument
        Dim IntDoc As Document = commandData.Application.ActiveUIDocument.Document
        Dim AcView As View = UIDoc.ActiveGraphicalView
        Dim R1 As Reference = Nothing
        Try
            R1 = UIDoc.Selection.PickObject(Selection.ObjectType.Element)
        Catch ex As Exception
        End Try
        If R1 Is Nothing Then Return Result.Cancelled Else

        Dim El As Floor = TryCast(IntDoc.GetElement(R1), Floor)
        If El Is Nothing Then Return Result.Cancelled Else

        Using tx As New Transaction(IntDoc, "Edit slab")
            If tx.Start = TransactionStatus.Started Then

                If El.SlabShapeEditor Is Nothing Then
                    tx.RollBack()
                End If
                If El.SlabShapeEditor.IsEnabled = False Then
                    El.SlabShapeEditor.Enable()
                End If

                If El.SlabShapeEditor.SlabShapeVertices.Size = 0 Then
                    IntDoc.Regenerate()
                End If
                For I = 0 To El.SlabShapeEditor.SlabShapeVertices.Size - 1
                    Dim Vx As SlabShapeVertex = El.SlabShapeEditor.SlabShapeVertices(I)
                    If I = 1 Then
                        El.SlabShapeEditor.ModifySubElement(Vx, 0.5)
                    End If
                Next
                tx.Commit()
            End If
        End Using
        Return Result.Succeeded
    End Function&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Dec 2020 16:56:49 GMT</pubDate>
    <dc:creator>RPTHOMAS108</dc:creator>
    <dc:date>2020-12-15T16:56:49Z</dc:date>
    <item>
      <title>SlabShapVertexArray don't work for me</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/slabshapvertexarray-don-t-work-for-me/m-p/9940687#M29583</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In one of my plugin i would like to move floor vertex height, so I used this line :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;SlabShapeVertexArray slabShapeVertexArray = floor.SlabShapeEditor.SlabShapeVertices;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;in order to get the vertex array and I used a "for" loop to get each vertex : &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; for (int i = 0; i &amp;lt; slabShapeVertexArray.Size; ++i)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SlabShapVertex vertex = slabShapeVertexArray.get_Item(i);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;but i never goes in the loop, so I i check the value of&amp;nbsp;&lt;FONT&gt;slabShapeVertexArray.Size&lt;/FONT&gt; and it's equal to 0;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Can someone help me Because i Don't know why i can't get the vertices&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 09:14:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/slabshapvertexarray-don-t-work-for-me/m-p/9940687#M29583</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-15T09:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: SlabShapVertexArray don't work for me</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/slabshapvertexarray-don-t-work-for-me/m-p/9940808#M29584</link>
      <description>&lt;P&gt;Did you call SlabShapeEditor.Enable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that you can't use this on a slab with a slope set by sketch.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 10:24:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/slabshapvertexarray-don-t-work-for-me/m-p/9940808#M29584</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2020-12-15T10:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: SlabShapVertexArray don't work for me</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/slabshapvertexarray-don-t-work-for-me/m-p/9941230#M29585</link>
      <description>&lt;P&gt;No, i didn't call this method, but i've tried and it Don't change anything, the size field is still equal to 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already use the slabShapEditor.drawPoint and it works, but the SlabShapVertexArray does not contain any Vertex&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 13:22:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/slabshapvertexarray-don-t-work-for-me/m-p/9941230#M29585</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-15T13:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: SlabShapVertexArray don't work for me</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/slabshapvertexarray-don-t-work-for-me/m-p/9941823#M29586</link>
      <description>&lt;P&gt;Yeah I see why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to call Document.Regenerate if you are Enabling a slab not already enabled and manipulating the SubElements in the same transaction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Private Function TObj137(ByVal commandData As Autodesk.Revit.UI.ExternalCommandData,
ByRef message As String, ByVal elements As Autodesk.Revit.DB.ElementSet) As Result
        If commandData.Application.ActiveUIDocument Is Nothing Then Return Result.Cancelled Else
        Dim UIDoc As UIDocument = commandData.Application.ActiveUIDocument
        Dim IntDoc As Document = commandData.Application.ActiveUIDocument.Document
        Dim AcView As View = UIDoc.ActiveGraphicalView
        Dim R1 As Reference = Nothing
        Try
            R1 = UIDoc.Selection.PickObject(Selection.ObjectType.Element)
        Catch ex As Exception
        End Try
        If R1 Is Nothing Then Return Result.Cancelled Else

        Dim El As Floor = TryCast(IntDoc.GetElement(R1), Floor)
        If El Is Nothing Then Return Result.Cancelled Else

        Using tx As New Transaction(IntDoc, "Edit slab")
            If tx.Start = TransactionStatus.Started Then

                If El.SlabShapeEditor Is Nothing Then
                    tx.RollBack()
                End If
                If El.SlabShapeEditor.IsEnabled = False Then
                    El.SlabShapeEditor.Enable()
                End If

                If El.SlabShapeEditor.SlabShapeVertices.Size = 0 Then
                    IntDoc.Regenerate()
                End If
                For I = 0 To El.SlabShapeEditor.SlabShapeVertices.Size - 1
                    Dim Vx As SlabShapeVertex = El.SlabShapeEditor.SlabShapeVertices(I)
                    If I = 1 Then
                        El.SlabShapeEditor.ModifySubElement(Vx, 0.5)
                    End If
                Next
                tx.Commit()
            End If
        End Using
        Return Result.Succeeded
    End Function&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 16:56:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/slabshapvertexarray-don-t-work-for-me/m-p/9941823#M29586</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2020-12-15T16:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: SlabShapVertexArray don't work for me</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/slabshapvertexarray-don-t-work-for-me/m-p/13614899#M29587</link>
      <description>&lt;P&gt;You have to do a couple things...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SlabShapeEditor editor = floor.GetSlabShapeEditor();&lt;/P&gt;&lt;P&gt;editor.Enable();&lt;/P&gt;&lt;P&gt;doc.Regenerate();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After regenerate editor.SlabShapeVertices will return Vertex. A little bit crazy in my opinion...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 May 2025 21:12:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/slabshapvertexarray-don-t-work-for-me/m-p/13614899#M29587</guid>
      <dc:creator>josborneW959Y</dc:creator>
      <dc:date>2025-05-05T21:12:06Z</dc:date>
    </item>
  </channel>
</rss>

