How To Install Revit 2020
Revit 2022 has been released, and nosotros go through the same procedure every bit every year, looking at the DevDays online presentation highlighting the API news, getting the organisation requirements set up, installing, compiling the Revit SDK samples and setting upwardly RvtSamples to load them:
- Revit 2022 outset customer shipment
- Revit 2022 DevDays Online
- Setting up Windows ten
- Installing Revit 2022 and the new SDK
- Visual Studio and .Net iv.7
- Compiling the Revit 2022 SDK samples
- Setting up RvtSamples
Revit 2022 Starting time Customer Shipment
Look at the overview by Harlan Brumm on What'south New in Revit 2022 from an end user point of view.
Revit 2022 DevDays Online
Turning toward the programming side of things, we held a series of DevDays online presentations presenting previews of new Forge features and desktop API updates in February and March, including i of special interest for us here, roofing What's New in the Revit 2022 API. Hither are the recordings:
Forge sessions:
- 2019-02-26 – DevDays Keynotes
- 2019-02-27 – Forge API update
- 2019-02-28 – Design Automation API
- 2019-03-05 – BIM 360 product and API update
Desktop product sessions on the ADN page:
- 2019-03-06 – Inventor, Vault and Fusion API update
- 2019-03-07 – Revit API, Ceremonious 3D & InfraWorks updates
- 2019-03-12 – The next release of AutoCAD APIs
Oops, I just noticed that the iii links in a higher place all signal to the same identify on the restricted ADN web site.
Here are two publicly accessible Dropbox pointers for not-members to the Revit related topics:
- 2019-01-28 – See the Expert: Revit 2022
- 2019-03-07 – DevDays Online 2022: Autodesk Revit API, Civil 3D and InfraWorks updates
Update: The 54-minute Revit DevDays Webinar Recording is now also available in the Autodesk DevTV Youtube aqueduct:
Notice the production and API changes and enhancements of Revit, Civil 3D and InfraWorks 2022, including the Forge Design Automation for Revit API.
Setting upwards Windows 10
With that public stuff out of the style, I now plow to my personal experiences preparing for and setting upwards Revit 2022 and its SDK.
I initially tried to install Revit 2022 on the aforementioned virtual Windows machine that I used for the past few versions.
The initial download stride produced an executable Revit_2020_G1_Win_64bit_wi_en-US_Setup_webinstall.exe.
Unfortunately, still, when attempting to run it, it rejected installation on Windows 8.ane:
I am forced to finally move on, set up up a new virtual machine and update to Windows 10, ending upwards with the pro version 1803 from Aug 2022.
I used the Windows 10 installation ISO from world wide web.microsoft.com, producing Win10_1809Oct_v2_EnglishInternational_x64.iso on my local machine, and a production key from MSDN subscriptions using my hotmail account, which led me on to my.visualstudio.com/ProductKeys.
Installing Revit 2022 and the New SDK
Once I had the new virtual car fix up, the Revit 2022 product installation was straightforward.
I searched for the SDK installation executable in the production installation files with no success.
Therefore, I launched the Revit SDK installation via Setup.exe > Tools and Utilities instead.
That downloaded the executable to its habitual location:
- C:\Autodesk\WI\Autodesk Revit 2022\Utilities\SDK\RevitSDK.exe
I installed the SDK to my local automobile.
In order to explore it in more depth, however, I need to install Visual Studio on the new car every bit well.
Visual Studio 2022 and .Cyberspace 4.7
Start, I checked for updated development requirements in the new Revit online aid files at assist.autodesk.com/view/RVT/2020/ENU/ in the developer guide department on development requirements.
Information technology mentions Microsoft Visual Studio 2022 Professional person, so I grabbed that from MSDN besides.
Visual Studio 2022 includes the .NET four.5 developer pack, but not the version 4.7 required past the Revit 2022 API.
When I try to load the SDK samples solution SDKSamples.sln into Visual Studio, it asks whether it should alter all the project settings from .Internet four.7 to iv.5.
No, it should not!
I installed the .Cyberspace 4.7.2 developer pack and tried over again, with the same result: even so cannot build SDKSamples.sln.
Later several other attempts and test building of simple panel applications to ensure the framework was in place, I realised that the .Cyberspace 4.7.2 programmer pack does not satisfy Visual Studio's asking for the 4.7 developer pack.
After installing the .NET 4.7 developer pack (with no suffix, i.east., .0), once more than restarting Windows and implementing another test console app using four.7.0, I tin can finally load all the SDK samples with SDKSamples.sln.
Compiling the Revit 2022 SDK Samples
Subsequently I was finally able to load the SDK samples solution into Visual Studio without all projects beingness set back to .Cyberspace 4.5, I started the get-go compilation run.
Information technology produced 17 errors and 38 warnings, cf. revit_2020_sdk_samples_errors_warnings_1.txt.
The first error CS1591 complains about a Missing XML comment for publicly visible type or member in the Custom2DExporter project.
A newly added project in this version, very exciting topic, let'south discuss it in depth asap, showtime get this error fixed, though.
In fact, the Custom2DExporter project is ready to Treat warnings as errors, so nosotros can start past turning that off for the moment. That helps, and reduces the error count.
We now have nine errors and 46 warnings, cf. revit_2020_sdk_samples_errors_warnings_2.txt.
Modifying the Treat warnings as errors setting to 'None' for the PathOfTravel, RebarFreeForm and SampleCommandsSteelElements projects equally well reduces the errors to 1 single one:
- Error CS0234, The type or namespace name 'Office' does not be in the namespace 'Microsoft' in the PointCurveCreation projection
Well, yep, I don't accept Microsoft Office installed on my virtual machine, so that makes sense.
On the other hand, of course, the number of warnings are now higher: 1 fault and 54 warnings, cf. revit_2020_sdk_samples_errors_warnings_3.txt.
For a quick fix, I temporarily unloaded the PointCurveCreation project.
That leads to 0 errors, 52 warnings, 189 projects succeeded, 0 failed, 0 skipped, cf. revit_2020_sdk_samples_errors_warnings_4.txt.
Later, I noticed that the Excel Interop DLL is already nowadays as a component in several other Revit SDK samples, east.1000., in:
- .../Samples/ArchSample/VB.Internet/Microsoft.Office.Interop.Excel.dll
I therefore reloaded the PointCurveCreation project once again, added a reference past browsing to the existing DLL, and at present accept 0 errors, 52 warnings, 190 projects succeeded, 0 failed, 0 skipped, cf. revit_2020_sdk_samples_errors_warnings_5.txt.
Many of the warnings refer to an architecture mismatch:
- warning MSB3270: There was a mismatch between the processor architecture of the projection being congenital "MSIL" and the processor architecture of the reference "RevitAPI", "AMD64". This mismatch may crusade runtime failures. Delight consider changing the targeted processor compages of your project through the Configuration Manager and so as to marshal the processor architectures between your project and references, or have a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
Happily, I implemented a set up for that years ago, cf. my DisableMismatchWarning utility in its GitHub repository. I ran DisableMismatchWarning.exe in the SDK Samples installation binder, and that reduced the number substantially to 0 errors, 21 warnings, 190 projects succeeded, 0 failed, 0 skipped, cf. revit_2020_sdk_samples_errors_warnings_6.txt.
Later, I found a much simpler solution to the Missing XML comment warning in Custom2DExporter, PathOfTravel, RebarFreeForm and SampleCommandsSteelElements projects: simply uncheck the box in the build setting requesting the generation of an XML documentation file. After that, the Treat warnings equally errors setting can exist safely turned dorsum on once again. That reduce the number farther to 0 errors, 5 warnings, 190 projects succeeded, 0 failed, 0 skipped, cf. revit_2020_sdk_samples_errors_warnings_7.txt.
These remaining warnings are due to some weird settings in the projection files that I will ignore for now.
Setting upward RvtSamples
Next, I set up up RvtSamples to load most of the SDK external commands.
RvtSamples is an external awarding that creates a menu and populates it with entries for all the external commands defined past the Revit SDK, making them accessible with one unmarried click and saving me the effort of installing each and every sample command individually with its own add-in manifest.
In gild to do so, RvtSamples reads an input text file, RvtSamples.txt, that defines the location of all the external command assembly DLLs and the names of the .Internet classes they incorporate implementing the external commands.
First of all, I edit that input text file.
It is initially gear up to the default installation location:
- C:\Revit SDK 2022\Software Evolution Kit\Samples\
I replace that globally by my local installation binder C:\a\lib\revit\2020\SDK\Samples\... 234 occurrences are replaced.
Side by side, I edit the RvtSamples add-in manifest, RvtSamples.addin, to point to the location of the RvtSamples DLL itself:
<?xml version="1.0" encoding="utf-eight"?> <RevitAddIns> <AddIn Type="Application"> <Name>RvtSamples External Application</Name> <Assembly>C:\...\Samples\RvtSamples\CS\bin\Debug\RvtSamples.dll</Assembly> <ClientId>42cb0a70-2ee7-4e64-a42d-87b9cdcc41c8</ClientId> <FullClassName>RvtSamples.Awarding</FullClassName> <VendorId>ADSK</VendorId> <VendorDescription>Autodesk, www.autodesk.com</VendorDescription> </AddIn> </RevitAddIns>
It needs to be copied to the Revit 2022 Add-Ins folder in order for Revit to option it up and load it:
- C:\Users\tammikj\AppData\Roaming\Autodesk\Revit\Addins\2020
As usual, afterward that, a whole bunch of errors occur and need to be handled.
The first error I see says:
- Assembly 'C:\a\lib\revit\2020\SDK\Samples\PhaseSample\VB.Cyberspace\bin\Debug\PhaseSample.dll' specified in line 147 of RvtSamples.txt not found
This and like errors have shown upwardly every unmarried year and affect most of the VB.Internet samples.
In this case, the RvtSamples.txt input file searches for:
- C:\a\lib\revit\2020\SDK\Samples\PhaseSample\VB.Net\bin\Debug\PhaseSample.dll
This file does not exist. Instead, for some reason, the associates DLL is located one level higher:
- C:\a\lib\revit\2020\SDK\Samples\PhaseSample\VB.Net\bin\PhaseSample.dll
As a quick end-gap fix, I globally replaced all occurrences of *\VB.Net\bin\Debug* by *\VB.NET\bin*. Equally you will find afterwards, some of these replacements were erroneous.
Next errors:
- External command grade Revit.SDK.Samples.DatumsModification.CS.Command in assembly 'C:\a\lib\revit\2020\SDK\Samples\DatumsModification\CS\bin\Debug\DatumsModification.dll' specified in line 350 of RvtSamples.txt not found
- Assembly 'C:\a\lib\revit\2020\SDK\Samples\Viewers\ElementViewer\VB.NET\bin\ElementViewer.dll' specified in line 861 of RvtSamples.txt non found
ElementViewer.dll actually is located in the bin\debug subdirectory, then I inverse that back again.
- Assembly 'C:\a\lib\revit\2020\SDK\Samples\CreateShared\VB.NET\bin\CreateShared.dll' specified in line 1155 of RvtSamples.txt not found
- Assembly 'C:\a\lib\revit\2020\SDK\Samples\TestFloorThickness\VB.NET\bin\TestFloorThickness.dll' specified in line 1225 of RvtSamples.txt not found
- The assembly does non exist. Parameter name: pushButtonData.AssemblyName: n = 1638, k = 1638, lines[k] = eof
Hmmm. Fixed some of those...
Side by side test run...
- External command class Revit.SDK.Samples.DatumsModification.CS.Control in assembly 'C:\a\lib\revit\2020\SDK\Samples\DatumsModification\CS\bin\Debug\DatumsModification.dll' specified in line 350 of RvtSamples.txt not found
Well, no wonder. The external command defined by the DatumsModification add together-in is not named Control at all.
Instead, information technology defines iii external commands named DatumStyleModification, DatumAlignment and DatumPropagation.
Therefore, the single erroneous entry for ane external control for this add-in needs to be replaced past three new ones.
This sample can never take been loaded by RvtSamples.
Anyhow, I stock-still all the errors, it seems, and tin now load RvtSamples and successfully process its input file in Revit 2022:
Hither are my versions of the files I modified to get it up and running, in case they are of use:
- RvtSamples.addin
- RvtSamples.txt
I wish you like shooting fish in a barrel sailing, much fun and success setting up and exploring Revit 2022 yourself!
Source: https://thebuildingcoder.typepad.com/blog/2019/04/the-revit-2020-fcs-api-and-sdk.html
Posted by: dubreuilnortur41.blogspot.com

0 Response to "How To Install Revit 2020"
Post a Comment