-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'gh-pages' of https://github.com/va3c/RvtVa3c into gh-pages
- Loading branch information
Showing
6 changed files
with
249 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{1127D4DE-31BB-4D7E-B663-759ACE7B8230}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>DynVa3c</RootNamespace> | ||
<AssemblyName>DynVa3c</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="DSCoreNodes"> | ||
<HintPath>..\..\..\..\..\..\Program Files\Dynamo 0.7\DSCoreNodes.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="DynamoCore"> | ||
<HintPath>..\..\..\..\..\..\Program Files\Dynamo 0.7\DynamoCore.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="ProtoCore"> | ||
<HintPath>..\..\..\..\..\..\Program Files\Dynamo 0.7\ProtoCore.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="ProtoGeometry"> | ||
<HintPath>..\..\..\..\..\..\Program Files\Dynamo 0.7\ProtoGeometry.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="ProtoInterface"> | ||
<HintPath>..\..\..\..\..\..\Program Files\Dynamo 0.7\ProtoInterface.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="RevitAPI"> | ||
<HintPath>..\..\..\..\..\..\Program Files\Autodesk\Revit 2015\RevitAPI.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="RevitAPIUI"> | ||
<HintPath>..\..\..\..\..\..\Program Files\Autodesk\Revit 2015\RevitAPIUI.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="RevitNodes"> | ||
<HintPath>..\..\..\..\..\..\Program Files\Dynamo 0.7\Revit_2015\RevitNodes.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="RevitServices"> | ||
<HintPath>..\..\..\..\..\..\Program Files\Dynamo 0.7\Revit_2015\RevitServices.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="RvtVa3c"> | ||
<HintPath>..\RvtVa3c\bin\Debug\RvtVa3c.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Va3c4Dynamo.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("DynVa3c")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("Thornton Tomasetti, Inc.")] | ||
[assembly: AssemblyProduct("DynVa3c")] | ||
[assembly: AssemblyCopyright("Copyright © Thornton Tomasetti, Inc. 2015")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("0973e4fd-9e9f-47b6-879b-261e78528669")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
//Revit & Dynamo | ||
using Autodesk.Revit.DB; | ||
using Autodesk.Revit.DB.Analysis; | ||
using Autodesk.Revit.UI; | ||
using DSCore; | ||
using Dynamo.Models; | ||
using Dynamo.Nodes; | ||
using Dynamo.Utilities; | ||
using ProtoCore.AST.AssociativeAST; | ||
using RevitServices.Persistence; | ||
using RevitServices.Transactions; | ||
using ProtoCore; | ||
using ProtoCore.Utils; | ||
using Autodesk.DesignScript.Runtime; | ||
using Revit.GeometryConversion; | ||
using RvtVa3c; | ||
using System.IO; | ||
|
||
namespace DynVa3c | ||
{ | ||
public class Va3c4Dynamo | ||
{ | ||
// [IsVisibleInDynamoLibrary(false)] | ||
// public static System.Reflection.Assembly | ||
//CurrentDomain_AssemblyResolve( | ||
// object sender, | ||
// ResolveEventArgs args) | ||
// { | ||
// if (args.Name.Contains("Newtonsoft")) | ||
// { | ||
// string filename = Path.GetDirectoryName( | ||
// System.Reflection.Assembly | ||
// .GetExecutingAssembly().Location); | ||
|
||
// filename = Path.Combine(filename, | ||
// "Newtonsoft.Json.dll"); | ||
|
||
// if (System.IO.File.Exists(filename)) | ||
// { | ||
// return System.Reflection.Assembly | ||
// .LoadFrom(filename); | ||
// } | ||
// } | ||
// return null; | ||
// } | ||
|
||
public static void Exportva3C(string filename) | ||
{ | ||
// 1. Get active document 3d view | ||
//local variables | ||
Document RvtDoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument.Document; | ||
|
||
// 2. Call ExportView3D from RvtVac3 | ||
//RvtVa3c.Command.ExportView3D(RvtDoc.ActiveView as View3D, filename); | ||
|
||
//AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; | ||
|
||
RvtVa3c.Va3cExportContext context = new Va3cExportContext(RvtDoc, filename); | ||
|
||
CustomExporter exporter = new CustomExporter(RvtDoc, context); | ||
|
||
exporter.IncludeFaces = false; | ||
|
||
exporter.ShouldStopOnError = false; | ||
|
||
|
||
try | ||
{ | ||
exporter.Export(RvtDoc.ActiveView as View3D); | ||
} | ||
catch (Exception) // Autodesk.Revit.Exceptions.ExternalApplicationException | ||
{ | ||
|
||
//throw; | ||
} | ||
|
||
string test = context.myjs; | ||
System.IO.File.WriteAllText(filename, test); | ||
// 3. Return Report | ||
//return test; | ||
|
||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters