Autodesk.Revit.DB.Architecture.PostPattern是Revit中用于创建和管理海报和标志的对象。这个类定义了每个海报的位置、朝向、尺寸和材质等属性。
Autodesk.Revit.DB.Architecture.PostPattern poster = new Autodesk.Revit.DB.Architecture.PostPattern();
poster.Name = "My Poster";
poster.Width = 3;
poster.Height = 5;
poster.Position = new Autodesk.Revit.DB.XYZ(10, 10, 0);
poster.Orientation = 30;
FilteredElementCollector collector = new FilteredElementCollector(doc);
ICollection<Element> elements = collector.OfClass(typeof(Autodesk.Revit.DB.Architecture.PostPattern)).ToElements();
foreach(Element e in elements)
{
Autodesk.Revit.DB.Architecture.PostPattern poster = e as Autodesk.Revit.DB.Architecture.PostPattern;
// do something with the poster object
}
ModifyOrientation(Autodesk.Revit.DB.Architecture.PostPattern poster, double degrees)
{
poster.Orientation = degrees;
}