Files
2024-12-12 09:51:40 +01:00

24 lines
2.0 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 ModifyIniFile\line\b Revit Platform:\b0 All\line\b Revit Version:\b0 2011.0\line\b First Released For:\b0 2008.0\line\b Programming Language:\b0 C#\line\b Skill Level:\b0 Beginning\line\b Category:\b0 Basics\line\b Type:\b0 N/A\line\line\b Subject:\b0 Modify Revit.ini.\line\b Summary:\b0 \line Provides sample that shows how to add an external command that represents the menu item \ldblquote Tools-> External Tools-> (Command)\rdblquote to Revit.ini using program\f1 .\par
\f0\par
\b Classes:\b0 \par
\par
\b Project Files:\b0 \par
Program.cs\f1\par
\pard\ltrpar\nowidctlpar\li360\f0 This file contains main() function that is the entry of a console application which adds some external command information to Revit.ini file.\f1\par
\pard\ltrpar\nowidctlpar\f0\par
IniFile.cs\f1\par
\pard\ltrpar\nowidctlpar\li360\f0 This file contains a class named IniFile that provides some functions to read or write ini file\f1 .\par
\pard\ltrpar\nowidctlpar\par
\b\f0 Description:\b0 \f1\par
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360\f0 -\tab This sample adds some configuration information as following of a new external command to Revit.ini file (X stands for the new command number):\f1\par
\pard\ltrpar\nowidctlpar\fi360\f0 ECNameX=My Command\par
ECClassNameX=Test.Command\par
\pard\ltrpar\nowidctlpar\li360 ECDescriptionX=My Command Description\f1\par
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360\f0 -\tab And uses the existing Win32 API calls "WritePrivateProfileString" and "GetPrivateProfileInt" to read and write from standard INI files using the DllImportAttribute within C#\f1 .\par
\pard\ltrpar\nowidctlpar\par
\b\f0 Instructions:\cf1\b0 \f1\par
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360\cf0\f0 1.\tab Compile and run.\f1\par
}