C# Класс Revit.SDK.Samples.BeamAndSlabNewParameter.CS.Command

Наследование: IExternalCommand
Показать файл Открыть проект

Открытые методы

Метод Описание
Execute ( Autodesk revit, string &message, ElementSet elements ) : Autodesk.Revit.UI.Result

Implement this method as an external command for Revit.

FindElement ( string UniqueIdValue ) : void

found the element which using the GUID that was assigned to the shared parameter in the shared parameters file.

SendValueToListBox ( ) : ArrayList

Display the value of Unique ID parameter in a list box

SetNewParameterToBeamsAndSlabs ( ) : bool

Add a new parameter, "Unique ID", to the beams and slabs The following process should be followed: Open the shared parameters file, via the Document.OpenSharedParameterFile method. Access an existing group or create a new group, via the DefinitionFile.Groups property. Access an existing or create a new external parameter definition, via the DefinitionGroup.Definitions property. Create a new Binding with the categories to which the parameter will be bound using an InstanceBinding or a TypeBinding. Finally add the binding and definition to the document using the Document.ParameterBindings object.

SetValueToUniqueIDParameter ( ) : void

Set value(uuid) to Unique ID parameter

Приватные методы

Метод Описание
AccessOrCreateExternalSharedParameterFile ( ) : DefinitionFile

Access an existing or create a new shared parameters file

Описание методов

Execute() публичный Метод

Implement this method as an external command for Revit.
public Execute ( Autodesk revit, string &message, ElementSet elements ) : Autodesk.Revit.UI.Result
revit Autodesk An object that is passed to the external application /// which contains data related to the command, /// such as the application object and active view.
message string A message that can be set by the external application /// which will be displayed if a failure or cancellation is returned by /// the external command.
elements ElementSet A set of elements to which the external application /// can add elements that are to be highlighted in case of failure or cancellation.
Результат Autodesk.Revit.UI.Result

FindElement() публичный Метод

found the element which using the GUID that was assigned to the shared parameter in the shared parameters file.
public FindElement ( string UniqueIdValue ) : void
UniqueIdValue string
Результат void

SendValueToListBox() публичный Метод

Display the value of Unique ID parameter in a list box
public SendValueToListBox ( ) : ArrayList
Результат System.Collections.ArrayList

SetNewParameterToBeamsAndSlabs() публичный Метод

Add a new parameter, "Unique ID", to the beams and slabs The following process should be followed: Open the shared parameters file, via the Document.OpenSharedParameterFile method. Access an existing group or create a new group, via the DefinitionFile.Groups property. Access an existing or create a new external parameter definition, via the DefinitionGroup.Definitions property. Create a new Binding with the categories to which the parameter will be bound using an InstanceBinding or a TypeBinding. Finally add the binding and definition to the document using the Document.ParameterBindings object.
public SetNewParameterToBeamsAndSlabs ( ) : bool
Результат bool

SetValueToUniqueIDParameter() публичный Метод

Set value(uuid) to Unique ID parameter
public SetValueToUniqueIDParameter ( ) : void
Результат void