Monday, 1 December 2008

The Revit.ini

There's nothing new in ranting about the Revit.ini. I've read plenty of forum and blog entries putting the boot into what is, lets face it, a bit of antiquated technology.

This rant isn't about the fact that the ini exists, but about the way it works. As a developer of third party software for Revit I want my customers to have a pain-free installation, as any pain for them is pain for me as I have to help them sort it out. They might also be potential customers for whom first impressions are important, and while the need for support at this point in a customer-vendor relationship is a great opportunity for us to show just how good our support is, I think we'd all rather it was never needed in the first place.

As you've probably gathered, editing the Revit.ini to add an external command is a process fraught with potential pitfalls if you're the type not to read a README.txt no matter how many times you've been told. In the readme file distributed with our app I would love to be able to simply provide the following lines of code that the customer can copy and paste into their ini:

ECName1=My Amazing Add-in
ECAssembly1=C:\Program Files\MyCompany\MyamazingAddin\MyAddin.dll
ECDescription1=This is a great add-in

Unfortunately I can't, because if you already have an add-in then the process becomes a little cloudy. You have to add your new lines under the existing [ExternalCommands] heading, under the existing ECCount entry, and under any existing external command entries you have. With each new add-in you have to increment the ECCount, and then alter your new entries accordingly (ECNameX, ECClassNameX, ECAssemblyX, ECDescriptionX, where X = ECCount).

Contrived huh?

Well its easy for me to say, but why on Earth the developers insist that the user does the counting I will never know. It would be far nicer for us to be able to simply do this for each EC:

ECName=My Amazing Add-in
ECAssembly=C:\Program Files\MyCompany\MyamazingAddin\MyAddin.dll
ECDescription=This is a great add-in

and then during startup Revit could count the External Commands. Hindsight is a wonderful thing.

One more thing - did you know you can comment out lines using the apostrophe like this:

'ECAssembly1=C:\Program Files\MyCompany\MyamazingAddin\MyAddin.dll

I use this quite often to quickly switch between an installed version of my app and one in development.

No comments:

Post a Comment

Comments are moderated, so you'll have to wait a little bit before they appear!