mirror of
https://github.com/jeremytammik/RevitSdkSamples.git
synced 2026-08-06 05:01:35 +00:00
39 lines
3.6 KiB
Plaintext
39 lines
3.6 KiB
Plaintext
{\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\froman\fprq2\fcharset0 Times New Roman;}}
|
|
{\colortbl ;\red0\green0\blue255;}
|
|
\viewkind4\uc1\pard\ltrpar\nowidctlpar\b\f0\fs20 Application:\b0 BeamAndSlabNewParameter\line\b Revit Platform:\b0 All\line\b Revit Version:\b0 2011.0\line\b First Released For:\b0 9.0\line\b Programming Language:\b0 C#\line\b Skill Level:\b0 Medium\line\b Category:\b0 Parameters\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Shared parameter.\line\b Summary:\b0 \line This sample demonstrates how to add a shared instance parameter to beams and slabs, and uses GUID as the parameter\rquote s value. Users also can use the value of the parameter to find the special element.\par
|
|
\par
|
|
\b Classes:\b0 \par
|
|
\pard\ltrpar\nowidctlpar\fi360 Autodesk.Revit.UI.IExternalCommand \par
|
|
Autodesk.Revit.DB.DefinitionFile \par
|
|
Autodesk.Revit.DB.DefinitionGroups\par
|
|
Autodesk.Revit.DB.DefinitionGroup\par
|
|
Autodesk.Revit.DB.Definitions\par
|
|
Autodesk.Revit.DB.Definition \par
|
|
Autodesk.Revit.DB.CategorySet \par
|
|
Autodesk.Revit.DB.InstanceBinding\par
|
|
Autodesk.Revit.DB.Parameter\par
|
|
Autodesk.Revit.UI.Selection.SelElementSet\par
|
|
\pard\ltrpar\nowidctlpar\par
|
|
\b Project Files:\b0 \par
|
|
BeamAndSlabNewParameter.cs\par
|
|
\pard\ltrpar\nowidctlpar\li360\tx720 This is the main DLL source file. It contains the class Command which implements the interface IExternalCommand and implements adding shared parameter, storing GUID values and finding element functionality.\par
|
|
\pard\ltrpar\nowidctlpar\par
|
|
BeamAndSlabNewParameterForm.cs\par
|
|
\pard\ltrpar\nowidctlpar\li360\tx720 This file contains a class BeamAndSlabNewParameterForm that provides the user alternant UI.\par
|
|
\pard\ltrpar\nowidctlpar\par
|
|
\b Description:\b0 \cf1\par
|
|
\pard\ltrpar\nowidctlpar\fi-357\li357\tx357\cf0 -\tab The adding shared parameter functionality in this sample is corresponding to \ldblquote Manage->Project Parameters...->Add->Shared parameter (Radio button) ->Select\rdblquote in Revit main program. If you want more detailed information about Shared parameter please refer to \ldblquote Setting up Shared Parameters\rdblquote topic in Revit help document.\f1\par
|
|
\pard\ltrpar\nowidctlpar\fi-357\li357\f0 -\tab The shared parameter named Unique ID should be added to the Structural Framing and the Floor categories, so it can cover both beams and slabs. And then the Unique id should be set to a system generated UUID.\par
|
|
-\tab The shared parameter should reside in a file named MySharedParameters.txt and in a parameter group named MyParameters. If the file does not exist it should be created. If it does exist then it should be reused.\par
|
|
-\tab Display, in a list box, the value of the Unique ID parameter if present for all the selected elements. \par
|
|
-\tab The element should be found by the GUID which was listed in the list box. And in this sample we add the found element into the SelElementSet (Document.Selection.Elements) to let it highlight.\par
|
|
\pard\ltrpar\nowidctlpar\par
|
|
\b Instructions:\cf1\b0 \cf0\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360 1.\tab Draw a beam and a slab in the Revit and then run the command.\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li360 2.\tab First click the Add button in this sample UI.\par
|
|
3.\tab After return to Revit select some beams and slabs.\par
|
|
4.\tab Then run this command again and click Display Value button.\par
|
|
5.\tab Select one item in left ListBox then click Find button. \par
|
|
6.\tab Expected result: return to Revit main program. The corresponding element whose Unique ID is same to the selected item will be highlighted.\par
|
|
}
|
|
|