• Revit 2015 API 的全部变化和新功能



    这里从SDK的文章中摘录出全部的API变化。主要是希望用户用搜索引擎时能找到相关信息:


    Major changes and renovations to the Revit API


    APIchanges

    .NET 4.5

    Revit's API is now built with and requires .NET 4.5 forcompilation. 

    VisualC++ runtime 11 update 4 (Visual Studio 2012)

    Revit is now built with and installs runtime libraries fromVC11 update 4 (Visual Studio 2012).  Third party applications whichinclude native components may want to upgrade to the same VC runtime as thereis no guarantee that Revit will install any other runtime on client machines.

    UnitsAPI

    A small set of units API functions introduced in Revit 2014have been obsoleted.  Their replacements already existed in Revit 2014,and are listed here:

    Obsoleted member

    Replacement

    Units.GetDisplayUnitType()

    Units.GetFormatOptions(UnitType.UT_Length).DisplayUnits

    Units.SetDigitalSymbolAndGrouping()

    Units.DecimalSymbol, Units.DigitGroupingSymbol, Units.DigitGroupingAmount (setters)

    Units.IsValidDigitalSymbolAndGrouping()

    All combinations are now valid

    DigitGroupingSymbol.Tick (enum value)

    DigitGroupingSymbol.Apostrophe

    FormatOptions(UnitSymbolType, DisplayUnitType) (constructor)

    FormatOptions (DisplayUnitType, UnitSymbolType)

    FormatOptions.GetRounding()

    FormatOptions.Accuracy

    FormatOptions.HasRounding()

    All display units have accuracy values

    FormatOptions.UseGrouping

    FormatOptions.UseDigitGrouping

    FormatOptions.GetName()

    UnitUtils.GetTypeCatalogString()

    FormatValueOptions.IsFormatOptionsValidForUnitType()

    FormatOptions.IsValidForUnitType()

    UnitFormatUtils.FormatValueToString()

    UnitFormatUtils.Format()

    ValueParsingOptions.FormatOptions

    ValueParsingOptions.GetFormatOptions()

    FormatUtils.Format()

    UnitFormatUtils.Format()

    ParameterAPI changes

    Element.Parameter[String]

    The indexed property Element.Parameter[String] isobsolete.  The recommended replacement is:

    • Element.GetParameters(String)- looks up all of the parameters matching the input name on the given element (it is possible that multiple parameters coming from different sources can have the same name).
    • Element.LookupParameter(String) -attempts to find a parameter on this Element whose name matches the input.

    Element.Parameters

    The collection returned from this property now includesmore parameters.   Previously, it returned only parameters that Revitshowed in the Properties Palette, but now it also includes parametersavailable in schedules and tags but not shown in the Properties Palette. This can cause behavioral changes for existing applications because some of thenewly visible parameters will have duplicate names, but different ids, withother parameters.   To get a list of just the parameters availablefrom the Properties Palette, use Element.GetOrderedParameters().

    Shared parameter creation -description and user modifiability

    Revit now allows the assignment of two new properties toshared parameters:

    • Description - this value will be saved with the shared parameter definition, and for all instances of this parameter the text is used as the parameter tooltip.
    • UserModifiable - this value will be saved with the shared parameter definition.  If set to false the user will see the parameter and its value as grayed out, but any API application may modify the value as needed.

    The new method:

    • Definitions.Create(Autodesk.Revit.DB.ExternalDefinitonCreationOptions options);

    create a new shared parameter definition using an optionsclass where any or all of the available options may be set (name and type arerequired, but GUID, user visible, user modifiable, and description areoptional).  This method replaces all other specific versions of Definitions.Create()which are now obsolete.

    Note that for shared parameters IsReadOnly can return falsefor shared parameters whose UserModifiable property is also false, because thevalue of those parameters can be modified by the API. If a parameter isgoverned by a formula,  IsReadOnly would return true, even if the flag forUserModifiable was set to true when the shared parameter was created.

    The new properties:

    • Parameter.UserModifiable
    • FamilyParameter.UserModifiable

    provide information about whether the flag is set to theAPI.

    WorksharingAPI changes

    WorksetConfigurationmethods

    The methods

    • WorksetConfiguration.CloseAll()
    • WorksetConfiguration.OpenLastViewed()

    have been obsoleted.  Instead of using these methodsafter constructing the WorksetConfiguration, use the constructor forWorksetConfiguration accepting one of the following options:

    • WorksetConfigurationOption.OpenAllWorksets
    • WorksetConfigurationOption.CloseAllWorksets
    • WorksetConfigurationOption.OpenLastViewed

    SynchronizeWithCentralOptions.CompactCentralFile

    The property

    • SynchronizeWithCentralOptions.CompactCentralFile

    duplicated the property

    • SynchronizeWithCentralOptions.Compact

    but was not settable.  It has been removed completelyin Revit 2015.

    Settingsclasses are now Elements

    Several pre-existing classes:

    • DefaultDivideSettings
    • StructuralSettings
    • ElectricalSetting
    • DuctSettings
    • DuctSizeSettings
    • PipeSettings
    • ReinforcementSettings
    • WorksetDefaultVisibilitySettings
    • RevisionSettings
    • ConceptualSurfaceType
    • EnergyDataSettings
    • StartingViewSettings
    • AreaVolumeSettings

    are now subclasses of Element.  You can use limitedElement related functionality on these members (for example, get their ids tocheck them out in a local workshared model, or add ExtensibleStorage tothem).  FilteredElementCollector will now return these types if they passthe associated filters.

    FamilyAPI changes

    FamilyBaseclass removed

    The FamilyBase class has been completely removed as a baseclass of Family.  Family now inherits directly from Element.  Themembers which belonged to FamilyBase have moved to Family:

    • FamilyBase.FamilyCategory
    • FamilyBase.StructuralMaterialType

    Code that accesses elements as Family and uses thesemembers should not need to be changed, but must be recompiled due to theremoval of the intermediate level.

    Code that accesses elements as FamilyBase will need to beupdated to use Family instead.  In Revit, any FamilyBase element foundwill actually be a Family element and can be cast accordingly.

    Family.Symbols

    The property Family.Symbols has been obsoleted - use

    • Family.GetFamilySymbolIds()

    as a replacement.

    Family.CurtainPanelHorizontalSpacingand Family.CurtainPanelVerticalSpacing

    Access to these properties is now supported only from anowner family obtained from a curtain panel family document.

    An exception will result attempting to access theseproperties from a family which is not the owner family of the document.

    Code which previously tried to use these properties from anon-owner family will now need to edit the family in order to access thisinformation.

    View APIchanges

    Viewdisplay settings

    The new class:

    • ViewDisplayModel

    contains settings related to graphics display, such astransparency, silhouette settings, hidden lines, and smooth edges. Access thesesettings from:

    • View.GetViewDisplayModel()
    • View.SetViewDisplayModel()

    This access replaces direct properties of View:

    • View.SurfaceTransparency
    • View.ShowEdges
    • View.ShowSilhouettes
    • View.SilhouetteLineStyleId

    which have been marked obsolete.

    ViewSheetmembers related to Revisions

    Several ViewSheet methods related to Revisions have beenreplaced with new names.  The original members have been obsoleted. This table lists the changes:

    Obsoleted member

    Replacement

    IList<ElementId> GetAllProjectRevisionIds()

    IList<ElementId> GetAllRevisionIds()

    ICollection<ElementId> GetAdditionalProjectRevisionIds()

    ICollection<ElementId> GetAdditionalRevisionIds()

    SetAdditionalProjectRevisionIds(ICollection<ElementId>)

    SetAdditionalRevisionIds(ICollection<ElementId>)

    StructuralAPI changes

    AnalyticalModel membersobsoleted

    Several methods of AnalyticalModel havebeen marked obsolete:

    • AnalyticalModel.IsValidProjectionType()
    • AnalyticalModel.IsValidDirectionForProjection()
    • AnalyticalModel.IsValidSelectorAndDirection()
    • AnalyticalModel.IsValidProjectionDatumPlane()
    • AnalyticalModel.HasAlignment()
    • AnalyticalModel.HasExtension()
    • AnalyticalModel.GetAnalyticalProjectionType()
    • AnalyticalModel.SetAnalyticalProjectionType()
    • AnalyticalModel.SetAlignmentMethod() 
    • AnalyticalModel.GetAnalyticalProjectionDatumPlane()
    • AnalyticalModel.GetAnalyticalProjectionDatumPlane()
    • AnalyticalModel.IsSurface()

    Their replacements are more specializedadditions in AnalyticalModelSurface and the new classes AnalyticalModelStickand AnalyticalModelColumn, described below.

    To check if an analytical model is asurface type of element, try to downcast it to AnalyticalModelSurface.

    AreaReinforcementAPI changes

    The method

    • AreaReinforcement.GetCurveElementIds()

    has been obsoleted - use

    • AreaReinforcement.GetBoundaryCurveIds()

    as a replacement.

    A new overload has been introduced for

    • AreaReinforcement.Create()

    accepting ids for the type, bar type and hook type. The previous version has been obsoleted.

    PathReinforcementAPI changes

    A new overload has been introduced for

    • PathReinforcement.Create()

    accepting ids for the type, bar type and hook types. The previous version has been obsoleted.

    FabricAreaAPI changes

    The method

    • FabricArea.GetCurveElementIds()

    has been obsoleted - use

    • FabricArea.GetBoundaryCurveIds()

    as a replacement.

    A new overload has been introduced for

    • FabricArea.Create()

    accepting ids for the type and sheet type.  Theprevious version has been obsoleted.

    RebarHookType APIchanges

    The method

    • RebarHookType.GetDefaultHookLength()

    has been obsoleted.  Use

    • RebarHookType.GetDefaultHookExtension()

    as a replacement.

    Miscellaneous changes

    Removed classes

    The following classes:

    • FabricReinSpanSymbolControl
    • RebarSystemSpanSymbolControl

    have been obsoleted.  They did nothave specific API access available in the first place.

    Removed enumerated value

    The enumerated valueBoundaryConditionsType.Nothing was removed from the enumerated type. This was a default value which could never be returned or set for any element.    

    SelectionAPI changes

    The new method

    • Selection.SetElementIds(ICollection<ElementId> ids)

    supports setting of the selected elements in the activedocument.

    The following items are now obsolete:

    • SelElementSet (class)
    • Selection.Elements

    MEP APIchanges

    Connectorproperties removed

    The properties

    • Connector.JointType   
    • Connector.GenderType

    did not match properties available in the Revit userinterface, and thus should not have been exposed in the API.  They havebeen removed completely in Revit 2015.

    Creation.Document.NewWire()

    The method NewWire() has been obsoleted and replaced by thenew method

    • Wire.Create()

    The new method supports creation of straight, arc, chamfer,and spline wires.

    RelatedWire API additions

    Several new methods have been introduced to edit the layoutof an existing wire:

    • Wire.AppendVertex(XYZ vertexPoint) - Appends one vertex to the end of the wire.
    • Wire.GetVertex(int index) - Returns the vertex position at the given index.
    • Wire.InsertVertex(int index, XYZ vertexPoint) -  Inserts a new vertex before the given index.
    • Wire.RemoveVertex(int index) - Removes one vertex from the given index.
    • Wire.SetVertex(int index, XYZ vertexPoint) - Sets one vertex's position from the given index
    • Wire.AreVertexPointsValid(IList<XYZ> vertexPoints, Connector startConnector, Connector endConnector) - Identifies if the given vertex points are valid for the wire or not.
    • Wire.ConnectTo(Connector startConnectorTo, Connector endConnectorTo) -  Connects a wire to another wire

    New properties on wire:

    • NumberOfVertices  - Number of vertices of the wire, including the start and end point
    • WiringType - The wiring type(Arc or Chamfer) for the wire.

    IFC APIchanges

    Obsoletedfunctions, classes, and enums

    • The IFCDoorStyleOperation and IFCWindowStyleOperation enums have been obsoleted and replaced entirely by their .NET equivalents.
    • IFCExporterUtils.GetWallHeightDirection is no longer necessary, as all internal Revit walls have a direction of (0,0,1).
    • IFCTypeInfo has been deprecated, and is no longer used by IFC Export.
    • ExporterIFC.GetBuilding has been deprecated.  The IfcBuilding handle is now expected to be stored in the exporting application if needed.

    Changed functions,classes, and enums

    Several API routines thatreturned HashSet<IFCAnyHandle> now return anICollection<IFCAnyHandle> instead.

    Newfunctions, classes, and enums

    IFCFile has a new Read() function that returns the numberof errors and warnings reported by the toolkit during the read operation. This is in addition to the existing Read() function.

    IFCAnyHandle now has SetAttribute() functions for each datatype to reduce the use of the IFCData class.

    IFCLegacyStairOrRamp has two new functions,GetBoundaryLines() and GetWalkLines(), that return the curve loops associatedwith the boundaries and walking lines of the legacy stair or ramp,respectively.

    EnergyAnalysis API changes

    ElementIdproperties in EnergyAnaysisDetailModel contents

    The properties:

    • EnergyAnalysisSpace.SpatialElementId
    • EnergyAnalysisOpening.OriginatingElementId
    • EnergyAnalysisSurface.OriginatingElementId

    have been obsoleted.  Because the EnergyAnaysisDetailModelis intended to be generated at a single point in time, and is not persistentlyupdated as changes are made to the original elements used to generate theenergy analysis model, the model has been decoupled from direct relationshipswith the generating Revit elements.  As replacements, the API now offers:

    • EnergyAnalysisSpace.CADObjectUniqueId
    • EnergyAnalysisOpening.CADObjectUniqueId
    • EnergyAnalysisOpening.CADLinkUniqueId
    • EnergyAnalysisSurface.CADObjectUniqueId
    • EnergyAnalysisSurface.CADLinkUniqueId

    These properties offer the unique id of the relatedelements instead. In the case of potential relationships with linked modelelements, two unique ids are available.

    As a reminder, the EnergyAnaysisDetailModel is intended tobe generated and used immediately - none of the data or relationships that itcontains is updated as changes are made to the corresponding Revit model. Dispose of the generated EnergyAnaysisDetailModel using the Destroy() method assoon as you have extracted the needed information.

    MiscellaneousAPI changes

    MaterialAPI

    The property Material.MaterialCagtegory has been obsoletedand replaced by Material.MaterialCategory.

    TableSectionData.InsertColumn(intindex, bool bCreateCellData)

    This method has been obsoleted - use

    • TableSectionData.InsertColumn(int index)

    as a replacement.

    BoundaryConditions

    This class has moved from namespace Autodesk.Revit.DB toAutodesk.Revit.DB.Structure.

    BuiltInCategory.OST_MassWindow

    This enumerated type value has been renamed toOST_MassGlazing.

    ElementIntersectsElementFilter

    Previously, the ElementIntersectsElementFilter would reportthe target element as an "intersection" with itself.  Thisbehavior has been changed; the filter will no longer pass the targetelement. 

    ExtensibleStorageFilter

    The ExtensibleStorageFilter class has moved from namespaceAutodesk.Revit.DB to Autodesk.Revit.DB.ExtensibleStorage.

    MeshTriangle

    The MeshTriangle class no longer inherits fromAPIObject. 

    CurtainGridLine.Move()

    The method CurtainGridLine.Move() has been obsoleted. Use ElementTransformUtils.MoveElement() to accomplish the same result.

    CurveLoop.CreateViaThicken()

    Previously, when this function couldn't create a compatibleCurveLoop, it would return null.  It now throws an exception in thissituation.

    ObsoleteAPI removal

    The following obsolete APIs and classes have been removed:

    • Autodesk.Revit.Creation.Application.NewArc(Plane, Double, Double, Double)
    • Autodesk.Revit.Creation.Application.NewArc(XYZ, Double, Double, Double, XYZ, XYZ)
    • Autodesk.Revit.Creation.Application.NewArc(XYZ, XYZ, XYZ)
    • Autodesk.Revit.Creation.Application.NewEllipse(XYZ, Double, Double, XYZ, XYZ, Double, Double)
    • Autodesk.Revit.Creation.Application.NewHermiteSpline(IList<XYZ>, Boolean)
    • Autodesk.Revit.Creation.Application.NewHermiteSpline(IList<XYZ>, Boolean, XYZ, XYZ)
    • Autodesk.Revit.Creation.Application.NewLine(XYZ, XYZ, Boolean)
    • Autodesk.Revit.Creation.Application.NewLineBound(XYZ, XYZ)
    • Autodesk.Revit.Creation.Application.NewLineUnbound(XYZ, XYZ)
    • Autodesk.Revit.Creation.Application.NewNurbSpline(IList<XYZ>, DoubleArray, DoubleArray, Int32, Boolean, Boolean)
    • Autodesk.Revit.Creation.Application.NewNurbSpline(IList<XYZ>, IList<Double>)
    • Autodesk.Revit.Creation.Application.NewSATExportOptions()
    • Autodesk.Revit.Creation.Document.NewAreaReinforcement(Element, CurveArray, XYZ)
    • Autodesk.Revit.Creation.Document.NewBeamSystem(CurveArray, Level)
    • Autodesk.Revit.Creation.Document.NewBeamSystem(CurveArray, Level, XYZ, Boolean)
    • Autodesk.Revit.Creation.Document.NewBeamSystem(CurveArray, SketchPlane)
    • Autodesk.Revit.Creation.Document.NewBeamSystem(CurveArray, SketchPlane, XYZ, Boolean)
    • Autodesk.Revit.Creation.Document.NewPathReinforcement(Element, CurveArray, Boolean)
    • Autodesk.Revit.Creation.Document.NewRebarBarType()
    • Autodesk.Revit.Creation.Document.NewRoomTag(Room, UV, View)
    • Autodesk.Revit.Creation.Document.NewTopographySurface(IList<XYZ>)
    • Autodesk.Revit.Creation.Document.NewTruss(TrussType, SketchPlane, Curve)
    • Autodesk.Revit.Creation.Document.NewViewSheet(FamilySymbol)
    • Autodesk.Revit.Creation.FamilyItemFactory.NewDividedSurface(Reference)
    • Autodesk.Revit.Creation.ItemFactoryBase.NewSketchPlane(PlanarFace)
    • Autodesk.Revit.Creation.ItemFactoryBase.NewSketchPlane(Plane)
    • Autodesk.Revit.Creation.ItemFactoryBase.NewSketchPlane(Reference)
    • Autodesk.Revit.DB.Architecture.BoundaryLocationType
    • Autodesk.Revit.DB.Architecture.StairsRun.ExtensionBelowBase
    • Autodesk.Revit.DB.Curve.EndParameter[Int32]
    • Autodesk.Revit.DB.Curve.EndPoint[Int32]
    • Autodesk.Revit.DB.Curve.EndPointReference[Int32]
    • Autodesk.Revit.DB.Curve.Transformed[Transform]
    • Autodesk.Revit.DB.Dimension.Label
    • Autodesk.Revit.DB.DividedSurfaceData
    • Autodesk.Revit.DB.Document.AnnotationSymbolTypes
    • Autodesk.Revit.DB.Document.BeamSystemTypes
    • Autodesk.Revit.DB.Document.ContFootingTypes
    • Autodesk.Revit.DB.Document.CurtainSystemTypes
    • Autodesk.Revit.DB.Document.DeckProfiles
    • Autodesk.Revit.DB.Document.Delete(Element)
    • Autodesk.Revit.DB.Document.DimensionTypes
    • Autodesk.Revit.DB.Document.ElectricalEquipmentTypes
    • Autodesk.Revit.DB.Document.Export(String, String, ViewSet, SATExportOptions)
    • Autodesk.Revit.DB.Document.FasciaTypes
    • Autodesk.Revit.DB.Document.FindReferencesWithContextByDirection(XYZ, XYZ, View3D)
    • Autodesk.Revit.DB.Document.FloorTypes
    • Autodesk.Revit.DB.Document.GridTypes
    • Autodesk.Revit.DB.Document.GutterTypes
    • Autodesk.Revit.DB.Document.LevelTypes
    • Autodesk.Revit.DB.Document.LightingDeviceTypes
    • Autodesk.Revit.DB.Document.LightingFixtureTypes
    • Autodesk.Revit.DB.Document.MechanicalEquipmentTypes
    • Autodesk.Revit.DB.Document.RebarBarTypes
    • Autodesk.Revit.DB.Document.RebarCoverTypes
    • Autodesk.Revit.DB.Document.RebarHookTypes
    • Autodesk.Revit.DB.Document.RebarShapes
    • Autodesk.Revit.DB.Document.RoofTypes
    • Autodesk.Revit.DB.Document.RoomTagTypes
    • Autodesk.Revit.DB.Document.SlabEdgeTypes
    • Autodesk.Revit.DB.Document.SpaceTagTypes
    • Autodesk.Revit.DB.Document.SpotDimensionTypes
    • Autodesk.Revit.DB.Document.TextNoteTypes
    • Autodesk.Revit.DB.Document.TitleBlocks
    • Autodesk.Revit.DB.Document.TrussTypes
    • Autodesk.Revit.DB.Document.ViewSheetSets
    • Autodesk.Revit.DB.Document.WallTypes
    • Autodesk.Revit.DB.Edge.EndPointReference[Int32]
    • Autodesk.Revit.DB.Edge.Face[Int32]
    • Autodesk.Revit.DB.Element.GetDividedSurfaceData()
    • Autodesk.Revit.DB.Element.GetMaterialArea(Material)
    • Autodesk.Revit.DB.Element.GetMaterialVolume(Material)
    • Autodesk.Revit.DB.Element.Group
    • Autodesk.Revit.DB.Element.Level
    • Autodesk.Revit.DB.Element.Materials
    • Autodesk.Revit.DB.IFC.IFCDoorWindowInfo 
    • Autodesk.Revit.DB.Line.Bound[XYZ, XYZ]
    • Autodesk.Revit.DB.Line.Unbound[XYZ, XYZ]
    • Autodesk.Revit.DB.Material.CutPattern
    • Autodesk.Revit.DB.Material.GetCutPatternColor()
    • Autodesk.Revit.DB.Material.GetCutPatternId()
    • Autodesk.Revit.DB.Material.GetRenderAppearance()
    • Autodesk.Revit.DB.Material.RenderAppearance
    • Autodesk.Revit.DB.Material.SetRenderAppearance(Asset)
    • Autodesk.Revit.DB.Material.SurfacePattern
    • Autodesk.Revit.DB.MEPSystem.IsDefaultSystem
    • Autodesk.Revit.DB.ParameterFilterElement.AllCategoriesFilterable(ICollection<ElementId>)
    • Autodesk.Revit.DB.Plumbing.PipeConnectionType
    • Autodesk.Revit.DB.Plumbing.PipeSettings.ElbowAngleIncrement
    • Autodesk.Revit.DB.Plumbing.PipeType.ConnectionType
    • Autodesk.Revit.DB.PointCloudInstance.GetPoints(PointCloudFilter, Int32)
    • Autodesk.Revit.DB.SaveAsOptions.Rename
    • Autodesk.Revit.DB.Settings.VolumeCalculationSetting
    • Autodesk.Revit.DB.SketchPlane.Plane
    • Autodesk.Revit.DB.SketchPlane.PlaneReference
    • Autodesk.Revit.DB.StairsEditScope.Commit()
    • Autodesk.Revit.DB.Structure.FabricArea.Create(Document, Element, IList<CurveLoop>, XYZ)
    • Autodesk.Revit.DB.Structure.FabricArea.SetFabricLocation(FabricLocation)
    • Autodesk.Revit.DB.Structure.FabricArea.SetFabricSheetTypeId(ElementId)
    • Autodesk.Revit.DB.Structure.FabricArea.SetMajorSheetAlignment(FabricSheetAlignment)
    • Autodesk.Revit.DB.Structure.FabricArea.SetMinorSheetAlignment(FabricSheetAlignment)
    • Autodesk.Revit.DB.Structure.FabricSheet.SheetTypeId
    • Autodesk.Revit.DB.Structure.FabricSheetType.PhysicalMaterialAsset
    • Autodesk.Revit.DB.Structure.RebarShape.GetHookAngle(Int32)
    • Autodesk.Revit.DB.Structure.RebarShape.GetHookOrientation(Int32)
    • Autodesk.Revit.DB.Structure.RebarShapeDefinitionBySegments.AddBendDefaultRadius(Int32, Int32, RebarShapeBendAngle)
    • Autodesk.Revit.DB.Structure.RebarShapeDefinitionBySegments.AddBendVariableRadius(Int32, Int32, RebarShapeBendAngle, ElementId, Boolean)
    • Autodesk.Revit.DB.Transform.Reflection[Plane]
    • Autodesk.Revit.DB.Transform.Rotation[XYZ, XYZ, Double]
    • Autodesk.Revit.DB.Transform.Translation[XYZ]
    • Autodesk.Revit.DB.View.CutColorOverrideByElement[ICollection<ElementId>]
    • Autodesk.Revit.DB.View.CutLinePatternOverrideByElement[ICollection<ElementId>]
    • Autodesk.Revit.DB.View.CutLineWeightOverrideByElement[ICollection<ElementId>]
    • Autodesk.Revit.DB.View.GetVisibility(Category)
    • Autodesk.Revit.DB.View.ProjColorOverrideByElement[ICollection<ElementId>]
    • Autodesk.Revit.DB.View.ProjLinePatternOverrideByElement[ICollection<ElementId>]
    • Autodesk.Revit.DB.View.ProjLineWeightOverrideByElement[ICollection<ElementId>]
    • Autodesk.Revit.DB.View.SetVisibility(Category, Boolean)
    • Autodesk.Revit.DB.View3D.SectionBox
    • Autodesk.Revit.DB.VolumeCalculationOptions
    • Autodesk.Revit.DB.VolumeCalculationSetting
    • Autodesk.Revit.Utility.AssetPropertyReference.Value

     

    MajorAPI additions

    View APIchanges

    Activegraphical view

    The new property

    • UIDocument.ActiveGraphicalView

    allows you to read the currently active graphical view ofthe currently active document.  Unlike UIDocument.ActiveView, thisproperty will never return auxiliary views like the Project Browser or SystemBrowser if the user has happened to make a selection in one of those views.

    Sketchylines settings

    The new methods

    • View.GetSketchyLines()
    • View.SetSketchyLines()

    allow full control over the Sketchy Lines settings for agiven view.

    DefaultType API

    Revit has a default type for different categories. This default type is shown in the Revit User Interface when the related tool isinvoked to create an element of this category. 

    FamilyTypes

    These members provide read and write access to the defaulttype for a given family category id:

    • Document.GetDefaultFamilyTypeId() - Gets the default family type id associated to the given family category id.
    • Document.SetDefaultFamilyTypeId() - Sets the default family type id associated to the given family category id.
    • Document.IsDefaultFamilyTypeIdValid() - Checks whether the family type id is valid to set as default for the given family category id.
    • ElementType.IsValidDefaultFamilyType() - Identifies if a type is a valid default family type for the given family category id.

    Non-familyTypes

    These members provide read and write access to the defaulttype for a non-Family element type:

    • Document.GetDefaultElementTypeId() - Gets the default element type id for a given non-Family element type.
    • Document.SetDefaultElementTypeId() - Sets the default
    • Document.IsDefaultElementTypeIdValid() - Checks whether the element type id is valid for a given non-Family element type.

    StructuralAPI additions

    Reinforcementnumbering

    The new classes:

    • NumberingSchema
    • NumberingSchemaType

    are used to define how objects of certain kind and scopeare to be organized for the purpose of numbering/tagging them.  EachNumberingSchema controls numbering of elements of one particular kind. Instances of NumberingSchema are also elements and there is always only one ofeach type in every Revit document. Available types of all built-in numberingschemas are enumerated in NumberingSchemaTypes class.

    In this release NumberingSchema applies only to thebuilt-in types matching elements of these categories:

    • Rebar
    • Fabric Reinforcement

    Reinforcementin parts

    Reinforcement and Rebar is now allowed to be hosted inParts if those Parts come from a structural layer of a valid reinforcementhost.

    The methods: 

    • Rebar.CreateFromCurves()
    • Rebar.CreateFromCurvesAndShape()
    • Rebar.CreateFromRebarShape()
    • AreaReinforcement.Create()
    • PathReinforcement.Create()
    • FabricArea.Create()
    • FabricSheet.Create()

    accept compatible parts as host elements.

    The new method:

    • RebarHostData.IsValidHost()

    identifies if a proposed host elementsis valid for reinforcement.

    Rebar presentation mode

    The new presentation mode capabilitiesallow the user to specify how rebar sets are shown in a given view. Barpresentation schemes simplify the view while maintaining an identifiablefootprint in which the rebar set is placed.  In the API, the following membershave been added to support this capability:

    • Rebar.SetPresentationMode()
    • Rebar.GetPresentationMode()
    • Rebar.ClearPresentationMode()
    • Rebar.HasPresentationOverrides()
    • Rebar.SetBarHiddenStatus()
    • Rebar.IsBarHidden()
    • Rebar.FindMatchingPredefinedPresentationMode()
    • Rebar.IsRebarInSection()
    • Rebar.CanApplyPresentationMode()
    • RebarInSystem.SetPresentationMode()
    • RebarInSystem.GetPresentationMode()
    • RebarInSystem.ClearPresentationMode()
    • RebarInSystem.HasPresentationOverrides()
    • RebarInSystem.SetBarHiddenStatus()
    • RebarInSystem.IsBarHidden()
    • RebarInSystem.FindMatchingPredefinedPresentationMode()
    • RebarInSystem.IsRebarInSection()
    • RebarInSystem.CanApplyPresentationMode()

    The default settings for bar presentation can be accessedfrom

    • ReinforcementSettings.RebarPresentationInView
    • ReinforcementSettings.RebarPresentationInSection

    Place FabricSheetdirectly in host

    The new members:

    • FabricSheet.Create()
       
    • FabricSheet.PlaceInHost()
    • FabricSheet.GetSheetLocation()
    • FabricSheet.IsSingleFabricSheetWithinHost()
    • FabricSheet.HostId
    • FabricSheet.FabricLocation
    • FabricSheet.CoverOffset
    • FabricSheet.FabricHostReference
    • FabricSheet.IsCoverOffsetValid
    • FabricArea.RemoveFabricReinforcementSystem()
    • RebarHostData.GetFabricSheetsInHost()

    support the new Revit capability wheresingle instances of fabric sheets can be placed precisely to reinforce sectionsof concrete walls or floors.

    Creating defaultreinforcement types

    The new methods:

    • AreaReinforcementType.CreateDefaultAreaReinforcementType()
    • PathReinforcementType.CreateDefaultPathReinforcementType()
    • FabricAreaType.CreateDefaultFabricAreaType()
    • FabricSheetType.CreateDefaultFabricSheetType()
    • FabricWireType.CreateDefaultFabricWireType()
    • RebarBarType.CreateDefaultRebarBarType()
    • RebarHookType.CreateDefaultRebarHookType()

    create a default element type for thegiven reinforcement class.  This is useful if there is no existing typeelement of this kind in the document.

    Miscellaneousreinforcement API additions

    Createreinforcement based on host boundary

    The new overloads:

    • AreaReinforcement.Create(Document, Element, XYZ, ElementId, ElementId, ElementId)
    • FabricArea.Create(Document, Element, XYZ, ElementId, ElementId)

    create new reinforcement area elements automaticallyrelated to the host's boundary.

    Rebar shape family

    The property:

    • RebarShape.ShapeFamilyId

    gets the rebar shape family id.

    RebarHostCategory enumerated type

    The type of host for rebars. This typematches the value returned by the new parameterBuiltInParameter.REBAR_HOST_CATEGORY.

    AnalyticalModel APIadditions

    AnalyticalModel coordinate system

    The new method:

    • AnalyticalModel.GetLocalCoordinateSystem()

    returns the local coordinate systemfrom analytical model element.

    AnayticalModelSurface additions  

    The AnalyticalModelSurface class hasbeen extended with several new members:  

    • AlignmentMethod  
    • ProjectionZ
    • ProjectionPlaneZ 
    • HasExtension
    • BottomExtensionMethod
    • TopExtensionMethod
    • BottomExtension
    • TopExtension
    • BottomExtensionPlaneId
    • TopExtensionPlaneId 

    These new members support checking andmanipulating alignment, projection and extension of AnalyticalModelSurfaceelements such floors, slabs and walls.  

    Stick and column elements

    The new class:

    ·        AnalyticalModelStick

    represents a stick in the structuralanalytical model (A beam, brace or column).  This class contains severalmembers to check and manipulate the alignment, projection and extensionproperties:

    ·        GetAlignmentMethod()

    ·        GetProjectionY()

    ·        GetProjectionZ()

    ·        GetProjectionPlaneY()

    ·        GetProjectionPlaneZ()

    ·        SetProjection()

    The new class:

    ·           AnalyticalModelColumn

    represents an analytical model ofstructural column.  It is a subclass of AnalyticalModelStick.  Thisclass contains members to check and manipulate extension properties:

    ·           BaseExtensionMethod

    ·           TopExtensionMethod

    ·           BaseExtensionPlaneId

    ·           TopExtensionPlaneId

    ·           BaseExtension

    ·            TopExtension

    Loadsand Boundary Conditions API

    LoadBaseclass

    The new properties:

    • OrientTo
    • HostElementId
    • WorkPlaneId

    provide the ability to read and change how the load isoriented to the associated host or related work plane. 

    BoundaryConditionsclass

    The new methods:

    • BoundaryConditions.GetOrientTo()
    • BoundaryConditions.SetOrientTo()

    access the Boundary Conditions element orientation featurethat allows orientation of boundary conditions to the local coordinate systemof the associated analytical model.

    The new method:

    • BoundaryConditions.GetDegreesOfFreedomCoordinateSystem()

     gets the definition of the coordinate system that isused by the element's translation and rotation parameters (e.g. X Translationor Z Rotation).

    The new method:

    • BoundaryConditions.GetBoundaryConditionsType()

    accesses the Boundary Conditions type (Point, Line orArea). 

    Structural Section Parameters

    Revit now supports defined datastructures to represent standard structural section shapes.  In support ofthis feature a hierarchy of classes were introduced to the API:

    Class

    Represents

    StructuralSection

    The base class for StructuralSection specific classes, designed to provide common parameters and ability to differentiate between different structural section shapes.

    StructuralSectionRectangular

    The base class for rectangular sections.

    StructuralSectionRound

    The base class for round sections.

    StructuralSectionCParallelFlange

    C-channel Parallel Flange structural section.

    StructuralSectionCSlopedFlange

    C-channel Sloped Flange structural section.

    StructuralSectionHotRolled

    Hot rolled structural sections.

    StructuralSectionIParallelFlange

    I-shape Parallel Flange structural section.

    StructuralSectionISlopedFlange

    I-shape Sloped Flange structural section.

    StructuralSectionISplitParallelFlange

    I-split Parallel Flange structural section.

    StructuralSectionISplitSlopedFlange

    I-split Sloped Flange structural section.

    StructuralSectionIWelded

    I-shape Welded structural section.

    StructuralSectionIWideFlange

    I-shape Wide Flange structural section.

    StructuralSectionLAngle

    L-angle Flange structural section.

    StructuralSectionPipeStandard

    Pipe section.

    StructuralSectionRectangleHSS

    Parameterized rectangle HSS structural section.

    StructuralSectionRectangleParameterized

    Parameterized rectangle structural section.

    StructuralSectionRectangularBar

    Rectangular Bar structural section.

    StructuralSectionRoundBar

    Round Bar structural section.

    StructuralSectionRoundHSS

    Pipes known as Round HSS (HollowStructuralSection).

    StructuralSectionStructuralTees

    Structural Tees structural section.

     

    Only beams, braces and structuralcolumns can have a structural section.  At the level of the Family, thesemembers:

    • Family.HasStructuralSection()
    • Family.StructuralSectionShape

    identify if the family carries astructural section and its shape.
     

    At the level of the FamilySymbol, thesemembers:

    • FamilySymbol.HasStructuralSection()
    • FamilySymbol.GetStructuralSection()
    • FamilySymbol.SetStructuralSection()

    provide access to the specificparameterized structural section for a given FamilySymbol.
     

    The new method:

    • LabelUtils.GetStructuralSectionShapeName()

    returns the user-visible name ofstructural section shape.

    StructuralFramingUtils

    The methods:

    • StructuralFramingUtils.CanSetEndReference()
    • StructuralFramingUtils.IsEndReferenceValid()
    • StructuralFramingUtils.RemoveEndReference()
    • StructuralFramingUtils.GetEndReference()
    • StructuralFramingUtils.SetEndReference()

    support setting / getting / removing the endreferences for family instances of a structural framing type.

    Family instances need to be non-concrete and joined atthe given end.  As the new end reference can be set appropriate face ofthe joined element at the given end.  The setback value will be changed asa result of any reference change.

    The methods:

    • StructuralFramingUtils.DisallowJoinAtEnd()
    • StructuralFramingUtils.AllowJoinAtEnd()
    • StructuralFramingUtils.IsJoinAllowedAtEnd()

     support disallowing / allowing structural framingelements to join at the end to others.

    Family instances need to be of a structural framingcategory. If the framing element is already joined at the end, and becomesdisallowed to join, it will become disconnected.  If the framing elementend is allowed to join and if that end is near other elements it will becomejoined.

    Revisions

    Revit 2015 introduces new API classes and members foraccessing project Revisions, their settings and associated Revision Clouds.

    RevisionSettingsclass

    The new RevisionSettings class allows an application toread and modify the project-wide settings that affect Revisions and Revision Clouds.

    The new property

    • RevisionSettings.RevisionAlphabet

    determines the characters used to populate the RevisionNumber parameter of alphabetic Revisions.

    The new property

    • RevisionSettings.RevisionCloudSpacing

    determines the sizing of the cloud graphics for RevisionClouds in the project.

    The new property

    • RevisionSettings.RevisionNumbering

    determines whether revision numbers for the project aredetermined on a per sheet or a whole project basis.

    Revisionclass

    The new Revision class allows an application to read andmodify the existing revisions in a project and also to create newrevisions.  Revision is a subclass of element.

    The new method

    • Revision.GetAllRevisionIds()

    provides an ordered list of all of the Revisions in thedocument.

    The new method

    • Revision.ReorderRevisions()

    allows the ordering of the Revisions within the project tobe changed.

    The new method

    • Revision.Create()

    creates a new Revision in the document.

    The data associated with a Revision, and its associated settingswithin the project, can be read and modified through the following newproperties:

    • Revision.Description
    • Revision.Issued
    • Revision.IssuedBy
    • Revision.IssuedTo
    • Revision.NumberType
    • Revision.RevisionDate
    • Revision.Visibility
    • Revision.SequenceNumber
    • Revision.RevisionNumber

    The new methods

    • Revision.CombineWithNext()
    • Revision.CombineWithPrevious()

    allow an application to combine a specified Revision withthe next or previous Revision in the model.  Combining the Revisions meansthat the RevisionClouds and revision tags associated with the specifiedRevision will be reassociated with the next Revision and the specified Revisionwill be deleted from the model.  This method returns the ids of theRevisionClouds that were reassociated.

    The new method

    • ViewSheet.GetRevisionNumberOnSheet()

    provides access to the Revision Number for a Revision whenthe numbering in the project is by sheet.

    RevisionCloudclass

    The new RevisionCloud class allows an application to accessinformation about the revision clouds that are present within a model and tocreate new revision clouds.

    The new method

    • RevisionCloud.Create()

    allows an application to create a new RevisionCloud in aspecified view based on a series of lines and curves.

    The new property

    • RevisionCloud.RevisionId

    allows an application to read an modify the Revisionassociated with the RevisionCloud.

    The new method

    • RevisionCloud.IsRevisionIssued()

    allows an application to easily check whether aRevisionCloud is associated with a Revision that has already been issued.

    The new method

    • RevisionCloud.GetSheetIds()

    allows an application to obtain the ids of the ViewSheetswhere the RevisionCloud may appear (either because the RevisionCloud is placeddirectly on the ViewSheet or because the RevisionCloud is visible in some Viewon the ViewSheet).

    The new ViewSheet method

    • ViewSheet.GetRevisionCloudNumberOnSheet()

    provides access to the Revision Number for a RevisionCloudwhen the numbering in the project is by sheet.

    Revisioncloud geometry

    The property:

    • Element.Geometry

    has been enhanced to return geometry from RevisionCloudelements.  This will return the actual curved lines that make up thecloud.

    The new method

    • RevisionCloud.GetSketchCurves()

    allows an application to read the Curves that form theRevisionCloud's sketch.  This will return the sketched curves that definethe basic outline of the cloud and not the arcs that Revit attaches to thesecurves to create the cloud appearance.

    ParametersAPI additions

    Parameterorder

    Revit now allows users to reorder parameters within theirgroups for a given family, ensuring that the parameters are presented to theuser in the most logical order.  Several API changes have been introducedrelated to this.

    The new methods

    • FamilyManager.GetParameters()
    • Element.GetOrderedParameters()

    returns the parameters associated to family types orelements in the specified order.   Note that forElement.GetOrderedParameters(), the returned collection only includesparameters that are shown in the Properties Palette (unlike Element.Parameters).

    The new method

    • FamilyManager.ReorderParameters(IList<FamilyParameter> parameters)

    reorders the family parameters within the family accordingto the specified input.

    The new method

    • FamilyManager.SortParameters(ParametersOrder order)

    sorts the family parameters according to the desiredautomatic sort order.

    Familyparameter creation - description

    The new method:

    • FamilyManager.SetDescription(FamilyParameter familyParameter, String description);

    sets the description for a family parameter.

    The new property:

    • Definition.Description

    gets the stored tooltip description of the parameterdefinition.

    Wall APIadditions

    Stackedwall

    Several new members added to the Wall class provide supportfor reading information about stacked wall and stacked wall members.

    The new method

    • Wall.GetStackedWallMemberIds()

    gets the sub walls which belong to a stacked wall, with theids returned in order from bottom to top.

    The new properties

    • Wall.IsStackedWall
    • Wall.IsStackedWallMember
    • Wall.StackedWallOwnerId

    identify if the wall is a stacked wall, a member of astacked wall, and if the wall is a member of the stacked wall, the id of thestacked wall that owns this wall.

    WallFunction

    The new property

    • WallType.Function

    provides read/write access to the Function property of walltypes.

    Schedule API additions

    Schedule filters

    As schedules now support up to 8applied filters, the following methods now allow up to 8 filters to be applied:

    • ScheduleDefinition.AddFilter()
    • ScheduleDefinition.InsertFilter()
    • ScheduleDefinition.SetFilter()
    • ScheduleDefinition.SetFilters()

    ScheduleDefinition.GrandTotalTitle

    The new property

    • ScheduleDefinition.GrandTotalTitle

    provides the ability to customize the nameof grand total title row for a schedule.

    Images in schedules  

    Images can now be added to schedules via parameters definedas type "Image".  In schedule views, the image parameter willdisplay the path of the ImageType, but the image itself displays inScheduleSheetInstances placed on a sheet.  The value of the "Image"parameters is an ElementId representing an ImageType element.    

    The new ImageType class is a subclassof ElementType representing a type containing an image. Instances of this typemay also be displayed on 2D views or sheets directly.

    The new method:

    • ImageType.Create()

    provides the ability to create a new ImageType element andloads a copy of the image into it.

    The new members:

    • ImageType.Reload()
    • ImageType.ReloadFrom()
    • ImageType.IsLoadedFromFile()
    • ImageType.Path

    provide the ability to manage thecontents of the image, and reload it from its original path location or a newlocation.

    The new members

    • ViewSchedule.ImageRowHeight
    • ViewSchedule.RestoreImageSize()
    • ViewSchedule.HasImageField()

    provide the ability to affect the size and displaycharacteristics of schedules that contain images.

    IFC APIadditions

    IFCimport options and operations

    The new method:

    • RevitLinkType.CreateFromIFC()

    creates a new linked IFC type representing an IFC modelopened for reference.  Once created, you can place instance(s) of this typeusing regular RevitLinkInstance methods.

    The new method:

    • Application.OpenIFCDocument(string, IFCImportOptions)

    supports different options for import and create of a newdocument based on an IFC file:

    • IFCImportOptions.Action(open or link)
    • IFCImportOptions.Intent (parametric or reference)
    • IFCImportOptions.AutoJoin (applies to parametric import only)

    ImporterIFCnew properties and functions

    ImporterIFC offers new members to assist with theimplementation of custom IFC importers:

    • ImporterIFC.Document  - returns the document associated with the IFC file.
    • ImporterIFC.GetOptions() - returns the options names and values set for the current IFC import.

    Built-inparameter changes

    BuiltInParameter.IFC_*_GUID values (IFC_GUID,IFC_TYPE_GUID, IFC_PROJECT_GUID, IFC_BUILDING_GUID, and IFC_SITE_GUID) are nolonger required to be unique, and are schedulable.

    BuiltInParameter.IFC_TYPE_GUID has a default English valueof "Type IfcGUID" to distinguish it from BuiltInParameter.IFC_GUID.

    ImportAPI

    DirectShape

    The new classes:

    • DirectShape
    • DirectShapeType
    • DirectShapeLibrary

    offer the ability to create imported geometry elementsdirectly in the project document.  The geometry can include closed solidsor meshes.   The geometry will be validated to ensure that it isvalid for Revit use. 

    The created elements must be assigned to a category. This grants the elements a collection of available parameters and some limitedbehaviors.

    TessellatedShapeBuilder

    The new classes:

    • TessellatedShapeBuilder
    • TessellatedFaces
    • TessellatedShapeBuilderResult

    can be used create solid, shell, orpolymeshes bounded by a set of connected planar facets, created by addingTessellatedFace objects one by one.  The utility includes some ability toheal imprecisions and discontinuities in the inputs, and offers somediagnostics regarding geometry that is too imprecise to be used.

    ExternalResources Service API

    This new framework allows add-ins to provide Revit withexternal content obtained from anywhere.  Add-ins implementing a serverfor this type can obtain their external content from the web, an externaldatabase, or another application. The Revit user can browse the externalcontent locally and select appropriate content to use in their models.

    In this release, only some types of Revit external contentare supported as External Resources:

    • Keynotes
    • Assembly classification codes
    • Revit links

    IExternalResourceServer

    The new interface:

    • IExternalResourceServer

    allows developers to provide resources from an externalsource. Revit will call IExternalResourceServer.LoadResource(), and the serverwill provide the data for the requested resource.

    IExternalResourceUIServer

    The new interface:

    • IExternalResourceUIServer

    gives Revit a list of the resources handled by the server.The resources will appear in Revit's UI when the Revit user browses for theappropriate link type. Servers can also provide custom error-handling UI. Thisallows servers to handle cases Revit could not know about. For example, if thenetwork is down and the server cannot access its resources, the server can putup a detailed error message explaining the problem.

    ExternalResourceReference

    The new class:

    • ExternalResourceReference

    contains identifying information for resources which comefrom external servers. Each external server link will contain anExternalResourceReference. The ExternalResourceReference contains the id of theserver which provided the resource. The class also contains a string-to-stringmap which contains the actual identity information for the reference. Serverscan define their own conventions for naming and identifying resources.

    Keynoteand Assembly Code API

    Revit 2015 introduces a number of new classes to give applicationsaccess to the keynote and assembly code data used within a Revit model. 

    Because there are a number of similarities in the way thekeynote data and the assembly code data are structured, many of the operationscan be accessed through base classes that provide common functionality forkey-based tree-structured data.

    KeyBasedTreeEntryTable

    The new class:

    • KeyBasedTreeEntryTable

    represents a collection of key-based tree entries storedwithin the Revit model, such as the keynote or assembly code table. There aretwo subclasses - KeynoteTablefor the keynote table, and AssemblyCodeTablefor the assembly code table.

    The methods:

    • KeynoteTable.GetKeynoteTable()
    • AssemblyCodeTable.GetAssemblyCodeTable()

    are static methods which allow access to the current table.

    The methods:

    • KeyBasedTreeEntryTable.LoadFrom()
    • KeyBasedTreeEntryTable.Reload()

    allow the user to reload the keynote or assembly codetable. LoadFrom() allows the table to be reloaded from a new location.

    The method:

    • GetKeyBasedTreeEntries()

    allows access to the data in the table.

    KeyBasedTreeEntry

    The class:

    • KeyBasedTreeEntry

    represents an individual entry within a key-based tree. Itprovides properties for the key and parent key. The subclasses, KeynoteEntryand ClassificationEntry, provide properites and methods specific to the keynotetable and the assembly code table. Keynotes have access to the keynote text,while ClassificationEntries have access to the level, category Id, anddescription.

    Energy analysis API additions

    gbXML export options

    The new property:

    • GBXMLExportOptions.ExportEnergyModelType

    determines the type of analysis used when producing theexport gbXML file for the document.  Options are:

    • SpatialElement - Energy model based on rooms or spaces.  This is the default for calls when this option is not set, and matches behavior in Revit 2014.
    • BuildingElement - Energy model based on analysis of building element volumes.

    BuildingEnvelopeAnalyzer Class

    The new class:

    •   BuildingEnvelopeAnalyzer  

    analyzes which elements are part ofthe building envelope (the building elements exposed to the outside). Thisclass uses a combination of ray-casting and flood-fill algorithms in order tofind the building elements that are exposed to the outside of the building.This method can also look for the bounding building elements for enclosed spacevolumes inside the building. Options for the analysis include:

    • AnalyzeEnclosedSpaceVolumes - Whether or not to analyze interior connected regions inside the building forming enclosed space volumes.
    • GridCellSize - The cell size for the uniform cubical grid used when analyzing the building envelope.
    • OptimizeGridCellSize - Whether or not to use the exact value for the cell size or let the analyzer optimize the cell size based on the specified grid size

    BrowserOrganizationAPI

    The new class

    • BrowserOrganization

    contains settings for grouping, sorting, and filtering ofitems in the project browser.

    New methods

    • BrowserOrganization.AreFiltersSatisfied() - Determines if the given element satisfies the filters defined by the browser organization.
    • BrowserOrganization.GetFolderItems() -  Returns a collection of leaf FolderItemInfo objects each containing the given element Id.

    New static Methods

    • GetCurrentBrowserOrganizationForViews() - Gets the BrowserOrganization that applies to the Views section of the project browser. 
    • GetCurrentBrowserOrganizationForSheets() - Gets the BrowserOrganization that applies to the Sheets section of the project browser. 

    New properties

    • SortingOrder - The sorting order if sorting of items is applicable in the browser.
    • SortingParameterId - The id of the parameter used to determine the sorting order of items in the browser.

    The new class

    • FolderItemInfo

    contains data for each folder item in the organizationsettings of the project browser including folder parameter Id and foldername. 

    New properties

    • ElementId -The folder parameter Id.
    • Name - The folder name .

     

    MinorAPI additions

    ApplicationAPI additions

    3 new properties have been added to Application to retrievefile paths from revit.ini:

    1.    DefaultIFCProjectTemplate: thetemplate set in the IFC import options to override the default projecttemplate.

    2.    ExportIFCCategoryTable: thepath and file name to the Revit category to IFC entity mapping table forexport.

    3.    ImportIFCCategoryTable: thepath and file name to the IFC entity to Revit category mapping table forimport.

    DocumentAPI additions

    Document.IsDetached

    The new property

    • Document.IsDetached

    identifies if a workshared document is opened as detached.

    Document.DocumentWorksharingEnabled

    This event is raised when Revit has just enabledworksharing in the document.   Handlers of this event are permittedto make modifications to any document (including the activedocument), except for documents that are currently in read-only mode.

    UIDocumentoperations and additions

    The new method

    • UIDocument.RequestViewChange()

    requests to change the active view by posting a messageasynchronously.  Unlike setting the ActiveView property, this will notmake the change in active view immediately. Instead the request will be postedto occur when control returns to Revit from the API context. This method ispermitted to change the active view from the Idling event or an ExternalEventcallback.

    The new methods

    • UIDocument.PostRequestForElementTypePlacement()
    • UIDocument.PromptToPlaceElementTypeOnLegendView()

    places a request on Revit's command queue for the user toplace instances of the specified ElementType.   The former is for generaluse, the latter is specifically for legend views. This does not executeimmediately,  but instead when control returns to Revit from the currentAPI context.  This method starts its own transaction.  In a singleinvocation, the user can place multiple instances of the input element type untilthey finish the placement (with Cancel or ESC or a click elsewhere in theUI).  This method invokes the UI when control returns from the current APIcontext; because of this, the normal Revit UI options will be available to theuser,  but the API will not be notified when the user has completed thisaction.  Because this request is queued to run at the end of the currentAPI context, only one such request can be set (between this and the commandsset by UIApplication.PostCommand()).  This differs from UIDocument.PromptForFamilyInstancePlacement()as that method can be run within the current API context, but the user is notpermitted full access to the user interface options during placement.

    The new method

    • UIDocument.PromptToPlaceViewOnSheet()

    Prompts the user to place a specified view onto a sheet.Set  allowReplaceExistingSheetViewport to true to allow the user toreplace the existing viewport.  

    The new method

    • UIDocument.PromptToMatchElementType()

    prompts the user to select instance elements to change themto the input type.

    Link APIadditions

    ExternalResource compatibility

    The Revit Link API has been updated - all methods whichtook a ModelPath argument now have new versions which take anExternalResourceReference argument. These methods can also work with files fromdisk. ExternalResourceReference.CreateLocalResource() can be used to create anExternalResourceReference corresponding to a local file.

    The older Revit link methods have not been deprecated; theyare still available for local links.

    RevitLinkType.AttachmentType

    This property is now writable, and can be toggled betweenAttachment and Overlay.

    CategoryAPI additions

    Category.CategoryType

    The new property

    • Category.CategoryType

    determines if the category is shown in theVisibility/Graphics settings grouped with the model, annotation, or analyticalmodel categories.   Note that import categories are also"model" but will be shown separately in the dialog. Some categoriesnot shown in the dialog and will return Internal for the category type.

    ElementTypeAPI additions

    ElementType.FamilyName

    The new property

    • ElementType.FamilyName

    contains the localized string describing the family inwhich this ElementType belongs. For family symbols, this will be the name ofthe associated Family. For system family types, this will be the name used togroup related types, such as "Oval Duct" or "Curtain Wall".

    ElementType duplicatingevents

    The events:

    • Application.ElementTypeDuplicating
    • Application.ElementTypeDuplicated

    allow you to subscribe to an event tobe notified when Revit is just about to duplicate an element type, and afterRevit has finished duplicating an element type.

    Material API additions

    The new static method

    • Material.IsNameUnique(Document document, String name)

    validates whether a proposed material name is unique indocument.  This will be used to confirm the validity of the name beforecreating a new material via Material.Create() or Material.Duplicate().

    View APIadditions

    View.IsAssemblyView

    The new property

    • View.IsAssemblyView

    identifies if the view is an assembly view.

    View.Title

    The new property

    • View.Title

     returns the view title. This consists of the viewname plus other modifiers, such as the view type, sheet number, area scheme,and/or assembly type, depending on the specifics of the view.

    Categorieshidden status

    The following properties are now settable:

    • View.AreModelCategoriesHidden
    • View.AreAnnotationCategoriesHidden
    • View.AreAnalyticalModelCategoriesHidden
    • View.AreImportCategoriesHidden

    Setting these properties allow an application to toggleModel Categories, Annotation Categories, Analytical Model Categories, or ImportCategories visibility.

    Draftingview creation

    The new method

    • ViewDrafting.Create()

    allows an application to create a new drafting view in themodel with a specified ViewFamilyType.

    Orient3D view

    The new method

    • View3D.OrientTo(XYZ forwardDirection)

    supports reorienting the 3D view to align with the forwarddirection.  This is an alternate method to reorient the view using typicalRevit calculations for other related parameters in ViewOrientation3D.

    Referencecallouts and sections

    The new class ReferenceableViewUtils provides utilitymethods that allow an application to manage reference views such as referencesections or reference callouts.

    The new methods

    • ReferenceableViewUtils.ChangeReferencedView
    • ReferenceableViewUtils.GetReferencedViewId

    allows an application to read and change the viewreferenced by a reference view (such as a reference section or referencecallout).

    FamilyAPI additions

    FamilyManager.IsUserAssignableParameterGroup

    The new method

    • FamilyManager.IsUserAssignableParameterGroup()

    provide the ability to identify the given built-inparameter group is user assignable for family parameter or not.

    LocationPoint.Rotationfor view-specific family instances

    The property:

    • LocationPoint.Rotation

    now returns the rotation angle in the plane of the view,for view-specific family instances such as detail components.  Previouslythe angle was measured from an axis outside the plane of the view.  

    PromptForFamilyInstancePlacement()option for Air Terminals on Ducts

    The new overload method

    • UIDocument.PromptForFamilyInstancePlacement(Autodesk.Revit.DB.FamilySymbol, Autodesk.Revit.UI.PromptForFamilyInstancePlacementOptions)

    allows an application to prompt the user to place instancesof a specified family symbol interactively.  The options class supports asetting requiring the mode to be set to place an air terminal family instancedirectly on a duct (the option is either set to be on or off, the user cannottoggle this during placement).

    Family loading events

    The events:

    • Application.FamilyLoadingIntoDocument
    • Application.FamilyLoadedIntoDocument

    allow you to subscribe to an event tobe notified when Revit is just about to load a family into a document, andafter Revit has just finished loading the family. 

    GeometryAPI additions

    Curve

    The new method:

    • Curve.CreateReversed()

    creates a new curve that has the same shape, but has itsorientation reversed.

    The new method:

    • Curve.CreateOffset()

    creates a new curve that is offset from the original curveby a certain distance.  The offset direction is determined by the normalof the curve at any given point.

    CurveLoop

    The new method:

    • CurveLoop.CreateViaThicken()

    creates a new closed curve loop bythickening the input open curve loop with respect to a given plane.

    The new method:

    • CurveLoop.CreateViaOffset()

    creates a new CurveLoop that is an offset of the originalCurveLoop.  This is effectively done by offsetting each Curve in theCurveLoop and trimming the ends to form a new continuous CurveLoop.

    Face

    The new method:

    • Face.GetEdgesAsCurveLoops()

    returns a list of closed curve loopsthat correspond to the edge loops of the face. Curves in each curve loopcorrespond to individual edges.

    CurveElement

    The new method:

    • CurveElement.SetGeometryCurve()

    explicitly sets the geometry of thecurve element with the option to not affect the geometry of any currentlyjoined curve elements. After the curve geometry is set, other curves mayautojoin to the new curve geometry.


    The new method:

    • CurveElement.SetSketchPlaneAndCurve()

     sets the sketch plane and thecurve for the CurveElement simultaneously (allowing the SketchPlane to besuccessfully modified in a way that would be incompatible if setseparately).  This method will not affect the geometry of any currentjoined curve elements.

    FreeFormElement

    The new method: 

    • FreeFormElement.UpdateSolidGeometry()

    updates the geometry of theFreeFormElement to the given shape preserving References to the existinggeometry where possible.

    MaterialAPI additions

    Material.UseRenderAppearanceForShading

    The new property:

    • Material.UseRenderAppearanceForShading

    determines if the material's appearance in a shaded viewshould be driven by the settings of the render appearance, or driven by thematerial's graphics properties.

    PrintAPI additions

    Regionedges mask coincident lines

    The new property:

    • PrintParameters.MaskCoincidentLines

    indicates whether to mask coincident lines when printing.

    ConnectorAPI additions

    Newconnector properties 

    The new properties:

    • Connector.AllowsSlopeAdjustments
    • Connector.Utility
    • Connector.Description

    provide project level read access toconnector properties which can be set in the family environment.

    Namingutilities

    The method

    • NamingUtils.IsValidName()

    identifies if the input is valid to be used as a name of anobject in Revit. 

    This routine checks only for prohibited characters in thestring. When setting the name for an object there are other specificconsiderations which are checked (for example, the same name cannot be usedtwice for different elements of the same type). This routine does not checkthose conditions.

    The method

    • NamingUtils.CompareNames(string nameA, string nameB)

    compares the input two names according tothe comparison rules in Revit. The method returns a negative value ifnameA comes before nameB, zero if nameA is equivalent to nameB,and a positivevalue if nameA comes after nameB. The method is similar to String.Compare(),but uses Revit rules for comparison.  This involves breaking the namesinto alphabetic and numeric tokens and comparing tokens individually.

    DynamicModel Update additions

    The new methods:

    • UpdaterRegistry.EnableUpdater()
    • UpdaterRegistry.DisableUpdater()
    • UpdaterRegistry.IsUpdaterEnabled()

    allow temporary enable and disable of Updaters.  Thisallows an application to control whether an updater is triggered unnecessarilybased on changes the application knows about.

    CustomExporter additions

    The new method:

    • CustomExporter.IsRenderingSupported()

    allows an application to test that libraries necessary tosupport rendering and 3D exports are installed and available.

    UI APIadditions

    Drag& drop API

    The new interface

    • IControllableDropHandler

    inherits from IDropHandler.  This includes an extrainterface to be executed when custom data is dragged and dropped onto the Revituser interface.  This interface is different from IDropHandler in that itallows the handler to verify whether the drop event can be executed on thegiven view.

     The new interface method

    • IControllableDropHandler.CanExecute(UIDocument document, object data, ElementId dropViewId)

     Implement this method to inform Revit whether thedrop event can be executed onto the given view.


  • 相关阅读:
    请求浏览器使用chrome查看http请求
    输入数据问题一百一十二:C语言合法标识符(2)
    方法调用代理代码改进
    串字符串问题一百一十三:Palindromes _easy version
    删除系统Win7系统盘越来越小,系统盘清理技巧
    配置编译linux下QT程序编译时的错误:QMAKESPEC has not been set, so configuration cannot be deduced.
    整数实例java处理大整数
    触发器课程SQL Server 知识梳理九 触发器的使用
    输出整数回溯法解决素数环
    类注解Spring注解自动注入Bean
  • 原文地址:https://www.cnblogs.com/lcchuguo/p/4512536.html
Copyright © 2020-2023  润新知