PPT_LOGO_4b
Revit Programming Introduction <#>
Copyright © 2009 Autodesk Inc.
柱挿入と壁の移動
»' Insert Columns as FamilyInstances
»Dim pt As XYZ
»For Each pt In locations
»  Try
»    Dim column As FamilyInstance = doc.Create.NewFamilyInstance(pt, symbol, botLev, Structural.Enums.StructuralType.NonStuctural)
»    Dim paramTopLevel As Parameter =
»     column.Parameter(BuiltInParameter.FAMILY_TOP_LEVEL_PARAM)
»    paramTopLevel.Set(topLev.Id)
»  Catch e As Exception
»    MsgBox("Failed to create or adjust this column!?")
»  End Try
»Next
»
»' Finally, move the wall so the columns are surely visible. For simplicity,
»'   move the wall "perpendicularly" to the Location curve by its length
»Dim wallPerpAxis As New XYZ(-(ptEnd.Y - ptStart.Y), ptEnd.X - ptStart.X, 0)
»If Not CType(wall.Location.Move(wallPerpAxis), Boolean) Then
»  MsgBox("Failed to Move the wall!?")
»End If
要素コレクション
lab2-4-2
パラメータ値やジオメトリーのポジション値を変更する事で柱の挿入と壁の移動を行います。
これはRevitの拘束(こうそく)機能により実現されています。