As I mentioned yesterday, this weekend was spent traveling to Verona to give a Revit API training here. Happily, I enjoyed some mountain air the weekend before, on Helgenhorn 2837m, Basodino 3273m and Cima di Lago south of All'Acqua in the Bedretto Valley (more photos by Jogi):
Anyway, that was last weekend; back to here and now in Verona, where I was busy yesterday, preparing for the training, starting today.
I already updated the DevTV Visual Studio wizards for creating skeleton C# and VB Revit 2011 add-ins several times in the past:
- Original introduction, benefits, and usage example for C# and VB.
- Personalised minimal C# version for Revit 2011.
- A short additional usage note.
- 64 bit versions for C# and VB.
- Updated C# version without the extraneous transaction attribute on the external application.
One step in my preparations was to migrate the wizard templates to Visual Studio 2010 and the Revit 2012 API. Here is the first result:
-
TemplateRevitArch2012AddinCsJt_1.zip – copy to
[My Documents]\Visual Studio 2010\Templates\ProjectTemplates\Visual C# -
TemplateRevitArch2012AddinVbJt_1.zip – copy to
[My Documents]\Visual Studio 2010\Templates\ProjectTemplates\Visual Basic
The two most important changes that I made for 2012 are:
- Added required vendor id and optional vendor description to the add-in manifest file.
- Removed the obsolete regeneration option attribute.
This is what the auto-generated add-in manifest now looks like:
<?xml version="1.0" encoding="utf-8"?> <RevitAddIns> <AddIn Type="Command"> <Text>Command RevitAddin1</Text> <Description>Some description for RevitAddin1</Description> <Assembly>c:\tmp\revit\RevitAddin1\RevitAddin1\bin\debug\RevitAddin1.dll</Assembly> <FullClassName>RevitAddin1.Command</FullClassName> <ClientId>4e980ab7-e6f4-456f-b8cc-646ef733128c</ClientId> <VendorId>TBC_</VendorId> <VendorDescription>The Building Coder, http://thebuildingcoder.typepad.com</VendorDescription> </AddIn> <AddIn Type="Application"> <Name>Application RevitAddin1</Name> <Assembly>c:\tmp\revit\RevitAddin1\RevitAddin1\bin\debug\RevitAddin1.dll</Assembly> <FullClassName>RevitAddin1.App</FullClassName> <ClientId>dddfad28-c7a0-45fe-836e-0eb03e919e81</ClientId> <VendorId>TBC_</VendorId> <VendorDescription>The Building Coder, http://thebuildingcoder.typepad.com</VendorDescription> </AddIn> </RevitAddIns>
I used The Building Coder Autodesk Registered Developer Symbol RDS "TBC_" for the vendor id. You should obviously replace that with your own id before using the template.
Whatever you would like to change, it is extremely easy to adapt the templates for your own personal use:
Simply unpack the zip file somewhere, make your changes, update the zip file with the modified files, and copy the new zip file to the appropriate location.