C# Class Revit.SDK.Samples.BeamAndSlabNewParameter.CS.Command

Inheritance: IExternalCommand
Afficher le fichier Open project: AMEE/revit

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
AccessOrCreateExternalSharedParameterFile ( ) : DefinitionFile

Access an existing or create a new shared parameters file

Method Details

Execute() public méthode

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.
Résultat Autodesk.Revit.UI.Result

FindElement() public méthode

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
Résultat void

SendValueToListBox() public méthode

Display the value of Unique ID parameter in a list box
public SendValueToListBox ( ) : ArrayList
Résultat System.Collections.ArrayList

SetNewParameterToBeamsAndSlabs() public méthode

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
Résultat bool

SetValueToUniqueIDParameter() public méthode

Set value(uuid) to Unique ID parameter
public SetValueToUniqueIDParameter ( ) : void
Résultat void