Add-ins can invoke this dialog to collect the name and id of a Green Building Studio project and the name of an analysis run from the user. When the user chooses these values and opts to Continue, control returns the add-in to use the values the user has selected. No Green Building Studio run is automatically invoked by the user's actions in the dialog when it is prompted by the add-in.
This class can be instantiated only when the user is logged in to their Autodesk account.Note that to improve usability, the behavior of this option has some added intelligence
beyond simply checking whether the element is pinned. For example, if a model group is pinned,
the corresponding attached detail group is not selectable if selection of pinned elements is
disabled. To check whether a particular element is pinned for purposes of this setting, see
These settings are per user and will affect the selection behavior in all projects and families. The settings are not stored in the project.
If all links succeeded in loading, the function does nothing. If any links failed to load, this function will display the Unresolved References dialog, giving the user the option to open the Manage Links dialog to correct any problems.
To ensure the dialog fits on the screen, Revit will only list up to ten link names. Additional links will be mentioned as, "And >number< additional links." This is the same behavior Revit's user interface uses.
A map from the display name of a link to the LinkLoadResult for that link.
This method will be called automatically by Revit after the external resource load process is complete.
Note that automatic loads can occur in the context of other operations such as opening a file. During automatic loads, it is therefore recommended that the server only display UI that is critical for the user to see (such as error message).
The loading operation type is Explicit when the user is specifically trying to reload the resource. During explicit loads, it may be desirable to provide more feedback to the user, such as specific feedback that the load operation succeeded.
The loading operation type can be accessed through
Note that providing messages and other UI feedback for Revit links is more complicated, because links can be nested. The UI server may wish to provide different messages and take different actions, depending on whether a link loaded from the DB server was a "top-level" link, or was nested. For example, while it may be possible to correct an error that occurred with a top-level link by loading it directly, this cannot be done with a nested link, as Revit will throw an exception.
To complicate things further, the same Revit document may appear more than once in a tree of nested links, and the UI server should avoid repeatedly posting the same message for instances of that document.
To help UI servers handle situations where a nested tree of links is loaded:
The ExternalResourceLoadData contains a property, ErrorsReported, which the server can use to indicate whether it handled any errors for the resource.
For Revit links specifically, Revit will check this value to see if it should report errors about a given link in the Unresolved References dialog. An IExternalResourceUIServer can set this value to true to avoid redundant messages.
Note that it is possible for Revit to encounter errors internally even if the server successfully provides a reference. In general, this value should only be set to true if the server has reported an error condition.
This method will be called automatically by Revit after the external resource load process is complete.
Note that automatic loads can occur in the context of other operations such as opening a file. During automatic loads, it is therefore recommended that the server only display UI that is critical for the user to see (such as error message).
The loading operation type is Explicit when the user is specifically trying to reload the resource. During explicit loads, it may be desirable to provide more feedback to the user, such as specific feedback that the load operation succeeded.
The loading operation type can be accessed through
Note that providing messages and other UI feedback for Revit links is more complicated, because links can be nested. The UI server may wish to provide different messages and take different actions, depending on whether a link loaded from the DB server was a "top-level" link, or was nested. For example, while it may be possible to correct an error that occurred with a top-level link by loading it directly, this cannot be done with a nested link, as Revit will throw an exception.
To complicate things further, the same Revit document may appear more than once in a tree of nested links, and the UI server should avoid repeatedly posting the same message for instances of that document.
To help UI servers handle situations where a nested tree of links is loaded:
The ExternalResourceLoadData contains a property, ErrorsReported, which the server can use to indicate whether it handled any errors for the resource.
For Revit links specifically, Revit will check this value to see if it should report errors about a given link in the Unresolved References dialog. An IExternalResourceUIServer can set this value to true to avoid redundant messages.
Note that it is possible for Revit to encounter errors internally even if the server successfully provides a reference. In general, this value should only be set to true if the server has reported an error condition.
IExternalResourceUIServer is the UI server associated with IExternalResourceServer. IExternalResourceServer provides an interface for loading an external resource (such as a Revit link or the keynote data) from a source outside of Revit. IExternalResourceUIServer provides an interface for displaying the results of such an operation to the Revit user.
IExternalResourceUIServers must be associated with an IExternalResourceServer in order
to display any UI. Implement
The primary method in IExternalResourceUIServer is
The ExternalResourceLoadData passed to HandleLoadResourceResults will also contain a GUID to uniquely identify the load request. This identifier can help IExternalResourceUIServers query their IExternalResourceServers for additional information about errors that occurred during specific load operations. Particularly, the IExternalResourceUIServer may wish to ask the IExternalResourceServer about errors which Revit is not aware of. For example, if the IExternalResourceServer includes a website and the user is not logged in, Revit will not have any information about this error.
If an existing FilterElement id was set during construction of the object or through the FilterToSelect property, that FilterElement will be selected for editing.
If a new filter name was set during construction of the object or through the NewFilterName property, a new ParameterFilterElement will be created and that new element will be selected for editing. If this option was chosen, the id of the explicitly create new filter will be stored in the NewFilterId property.
Note that the user may opt to add, delete or edit any of the available filter elements (or make no changes at all). To monitor which filters have been changed, use other Revit API mechanisms such as Dynamic Update or the DocumentChanged event.
This would typically be a name derived by the application that matches the purpose of the save operation it intends to do. The user is permitted to alter the initial file name.
If the extension is not included, the file would be given the selected file extension for the active filter (when saved). If the extension is included, it will be ignored if the extension does not match one of the possible filter extensions. When not set, the file name entry field in the dialog will be blank and the user will have to enter a file name.
The behavior and appearance of this dialog matches the Revit "Save as" dialog. This is a general-purpose dialog for saving any given file type, and the Options shown in the dialog for Revit projects and families will not be shown. To prompt the user to save the active Revit document specifically, use UIDocument.SaveAs(UISaveAsOptions) instead.
The user will be requested to select or enter a file name matching the corresponding filter. If an existing file is selected, there will be a default prompt about overwriting the file shown, where the user can confirm or cancel this file selection.
The folder location shown when the dialog is displayed defaults to the most recently used file location for saving or exporting.
Use of this dialog does not actually save an existing file, but it will provide the selected file path back to the caller to take any action necessary.
The behavior and appearance of this dialog matches the Revit "Open" dialog. This is a general-purpose dialog for opening any given file type, and options to configure settings like worksharing options will not be included.
The user will be prompted to select an existing file that matches one of the provided filters. The user may not enter a file name that does not exist.
The folder location shown when the dialog is displayed defaults to the most recently used file location for opening or importing.
Use of this dialog does not actually open an existing file, but it will provide the selected file path back to the caller to take any action necessary.
This method loads the add-ins listed in the provided add-in manifest file. The API will look for the file in the dedicated folders supported by Revit for loading add-in manifest files.
Some add-ins may have settings in which they decline the ability for Revit to load the external application declared in the .addin in mid-session. This happens when the AllowLoadingIntoExistingSession tag is set to "No" in the add-in manifest file, and if the tag isn't present, the default is set to "Yes".
Note that when Revit starts an add-in in the middle of the session, some add-in logic may not function as expected
because of the different interactions with the session. Specifically:
Also, some add-ins may not be able to fully initialize when loading in the middle of the session. This is because some
activities must take place at the start of the Revit session:
This method opens its own transaction, so it's not permitted to be invoked in an active transaction. In a single invocation, the user can place only one view onto the active sheet.
The user is not permitted to change the active sheet view or the view to be placed during this placement operation (the operation will be cancelled).
The user can cancel the placement operation by pressing Cancel or ESC or a click elsewhere in the UI.
This method can't be used to place a schedule on a sheet.
Use
If true, the viewport representing this view will be replaced by the new viewport created during placement. If the view is allowed only to be on one sheet, this will remove the viewport from the old sheet. If the view is allowed to be on multiple sheets, and the view is currently placed on the active sheet, the old viewport on this sheet will be replaced.
If false, if the view is only allowed to be on one sheet, or if the view is allowed to be on multiple sheets but is already on the active sheet, an exception will be thrown.This method opens its own transaction, so it's not permitted to be invoked in an active transaction. In a single invocation, the user can place multiple instances of the input family type until they finish the placement (with Cancel or ESC or a click elsewhere in the UI). The user will not be permitted to change the type to be placed. Users are not permitted to change the active view during this placement operation (the operation will be completed).
This method differs from
This method opens its own transaction, so it's not permitted to be invoked in an active transaction. In a single invocation, the user can place multiple instances of the input family type until they finish the placement (with Cancel or ESC or a click elsewhere in the UI). The user will not be permitted to change the type to be placed. Users are not permitted to change the active view during this placement operation (the operation will be completed).
This method differs from
This class represents a document opened in the user interface and therefore offers interfaces to work with settings and operations in the UI (for example, the active selection). Revit can have multiple projects open and multiple views to those projects. The active or top most view will be the active project and hence the active document which is available from the UIApplication object.
Obtain the database level Document (which contains interfaces not related to the UI) via the Document property. If you have a database level Document and need to access it from the UI, you can construct a new UIDocument from that object (the document must be open and visible in the UI to allow the methods to work successfully).
This method loads the add-ins listed in the provided add-in manifest file. The API will look for the file in the dedicated folders supported by Revit for loading add-in manifest files.
Some add-ins may have settings in which they decline the ability for Revit to load the external application declared in the .addin in mid-session. This happens when the AllowLoadingIntoExistingSession tag is set to "No" in the add-in manifest file, and if the tag isn't present, the default is set to "Yes".
Note that when Revit starts an add-in in the middle of the session, some add-in logic may not function as expected
because of the different interactions with the session. Specifically:
Also, some add-ins may not be able to fully initialize when loading in the middle of the session. This is because some
activities must take place at the start of the Revit session:
This method loads the add-ins listed in the provided add-in manifest file. The API will look for the file in the dedicated folders supported by Revit for loading add-in manifest files.
Some add-ins may have settings in which they decline the ability for Revit to load the external application declared in the .addin in mid-session. This happens when the AllowLoadingIntoExistingSession tag is set to "No" in the add-in manifest file, and if the tag isn't present, the default is set to "Yes".
Note that when Revit starts an add-in in the middle of the session, some add-in logic may not function as expected
because of the different interactions with the session. Specifically:
Also, some add-ins may not be able to fully initialize when loading in the middle of the session. This is because some
activities must take place at the start of the Revit session:
This method opens its own transaction, so it's not permitted to be invoked in an active transaction. In a single invocation, the user can place only one view onto the active sheet.
The user is not permitted to change the active sheet view or the view to be placed during this placement operation (the operation will be cancelled).
The user can cancel the placement operation by pressing Cancel or ESC or a click elsewhere in the UI.
This method can't be used to place a schedule on a sheet.
Use
If true, the viewport representing this view will be replaced by the new viewport created during placement. If the view is allowed only to be on one sheet, this will remove the viewport from the old sheet. If the view is allowed to be on multiple sheets, and the view is currently placed on the active sheet, the old viewport on this sheet will be replaced.
If false, if the view is only allowed to be on one sheet, or if the view is allowed to be on multiple sheets but is already on the active sheet, an exception will be thrown.This method opens its own transaction, so it's not permitted to be invoked in an active transaction. In a single invocation, the user can place multiple instances of the input family type until they finish the placement (with Cancel or ESC or a click elsewhere in the UI). The user will not be permitted to change the type to be placed. Users are not permitted to change the active view during this placement operation (the operation will be completed).
This method differs from
This method opens its own transaction, so it's not permitted to be invoked in an active transaction. In a single invocation, the user can place multiple instances of the input family type until they finish the placement (with Cancel or ESC or a click elsewhere in the UI). The user will not be permitted to change the type to be placed. Users are not permitted to change the active view during this placement operation (the operation will be completed).
This method differs from