Files
RevitSdkSamples/snapshot/2010/SDK_2/Samples/TransactionControl/CS/ReadMe_TransactionControl.rtf
T
2024-12-12 10:25:07 +01:00

37 lines
4.1 KiB
Plaintext

{\rtf1\ansi\ansicpg936\deff0\deflang1033\deflangfe2052\deftab420{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\froman\fprq2\fcharset0 Times New Roman;}}
{\colortbl ;\red0\green0\blue255;}
{\info{\horzdoc}{\*\lchars ([\'7b\'a1\'a4\'a1\'ae\'a1\'b0\'a1\'b4\'a1\'b6\'a1\'b8\'a1\'ba\'a1\'be\'a1\'b2\'a1\'bc\'a3\'a8\'a3\'ae\'a3\'db\'a3\'fb\'a1\'ea\'a3\'a4}{\*\fchars !),.:\'3b?]\'7d\'a1\'a7\'a1\'a4\'a1\'a6\'a1\'a5\'a8\'44\'a1\'ac\'a1\'af\'a1\'b1\'a1\'ad\'a1\'c3\'a1\'a2\'a1\'a3\'a1\'a8\'a1\'a9\'a1\'b5\'a1\'b7\'a1\'b9\'a1\'bb\'a1\'bf\'a1\'b3\'a1\'bd\'a3\'a1\'a3\'a2\'a3\'a7\'a3\'a9\'a3\'ac\'a3\'ae\'a3\'ba\'a3\'bb\'a3\'bf\'a3\'dd\'a3\'e0\'a3\'fc\'a3\'fd\'a1\'ab\'a1\'e9}}
\viewkind4\uc1\pard\b\f0\fs20 Application:\b0 TransactionControl\line\b Revit Platform:\b0 All\line\b Revit Version:\b0 2010.0\line\b First Released For:\b0 2008.0\line\b Last Modified:\b0 02/26/2008\line\b Modified By:\b0 RZ Autodesk\line\b Programming Language:\b0 C#\line\b Skill Level:\b0 Medium\line\b Category:\b0 Basics\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 How to deal with transaction.\line\b Summary:\b0 \line This sample demonstrates how to use transaction control\f1 .\par
\f0\par
\lang1036\b Classes:\b0 \f1\par
\pard\fi360\f0 Autodesk.Revit.Document\f1\par
\f0\par
\pard\b Project Files:\b0\i \cf1\i0\f1\par
\pard\tx720\cf0\lang1033\f0 Command.cs\par
\pard\li420\tx720 It contains the class Command which implements interface IExternalCommand. This is the entry of this external command.\f1\par
\par
\pard\tx720\f0 TransactionForm.cs\f1\par
\pard\li420\tx720\f0 It contains the class TransactionForm which has three buttons to begin, end or abort a transaction. The other three buttons are used to create, move or delete a wall. The tree view is used to display all operations and transactions above and their relationship.\f1\par
\par
\pard\tx720\f0 CreateWallForm.cs\f1\par
\pard\li420\tx720\f0 It contains the class CreateWallForm which is used to create a wall. There is a combo box and several text boxes in this form to set parameters used to create wall\f1 .\par
\pard\f0\par
\b Description:\b0 \f1\par
\f0 Functionalities:\par
\pard\fi-420\li780\tx780 -\tab Three buttons in a group box provide following operations: beginning a transaction, ending a transaction, aborting a transaction. \par
\pard\fi-420\li780 -\tab Three buttons in another group box provide following operations: creating a wall, moving a wall, deleting a wall. \par
-\tab Provide a tree view to display transactions, operations and the relationship between them. \par
-\tab Allow user to use nested transactions. User can do one or more of the operations listed above during a transaction.\par
-\tab When user clicks \ldblquote Ok\rdblquote and there are some transactions which are not over, show a message box to ask user whether to end all transactions.\par
\pard\li360\f1\par
\pard\f0 Implements:\f1\par
\pard\fi-420\li780\tx780\f0 -\tab Methods \ldblquote BeginTransaction\rdblquote , \ldblquote EndTransaction\rdblquote and \ldblquote AbortTransaction\rdblquote of class \ldblquote Autodesk.Revit.Document\rdblquote can deal with transaction.\par
\pard\fi-420\li780 -\tab Method \ldblquote NewWall\rdblquote of class \ldblquote Autodesk.Revit.Creation.Document\rdblquote , methods \ldblquote Move\rdblquote and \ldblquote Delete\rdblquote of class \ldblquote Autodesk.Revit.Document\rdblquote can be used to create, move or delete a wall.\par
-\tab Tree node\rquote s fore color represents different status, e.g. black means that a transaction is over using \ldblquote EndTransaction\rdblquote and gray means that a transaction is over using \ldblquote AbortTransaction\rdblquote\f1 .\par
\pard\li360\kerning2\f0\fs21\par
\pard\kerning0\b\fs20 Instructions:\cf1\b0 \cf0\par
\pard\fi-360\li360\tx360 1.\tab Run this external command.\par
\pard\fi-360\li360 2.\tab A dialog will be shown. Do some operations, such as begin a transaction or create a wall, the tree view adds corresponding nodes to describe these operations and their relationship.\f1\par
\f0 3.\tab When closing this dialog, if some transactions are not over, a message box is shown to ask whether to end all transactions.\par
}