Hello,
I hope someone can hel because I searched ADN network and could not find any help. I am creating the code below so that it reads floor object sin the model and then extract these information: thickness, boundary points (xyz), area, but I could not get the geometry information.
Any help is really really appreciated.
## START CODE ##
Public Function Execute( _
ByVal commandData As Autodesk.Revit.ExternalCommandData, _
ByRef message As String, _
ByVal elements As Autodesk.Revit.ElementSet) _
As Autodesk.Revit.IExternalCommand.Result _
Implements Autodesk.Revit.IExternalCommand.Execute
Dim doc As Autodesk.Revit.Document = commandData.Application.ActiveDocument
Dim eleSet As ElementSet = doc.Selection.Elements
Dim ele As Autodesk.Revit.Element
Dim itr As Autodesk.Revit.ElementIterator = doc.Elements
sel = doc.Selection
sMsg += "There are " & sel.Elements.Size & " elements in the selection set:"
MsgBox("A4!")
Try
If eleSet.Size < 1 Then
MsgBox("Please select an element!")
Exit Function
End If
Do While itr.MoveNext
ele = itr.Current
If TypeOf ele Is Autodesk.Revit.Elements.Floor Then
MsgBox(" new floor loop")
Dim aFloor As Autodesk.Revit.Elements.Floor = ele
Dim layer As Autodesk.Revit.Structural.CompoundStructureLayer
MsgBox(ele.Category.Name.ToString & " 1")
MsgBox(aFloor.Id.Value.ToString & " 2")
MsgBox(aFloor.Parameter(BuiltInParameter.FLOOR_THICKNESS_PARAM).ToString & " 3")
End If
Loop
Catch ex As Exception
MsgBox(ex.Message & "exception")
End Try
Return IExternalCommand.Result.Succeeded
End Function
## END CODE ##