Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 67020

Re: Is RevitApi 2016 build 16.0.428.0 compatible with Revit 2016 R7 ?

$
0
0

Hi Philippe,

I believe it's possible, but I find the simplest way is to create assemblies for each version.

I use the same code, just with build constants.

#if _2015

'do this

#elseif _2016

'do that

#else

'newer versions

#end if

You'll need to add pathing for each build version so that it points to the relevant version of the RevitAPI dlls.

e.g. in YourProjectName.vbproj.user file should look something like this:

<?xml version="1.0" encoding="utf-8"?><Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release-2015|AnyCPU'"><ReferencePath>C:\Program Files\Autodesk\Revit 2015\</ReferencePath></PropertyGroup><PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release-2016|AnyCPU'"><ReferencePath>C:\Program Files\Autodesk\Revit 2016\</ReferencePath></PropertyGroup></Project>

In your configuration settings for Release-2015 you should put custom constants like this: _2015=true,_2016=false

 

In your configuration settings for Release-2016 you should put custom constants like this: _2015=false,_2016=true

And of course, different build locations.

 

-Matt


Viewing all articles
Browse latest Browse all 67020

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>