Autodesk 2013 英文版产品在美国当地时间3月27日发布。如果你是ADN,可以到ADN网站下载。如果不是ADN可以到Autodesk官方网站下载试用版。http://usa.autodesk.com/revit/trial/
在产品中就包含SDK,下载下来体验Revit的新功能吧。一睹最新API的功能吧!
All Revit components including RevitAPI.dll and RevitAPIUI.dll are now built with the .NET 4.0 compiler. Thus, add-in projects which reference Revit DLLs must be set as .NET 4.0 Framework projects as well.
Because currently available VSTA components do not yet support .NET 4.0, access to VSTA through the Revit user interface has been removed for this prerelease version.
Add-ins will no longer be read from Revit.ini. Revit will look only to .addin files in the machine-wide and user-specific locations when deciding what add-ins to load.
The indexed properties:
have been replaced by methods:
The old indexed properties have been marked obsolete.
The behavior for the new methods is identical to what they replaced.
With a few exceptions, API methods using ElementArray and ElementSet have been replaced with equivalents using .NET generic collections of ElementIds (ICollection<ElementId>).
Some APIs have been obsoleted with no replacement; these methods are batch element creation methods which dated to the time when regeneration was automatic after every database change. Now that regeneration is manual, having separate batch creation methods provides no extra benefit as multiple element creation calls can be chained together with no delay caused by regeneration. Thus these methods are obsolete:
When replacing calls to these methods, you should use the corresponding creation method which creates a single element in a loop, while delaying calls to Regenerate() until the loop has concluded. Because Regenerate() is delayed, you should not make inquiries to the newly created elements' geometry as a part of the loop.
These classes used to inherit from base classes consisting of old-style Revit API collections. The new versions of the classes offer the same functionality, but implement System.Collections.Generic.IEnumerable<T>.
Code which referred to the older base class or its associated iterator will need to be changed to access members through iteration or the now-available LINQ methods.
In addition, code which called ForwardIterator() or ReverseIterator() on these classes will need to be changed as the new version of the class does not offer these two legacy methods.
The property
has been obsoleted. GeometryElement now inherits directly from IEnumerable<GeometryObject>, and it possible to directly iterate the contents of the GeometryElement using .NET and LINQ, if needed.
New wall creation APIs have been provided as a part of the Wall class:
These methods replace the obsolete methods on Autodesk.Revit.Creation.Document (NewWall() (all overloads)). The NewWalls() overloads are obsoleted without dedicated replacements, as described here: ElementArray and ElementSet are now obsolete
The Idling event has been changed to offer two different modes of behavior. The default behavior has changed; pre-existing code that needs the original behavior will need to opt-in to the non-default behavior.
In the default mode, a single raise of the event will be made each time Revit begins an idle session. Note that when the user is active in the Revit user interface, idle sessions begin whenever the mouse stops moving for a moment or when a command completes. However, if the user is not active in the user interface at all, Revit may not invoke additional idling sessions for quite some time; this means that your application may not be able to take advantage of time when the user leaves the machine completely idle for a period of time.
In the non-default mode, your application forces Revit to keep the idling session open and to make repeated calls to your event subscriber. In this mode even if the user is totally inactive the Revit session will continue to make Idling calls to your application. However, this can result in performance degradation for the system on which Revit is running because the CPU remains fully engaged in serving Idling events during the Revit application's downtime.
You can indicate the preference for the non-default Idling frequency by calling
each time the Idling event callback is made. Revit will revert to the default Idling frequency if this method is not called every time in your callback.
The Idling event now is invoked when there is no document active in Revit.
The External Events framework is a new API framework tailored for asynchronous processing such as that which is needed to support modeless dialogs. It operates similarly to the Idling event with default frequency.
With this framework, instead of implementing an event handler and implementing the handler to do nothing when there is no activity in your dialog, instead you do the following:
This framework is more useful for modeless dialog developers because you can skip the default no-op implementation when nothing has happened, and tell Revit when there is some work you need to do in Revit. It also saves on the time required for Revit to make repeated calls to the Idling event when there is no actual work to be done.
The UIApplication.OpenAndActivateDocument can now be invoked during events under the following conditions:
The information required to identify a workshared file on the central or local locations have changed due to changes to RevitServer. As a result, the members
replace the properties
The new members:
provides read access to the worksharing central GUID of the given server-based model. This is applicable only to workshared models saved in Revit 2013 or later.
The new overloads support parameters OpenOptions and OpenOptionsForUI, respectively, to specify how a Revit document should be opened. Both options classes currently offer the ability to detach the opened document from central if applicable.
The property:
The property:
The new class
Because these are new methods in a pre-existing interface, existing code will have to be modified to implement the methods.
Unlike other Point Cloud interfaces in the Revit 2012 release, this interface did not offer a method to be called when Revit is finished with it.
When Revit calls this function it indicates that the IPointCloudAccess interface is no longer going to be used and the provider of the interface can dispose of all allocated resources.
Implement this method to return the offset stored in the point cloud. All points are assumed to be offset by the same offset vector. The offset should be expressed in the same units as used by the point coordinates (the scale conversion factor is not applied). The offset will be used by Revit if the user choose to place an instance relative to another point cloud (the "Auto - Origin To Last Placed" placement option).
A second overload with an additional argument – density – the desired number of points per unit area. Area is computed in native units of the point cloud.
The IFC export implementation in Revit has switched to a more generic toolkit. As a result, many of the APIs introduced in Revit 2012 to support customized IFC export have been removed and replaced, and new interfaces introduced that allow more flexibility in the data which is written to the IFC file. Autodesk recommends that any customization of IFC export begin with the implementation of the default Revit IFC exporter client, and that customizations written for 2012 be ported incrementally to support Revit 2013.
The following members are now obsolete:
The following members are now obsolete - they are not being replaced with new members because the information they returned can be obtained by applying GetSourceElementIds recursively to source elements that are Parts.
The following members are obsolete. Their replacements live on the PartMakerMethodToDivideVolumes class, which you can obtain for a given PartMaker using PartUtils.GetPartMakerMethodToDivideVolume():
The methods:
The overload taking one argument is now obsolete.
The new three-argument Rebar.GetCenterlineCurves(Boolean, Boolean, Boolean) has arguments to control whether or not to:
These members are now obsolete:
The new RebarInSystem element replaces the BarDescription class. This class and related methods:
are obsolete in 2013.
When ReinforcementSettings.HostStructuralRebar is true, Area and Path Reinforcement elements create individual rebar elements that participate in views and schedules. The individual RebarInSystem elements have the same graphical representation and parameters as Rebar elements, and have the same API methods for inquiry. But the RebarInSystem elements are almost entirely controlled by their system element (Area or Path). Therefore they are missing most of the modification methods of the Rebar class.
New methods:
ConnectorProfileType enums are renamed to:
Invalid, Round, Rectangular, Oval
PartType::UndefinedPartType is renamed to PartType::Undefined.
Subclasses of ConnectorElement: PipeConnector, DuctConnector, and ElectricalConnector, are obsolete.
Connector element types can now be created using new methods:
These methods replace the methods on Autodesk.Revit.Creation.FamilyItemFactory (NewDuctConnector, NewPipeConnector, NewElectricalConnector). Those methods are now obsolete.
Many API classes and methods previously marked Obsolete in Revit 2012 and earlier have been removed from the API.
The new classes in the Autodesk.Revit.DB.Architecture namespace:
provide access to new stairs elements in the Revit database. Note that these API classes only provide access to the Stairs created "by component" introduced in this release. Stairs elements created by sketch cannot be accessed as a Stairs object in the API. It is possible to identify both type of stairs using the BuiltInCategory OST_Stairs and the static method Stairs.IsByComponent() can identify an element id represents a by component stairs.
The classes:
provide access to the subcomponents and subcomponent types of the new Stairs elements.
The new classes in the Autodesk.Revit.DB.Architecture namespace:
provide access to the top level railing elements in the Revit database. Railings can be associated to a host, such as a stairs or a floor, or placed in space. Railings can be continuous or non-continuous. If non-continuous, only a limited level of access is provided.
The new class
provides access to the properties and capabilities of a CutMark annotation which can be associated to stairs.
The new classes
provide access to the stairs path annotation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The enum DisplayStyle (with values including Wireframe, HLR, and Shading) has been added so the API can be used to get/set the new DisplayStyle property.
The enum ViewDetailLevel (with values Coarse, Medium, and Fine) has been added with get/set access to the new DetailLevel property.
The view range for plan views can now be retrieved via ViewPlan.GetViewRange().
Views can now be duplicated via the API with the View.Duplicate(ViewDuplicateOption) method.
The UIView class has been added to represent a view window in the Revit user interface. GetOpenUIViews provides a list of all open views. UIView.GetWindowRectangle() returns a rectangle that describes the size and placement of the UIView window.
The method
offers the ability to zoom and pan the active view to center on the input region of the model.
The method
returns the two points that define the corners of the view's rectangle in model coordinates.
The enum PlanViewDirection has been added so API can be used to get/set the view direction to either Up or Down for StructuralPlan views.
The ViewFamilyType class has been created to correspond to the Types seen in the UI's Properties dialog for each view. The ViewFamily enum (FloorPlan, Section, Legend, etc) specifies the family of the ViewFamilyType.
View.EnableRevealHiddenMode, View.EnableTemporaryAnalyticalDisplayMode, View.DisableTemporaryViewMode, and the TemporaryViewMode Enumeration have been added to allow control of temporary view modes.
Several new classses have been added to allow schedule views to be created, modified, and added to drawing sheets. Major new classes include:
API commands may now be active when a Schedule is active in the current document.
The ViewSchedule class has been added to the API and the method ViewSchedule.Export method exports an existing schedule to a a text file.
The properties:
provide read and modify access to the available disciplines. Your application can read the properties to determine when to enable or disable aspects of the UI.
Enabling and disabling disciplines is available only in Autodesk Revit (and not in any other Revit product). When a discipline's status is toggled, Revit's UI will be adjusted, and certain operations and features will be enabled or disabled as appropriate.
The settings shown in the Rendering Options Dialog are exposed, allowing an API user can get and set Rendering Options for a 3d view.
The new methods:
gets or changes the rendering settings for the 3d view.
The class
offers properties and methods which correspond to the options in the UI dialog:
The rendering properties are exposed with the following supplementary classes and enums:
Example: checking rendering options for a 3D view
|
Parts can be created from linked elements. There are new overloads:
which accept LinkElementIds (representing the id of the element in the link). The existing Part utilities accepting ElementId have not been changed.
The methods:
provide support for merging of parts.
The new property
allows identification and assignment of parts to be excluded.
The new members:
provide the ability to get and set the original category id for a given part.
Part divisions can now be assigned custom geometry divisions. The members:
offer the ability to examine and control properties of the divisions.
The method
transfers the assembly views owned by a source assembly instance to a target sibling assembly instance of the same assembly type.
The methods
provide read and write access to the transformation origin of the assembly. Changing this value causes the origin point to change relative to the assembly members (and does not move the assembly members). All assemblies of the same type should have changed their transforms by the same amount. For example, if you changed the transform of the assembly by a rotation of 90 degrees, then other assemblies should also have rotated their transform by 90 degrees.
The inherited property
also has been modified to return a the location for an AssemblyInstance.
The new class ReinforcementSettings controls project settings that are accessible from the Reinforcement Settings dialog in the Revit UI. For 2013 the only supported setting is the HostStructuralRebar property, which is new for 2013 and affects the AreaReinforcement and PathReinforcement elements.
AreaReinforcement and PathReinforcement now have types.
The types - AreaReinforcementType and PathReinforcementType - contain only identity data.
There is no change to the interface for creating Area and Path Reinforcement elements. A default, or most-recently-used type, is automatically assigned on element creation.
New Area- and PathReinforcementTypes can be created using the following methods:
The new element type
can be created between two other Analytical Elements, e.g. an analytical beam and analytical column. There are two kinds of Links: user defined and automatically generated. Links have properties like "fixity state" that can be accessed via the API.
Revit MEP now supports a system for selecting preferred pipe and duct sizes, materials, and fitting types for use in an MEP project. The routing preferences API can be used to set routing preference policies for end users as well as to query which fittings and segments will be used given size criteria.
The new class
is the base class for duct and pipe section. It is a series of connected elements (segments - ducts or pipes, fittings, terminals and accessories). All section members should have same flow analysis peroperties: Flow, Size, Velocity, Friction and Roughness. One section member element which contains more than one connector can belongs to multiple section.
For example: One Tee fitting thathas 3 connectors usually belongs to 3 sections. One segment that connects to a tap will be divided into 2 sections
The new class
represents the viscosity and density properties as defined at a certain temperature.
The class
has been extended to provide read and write access to a collection of FluidTemperature objects which represent the fluid's properties at various temperatures.
The new functions
provide access to the parameter values of spare circuits.
New overloads of
have been added to supply the user-visible string matching members of the enums DuctLossMethodType, PipeLossMethodType, and PipeFlowState.
Thermal properties of various elements have been enhanced in Revit 2013.
This class is a property on the following types:
·
This class is a property on Door, Window, and Curtain Panel family symbols
All compound structurals can now elect one layer in the structural to be used as the "structural" layer.
Items placed on the Ribbon can now be assigned an action for contextual help using
The options supported include linking to an external URL, launching a locally installed help file, or linking to a topic on the Autodesk help wiki.
You can also invoke the same set of contextual help options at any arbitrary time within your add-in by creating a ContextualHelp object with the appropriate target location, and invoking
API commands may now be assigned keyboard shortcuts, and those assignments will be preserved even if add-ins are added, removed or changed in subsequent sessions.
API commands may also be moved to the Quick Access Toolbar, and that assignment will also be preserved even if add-ins are added, removed or changed in subsequent sessions.
It provides ability to replace the existing Revit command (located in any tab, application menu and right-click menus) implementation with add-in routine.
The new class RevitCommandId provides ability to look up and retrieve an object representing Revit Command id given an id string. The id string of the command is the string which appears in the journal when the command is clicked, e.g. "ID_APP_EXIT".
The new class AddInCommandBinding provides ability to override the Revit command implementation with Executed and CanExecute events.
These 2 new methods provides ability to create the command binding with given Revit command id.
The new class
provides the ability to embed an interactive Revit view as a WPF control inside a dialog.
Subscribe to the new event
to be notified when Revit is preparing the Options dialog for display. During the event callback, your application can call
to add a new tab to the dialog. The contents of the panel shown when this new tab is selected are determined by the members assigned to the input class:
The new methods
initiate a drag and drop operation on the Revit user interface.
The first method accepts a list of file names, which can be Revit files, import CAD and images, or some combination of the two. The second method accepts arbitrary data, and provides an IDropHandler callback to handle the drop of the data when the user completes it.
Several updates have been made to the APIs related to data exchange and translation of models.
The new method
supports import of DGN files into Revit views.
The method
now also supports DXF files for import.
The options supported for DWG and DXF export have been expanded. A new base class
supports all properties shared by DWG/DXF & DGN export tasks. New properties include:
The options supported for DGN export have changed to match the new implementation of DGN export based on DWG supporting DGN V8. The previously existing class
thus offers many new properties inherited from the same base classes as DWGExportOptions.
The property
has been replaced with:
Three new options have been added:
A DividedPath is an element supported in the massing environment that consists of a set of points distributed along a connected set of curves and edges. The points can be the result of a uniform distribution along the curves. The type of the distribution is determined by a selected 'layout'. The distance between the layout points depends on the curves, the layout, and layout specific settings. In addition, points can also be the result of intersecting the curves with other elements.
The class
exposes the interface for this element type. It permits creation of a new DividedPath from input curves and edges, as well as optionally, intersecting elements. It allows control over the layout type and parameters, as well as other miscellaneous settings.
The following additions have been made to support deformed shapes in analysis visualization display:
A new override to CreateAnalysisDisplayStyle accepts an input argument of AnalysisDisplayDeformedShapeSettings
The API now contains two creation methods for Revit links.
The class
has been extended to offer the ability to create Filled regions, to get the boundaries of the region, and to apply a linestyle to all boundary segments.
The class
has been added providing access to the visible properties of a filled region type.
The classes
have been added to offer the ability to get and set photometric data and all other lighting parameters from both family instances in project documents and all family types in family documents. The LightType and LightFamily classes expose the same data except for light shape and distribution types which are only available from the LightFamily class.
Some examples of lighting parameters exposed are;
The classes
have been added to offer the ability to manage light groups to allow control over which lights are used when rendering the scene.
The LightGroupManager class gives the user the ability to
The LightGroup class gives the user the ability to
Light groups are used in rendering options to turn lights on or off when rendering.
The new class ReferenceIntersector allows ray-cast selection of elements, given a point and direction, similar to FindReferencesWithContextByDirection(), but with support for filtering the output based on element or reference type.
The enum FindReferenceTarget is used with ReferenceIntersector to filter selection of elements, meshes, edges, curves, and faces.
Key members of ReferenceIntersector
These readonly properties have been obsoleted and replaced with read/write properties:
The new method Element.AllowsPhases() indicates whether these phase id properties can be modified for any given element.
The new class
and related types support read/write and create access to phase filters.
The new class
provides access to a filter type which contains a selected set of element ids, rather than criteria based on parameters.
The newly exposed Ceiling class represents a ceiling in Revit. It inherits from CeilingAndFloor. The Floor class has been modified to also inherit from CeilingAndFloor.
The new method:
takes a solid which includes multiple disjoint enclosed volumes, and returns newly allocated Solids representing each volume. If no splitting was necessary, a copy of the input Solid is returned.
The new method:
generates a single triangulated structure for the given input Solid (which could one or more fully closed volumes, or a shell of faces which do not form a closed volume). The function returns:
which allows access to the stored triangulated components and triangles.
Note that for this prerelease version, the TriangulatedShellComponentContainmentInfo will not be populated.
Use the method:
with a TriangulationInterface object constructed from the TessellateSolidOrShell results to convert pairs of adjacent, coplanar triangles into quadrilaterals.
A new overload to Face.Triangulate() accepts a level of detail as an argument. Levels of detail close to 0 (the minimum) will result in coarser triangulations than levels of detail close to 1 (the maximum).
The new properties:
provide the unit vectors of the ellipse for the X and Y directions.
This new method provides read access to the bounding box of a given geometry element.
This method can now align a line and a reference plane as well as all other geometry types from previous versions.
A new subclass of Curve has been introduced: CylindricalHelix. The class offers methods useful for reading and creating such curves.
In this release, CylindricalHelix curves are used only in specific applications in stairs and railings, and should not be used or encountered when accessing curves of other Revit elements and geometry.
The members of a CurveLoop can now be traversed, as CurveLoop implements IEnumerable<Curve>.
The new property:
ModelCurve.ChangeToReferenceLine is now supported in all family types, not just conceptual modeling.
This new overload for NewSketchPlane in the ItemFactoryBase class supports creation of a sketch plane directly from a Reference representing a planar face.
This class has been added to the API to support multi-segment grids.
Element.Geometry now supports Grids and MultiSegmentGrids, including the ability to see gaps and extents applied to the grid lines to form different segments.
Revit now supports Diameter dimensions. The DimensionShape enumeration contains a new Diameter member. And there is a new creation method for diameter dimensions:
There are several new properties on DimensionSegment to override text properties.
These properties are also available on Dimension, for use with dimensions with just one segment.
The class
has been added providing the ability to affect the draw order of detail elements (including FilledRegions)
This class provides access to the "Room or Space Calculation Point" seen in families. The Spatial Element Calculation Point is graphically showed as a location point marker with a "snake" line from the origin of the family. If the Spatial Element Calculation Point is turned on, this point will be used as a search point for room and space relations for all instances of this family. The API offer creation, read and modification options for this object type.
The AssetType enum now contains a value "Content", which can be used to enumerate the loaded RPC content assets in the Revit session.
Some validation has been added to overloads of NewFamilyInstance(). This validation is intended to prevent use of the incorrect overload for a given family symbol input. For specific details on the exceptional conditions which
will be validated, consult the documentation.
This new property provides information about the placement type for instances of the given family. PlacementType roughly maps to the overloads of NewFamilyInstance.
The new DataStorage class represents an element which API applications can create logically organize different sets of ExtensibleStorage entities into separate elements. This allows an application to update one set of data in a local workshared project without locking other elements.
The ControlledApplication object now supports an ApplicationInitialized event, which is called once the Revit application is fully initialized, after all external applications have been started and when the application is ready to work with documents.
The application object now supports a ProgressChanged event and ProgressChangedEventsArgs object that returns progress bar data from time-consuming transactions.
The new property:
provides the place name of the site location.
Provides the full path to the default template file for new project documents
Many new units have been added to UnitType, DisplayUnitType and ParameterType.
One UnitType was renamed: UT_TemperalExp was renamed to UT_ThermalExpansion.
The corresponding ParameterType value (TemperalExp) was also renamed to ThermalExpansion.
The parameter to return the "True North" angle parameter "BASEPOINT_ANGLETON_PARAM" on the BasePoint object is now a double instead of a string.
Revit now activates a tool to collect and journal certain actions which take place in the user interface provided by an add-in. The tool supports actions in both WPF and Windows Forms dialogs.
Some actions and some components may not be fully recorded.
This capability is useful to Autodesk in the event that a journal can be supplied from a Revit user indicating the presence of a software problem. Replay of add-in UI via journals is not supported.