Skip to content

Commit

Permalink
flat migration to Revit 2017
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Tammik committed Oct 9, 2016
1 parent 3ccd758 commit 9e51b4c
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 18 deletions.
Empty file modified .gitignore
100644 → 100755
Empty file.
29 changes: 22 additions & 7 deletions DirectObjLoader/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,31 @@ TessellatedShapeBuilder builder
// handling of target and fallback and the
// possible combinations.

TessellatedShapeBuilderResult r
= builder.Build(
TessellatedShapeBuilderTarget.AnyGeometry,
TessellatedShapeBuilderFallback.Mesh,
graphicsStyleId );
//TessellatedShapeBuilderResult r // 2015
// = builder.Build(
// TessellatedShapeBuilderTarget.AnyGeometry,
// TessellatedShapeBuilderFallback.Mesh,
// graphicsStyleId );

builder.Target = TessellatedShapeBuilderTarget.AnyGeometry; // 2017
builder.Fallback = TessellatedShapeBuilderFallback.Mesh; // 2017
builder.GraphicsStyleId = graphicsStyleId; // 2017

builder.Build(); // 2017

//TessellatedShapeBuilderResult r // 2015

DirectShape ds = DirectShape.CreateElement(
doc, _categoryId, appGuid, shapeName );
//doc, _categoryId, appGuid, shapeName ); // 2015
doc, _categoryId ); // 2017

ds.ApplicationId = appGuid; // 2017
ds.ApplicationDataId = shapeName; // 2017

//ds.SetShape( r.GetGeometricalObjects() ); // 2015

ds.SetShape( builder.GetBuildResult().GetGeometricalObjects() ); // 2017

ds.SetShape( r.GetGeometricalObjects() );
ds.Name = shapeName;

Debug.Print(
Expand Down
19 changes: 10 additions & 9 deletions DirectObjLoader/DirectObjLoader.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
None
Expand All @@ -17,7 +17,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DirectObjLoader</RootNamespace>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Expand Down Expand Up @@ -45,19 +45,20 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="AdWindows">
<HintPath>..\..\..\..\Program Files\Autodesk\Revit 2015\AdWindows.dll</HintPath>
<HintPath>..\..\..\..\Program Files\Autodesk\Revit 2017\AdWindows.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="FileFormatWavefront">
<Reference Include="FileFormatWavefront, Version=1.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\FileFormatWavefront.1.0.3.0\lib\net40\FileFormatWavefront.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="RevitAPI">
<HintPath>$(ProgramW6432)\Autodesk\Revit 2015\RevitAPI.dll</HintPath>
<HintPath>..\..\..\..\Program Files\Autodesk\Revit 2017\RevitAPI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="RevitAPIUI">
<HintPath>$(ProgramW6432)\Autodesk\Revit 2015\RevitAPIUI.dll</HintPath>
<HintPath>..\..\..\..\Program Files\Autodesk\Revit 2017\RevitAPIUI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
Expand Down Expand Up @@ -88,8 +89,8 @@
<Delete Files="$(AppData)\Autodesk\REVIT\Addins\2015\DirectObjLoader.dll" />
</Target>
<PropertyGroup>
<PostBuildEvent>copy "$(ProjectDir)DirectObjLoader.addin" "$(AppData)\Autodesk\REVIT\Addins\2015"
copy "$(ProjectDir)bin\debug\DirectObjLoader.dll" "$(AppData)\Autodesk\REVIT\Addins\2015"
copy "$(ProjectDir)..\packages\FileFormatWavefront.1.0.3.0\lib\net40\FileFormatWavefront.dll" "$(AppData)\Autodesk\REVIT\Addins\2015"</PostBuildEvent>
<PostBuildEvent>copy "$(ProjectDir)DirectObjLoader.addin" "$(AppData)\Autodesk\REVIT\Addins\2017"
copy "$(ProjectDir)bin\debug\DirectObjLoader.dll" "$(AppData)\Autodesk\REVIT\Addins\2017"
copy "$(ProjectDir)..\packages\FileFormatWavefront.1.0.3.0\lib\net40\FileFormatWavefront.dll" "$(AppData)\Autodesk\REVIT\Addins\2017"</PostBuildEvent>
</PropertyGroup>
</Project>
5 changes: 3 additions & 2 deletions DirectObjLoader/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
// 2015-02-15 2015.0.0.19 implemented contextual help for external command push button in ribbon panel
// 2015-02-15 2015.0.0.20 implemented Config.MaxFileSize check for huge file sizes and abort before trying to load them
// 2015-02-17 2015.0.0.21 published blog post
// 2016-10-09 2017.0.0.0 flat migration to Revit 2017
//
[assembly: AssemblyVersion( "2015.0.0.21" )]
[assembly: AssemblyFileVersion( "2015.0.0.21" )]
[assembly: AssemblyVersion( "2017.0.0.0" )]
[assembly: AssemblyFileVersion( "2017.0.0.0" )]

0 comments on commit 9e51b4c

Please sign in to comment.