![]() ICollection wallList = new FilteredElementCollector(doc).OfClass( typeof(Wall)).ToElements() Revit turn ioff warning visibility how to#Here is a summary of how to convert this macro into an add-in command. Unlike room tags, which have a dedicated NewRoomTag method, the generic NewFamilyInstance is used to tag doors and other elements.įamilyInstance doorTag = (levelPoint, doorTagType, doc.ActiveView) Using (Transaction t = new Transaction(doc, "Create door"))įamilyInstance door = (levelPoint, familySymbol, e, .) XYZ levelPoint = new XYZ(globalPoint.X, globalPoint.Y, level.Elevation) ViewPlan viewPlan = doc.ActiveView as ViewPlan Instead, create a new XYZ using the X and Y from the GlobalPoint and the Z of the plan view's level But we don't want to place the door at this "global point", because the Z of that point is at the // cut plane height of the plan view. Get the point on the wall where the selection was made Get the wall element from the selected reference Reference r = (ObjectType.Element, "Select the wall that will host the door") Cast() where tag.Name = "Door Tag" select tag).First() OfClass( typeof(FamilySymbol)).OfCategory(BuiltInCategory.OST_DoorTags) Where (fs.Family.Name = "Single-Flush"
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |