├── .editorconfig ├── .github └── workflows │ ├── dev_actions.yml │ ├── dev_pull_request.yml │ └── production_actions.yml ├── .gitignore ├── Common_glTF_Exporter ├── App.config ├── Common_glTF_Exporter.projitems ├── Common_glTF_Exporter.shproj ├── Core │ ├── GLTFAccessor.cs │ ├── GLTFAttribute.cs │ ├── GLTFBinaryData.cs │ ├── GLTFBuffer.cs │ ├── GLTFBufferView.cs │ ├── GLTFExtras.cs │ ├── GLTFMaterial.cs │ ├── GLTFMesh.cs │ ├── GLTFMeshPrimitive.cs │ ├── GLTFNode.cs │ ├── GLTFScene.cs │ ├── GLTFVersion.cs │ ├── GlTFExportContext.cs │ ├── IndexedDictionary.cs │ ├── glTF.cs │ └── glTFPBR.cs ├── Export │ ├── BinFile.cs │ ├── BufferConfig.cs │ ├── Compression.cs │ ├── Draco.cs │ ├── FileExport.cs │ ├── GlbBinInfo.cs │ ├── GlbFile.cs │ ├── GlbHeaderInfo.cs │ ├── GlbJsonInfo.cs │ ├── GltfJson.cs │ ├── MeshOpt.cs │ ├── RevitGrids.cs │ ├── RevitMaterials.cs │ └── ZIP.cs ├── ExternalApplication.cs ├── ExternalCommand.cs ├── Fonts │ ├── NeuzeitGrotesk-Black.ttf │ ├── NeuzeitGrotesk-Bold.ttf │ ├── NeuzeitGrotesk-Light.ttf │ └── NeuzeitGrotesk-Regular.ttf ├── Images │ ├── Heart.png │ ├── ScreenshotRevit.png │ ├── e-verse-isologo.png │ ├── e-verse-logo-1.png │ ├── gltf.png │ └── logo.png ├── Leia_glTF_Exporter.addin ├── Model │ ├── FixedObject.cs │ ├── FixedObjects.cs │ ├── GeometryDataObject.cs │ ├── GlbComponents.cs │ ├── IObject.cs │ ├── IObjects.cs │ ├── Links.cs │ ├── LoadContext.cs │ ├── MovableObject.cs │ ├── MovableObjects.cs │ ├── Payload.cs │ ├── PointIntObject.cs │ ├── RevitGridParametersObject.cs │ ├── Room.cs │ ├── UnitObject.cs │ └── VertexLookupIntObject.cs ├── PackageContents.xml ├── Transform │ ├── ModelRotation.cs │ ├── ModelScale.cs │ └── ModelTraslation.cs ├── Utils │ ├── Analytics.cs │ ├── Collectors.cs │ ├── DirectoryUtils.cs │ ├── FilesHelper.cs │ ├── GLTFBinaryDataUtils.cs │ ├── GeometryUtils.cs │ ├── Hyperlink.cs │ ├── IsDocumentRFA.cs │ ├── MaterialUtils.cs │ ├── SettingsConfig.cs │ ├── Util.cs │ └── glTFExportUtils.cs ├── Version │ ├── DownloadFile.cs │ ├── InternetConnection.cs │ ├── LatestVersion.cs │ ├── RunLocalFile.cs │ └── VersionValidate.cs ├── ViewModel │ ├── ProgressBarWindowViewModel.cs │ ├── UnitsViewModel.cs │ └── ViewModelBase.cs └── Windows │ ├── AboutUsWindow.xaml │ ├── AboutUsWindow.xaml.cs │ ├── FeedbackWindow.xaml │ ├── FeedbackWindow.xaml.cs │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── MainWindow.xaml.cs~refs │ └── remotes │ │ └── origin │ │ └── develop │ ├── MainWindow.xaml~refs │ └── remotes │ │ └── origin │ │ └── develop │ ├── MainWindow │ ├── ComboUnits.cs │ ├── LabelVersion.cs │ ├── Preferences.cs │ ├── Settings.cs │ └── UpdateForm.cs │ ├── MessageWindow.xaml │ ├── MessageWindow.xaml.cs │ ├── ProgressBarWindow.xaml │ ├── ProgressBarWindow.xaml.cs │ ├── Resources.xaml │ ├── Resources.xaml.cs │ ├── VersionWindow.xaml │ └── VersionWindow.xaml.cs ├── GitVersion.yml ├── GltfInstaller ├── Dialogs │ ├── ExitDialog.xaml │ ├── ExitDialog.xaml.cs │ ├── FeaturesDialog.xaml │ ├── FeaturesDialog.xaml.cs │ ├── InstallDirDialog.xaml │ ├── InstallDirDialog.xaml.cs │ ├── LicenseAgreementDialog.xaml │ ├── LicenseAgreementDialog.xaml.cs │ ├── MaintenanceTypeDialog.xaml │ ├── MaintenanceTypeDialog.xaml.cs │ ├── ProgressDialog.xaml │ ├── ProgressDialog.xaml.cs │ ├── Resources.xaml │ ├── Resources.xaml.cs │ ├── SetupTypeDialog.xaml │ ├── SetupTypeDialog.xaml.cs │ ├── WelcomeDialog.xaml │ └── WelcomeDialog.xaml.cs ├── GltfInstaller.csproj ├── Program.cs ├── Properties │ ├── Resources.Designer.cs │ └── Resources.resx └── Resources │ ├── Heart.png │ ├── gltf.png │ └── logo.ico ├── LICENSE ├── README.md ├── Revit_glTF_Exporter.sln ├── Revit_glTF_Exporter_2019 ├── .gitignore ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── Resources │ ├── Heart.png │ ├── e-verse-isologo.png │ ├── e-verse-logo-1.png │ └── gltf.png └── Revit_glTF_Exporter_2019.csproj ├── Revit_glTF_Exporter_2020 ├── .gitignore ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── Resources │ ├── Heart.png │ ├── e-verse-isologo.png │ ├── e-verse-logo-1.png │ └── gltf.png └── Revit_glTF_Exporter_2020.csproj ├── Revit_glTF_Exporter_2021 ├── .gitignore ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── Resources │ ├── Heart.png │ ├── e-verse-isologo.png │ ├── e-verse-logo-1.png │ └── gltf.png └── Revit_glTF_Exporter_2021.csproj ├── Revit_glTF_Exporter_2022 ├── .gitignore ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── Resources │ ├── Heart.png │ ├── e-verse-isologo.png │ ├── e-verse-logo-1.png │ └── gltf.png └── Revit_glTF_Exporter_2022.csproj ├── Revit_glTF_Exporter_2023 ├── .gitignore ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── Resources │ ├── Heart.png │ ├── e-verse-isologo.png │ ├── e-verse-logo-1.png │ └── gltf.png ├── Revit_glTF_Exporter_2023.csproj └── e-verse.ruleset ├── Revit_glTF_Exporter_2024 ├── .gitignore ├── Properties │ └── AssemblyInfo.cs ├── Resources │ ├── Heart.png │ ├── e-verse-isologo.png │ ├── e-verse-logo-1.png │ └── gltf.png ├── Revit_glTF_Exporter_2024.csproj └── e-verse.ruleset └── Revit_glTF_Exporter_2025 ├── DracoWrapper.dll ├── MeshOpt.dll ├── Program.cs ├── Properties └── PublishProfiles │ └── FolderProfile.pubxml ├── Resources ├── Heart.png ├── e-verse-isologo.png ├── e-verse-logo-1.png └── gltf.png └── Revit_glTF_Exporter_2025.csproj /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | 3 | # SA1600: Elements should be documented 4 | dotnet_diagnostic.SA1600.severity = none 5 | 6 | # SA1633: File should have header 7 | dotnet_diagnostic.SA1633.severity = none 8 | 9 | # SX1101: Do not prefix local calls with 'this.' 10 | dotnet_diagnostic.SX1101.severity = none 11 | 12 | # SA1602: Enumeration items should be documented 13 | dotnet_diagnostic.SA1602.severity = none 14 | -------------------------------------------------------------------------------- /.github/workflows/dev_actions.yml: -------------------------------------------------------------------------------- 1 | #dev_actions.yml 2 | 3 | name: Compile and run tests 4 | on: 5 | push: 6 | # this will cause the action to run on pushes to branches that start with the prefixes specified here 7 | branches: [ develop, tests/*, features/*, docs/*, bugs/* ] 8 | tags: 9 | - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 10 | 11 | jobs: 12 | Build: 13 | # The type of runner that the job will run on 14 | runs-on: windows-latest 15 | env: 16 | Solution_Name: Revit_glTF_Exporter.sln 17 | outputs: 18 | Version: ${{ steps.gitversion.outputs.nuGetVersionV2 }} 19 | CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }} 20 | 21 | steps: 22 | - name: Checkout 23 | uses: actions/checkout@v2 24 | with: 25 | fetch-depth: 0 26 | 27 | # install and calculate the new version with GitVersion 28 | - name: Install GitVersion 29 | uses: gittools/actions/gitversion/setup@v0 30 | with: 31 | versionSpec: '5.x' 32 | 33 | - name: Determine Version 34 | uses: gittools/actions/gitversion/execute@v0 35 | with: 36 | useConfigFile: true 37 | configFilePath: GitVersion.yml 38 | 39 | id: gitversion # step id used as reference for output values 40 | - name: Display GitVersion outputs 41 | run: | 42 | echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}" 43 | echo "PreReleaseNumber: ${{ steps.gitversion.outputs.PreReleaseNumber }}" 44 | echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}" 45 | echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}" 46 | 47 | 48 | - name: Setup MSBuild.exe 49 | uses: microsoft/setup-msbuild@v1.0.2 50 | 51 | - name: Setup NuGet 52 | uses: NuGet/setup-nuget@v1.0.5 53 | 54 | - name: Restore nuGet packages 55 | run: nuget restore Revit_glTF_Exporter.sln 56 | 57 | - name: Run MSBuild 58 | id: run-msbuild 59 | run: | 60 | msbuild Revit_glTF_Exporter.sln /t:Clean,Build /p:platform="Any CPU" /p:Configuration=Release -m 61 | 62 | - name: Run tests 63 | id: run-tests 64 | run: | 65 | dotnet test 66 | 67 | - name: Create Release 68 | id: create_release 69 | uses: actions/create-release@v1 70 | env: 71 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token 72 | with: 73 | tag_name: ${{ steps.gitversion.outputs.majorMinorPatch }}-${{ steps.gitversion.outputs.PreReleaseNumber}}-b 74 | release_name: GLTF Exporter v${{ steps.gitversion.outputs.majorMinorPatch }}-${{ steps.gitversion.outputs.PreReleaseNumber}} Testing 75 | draft: false 76 | prerelease: true 77 | 78 | - name: Upload Release Asset 79 | id: upload-release-asset 80 | uses: actions/upload-release-asset@v1 81 | env: 82 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 83 | with: 84 | upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps 85 | asset_path: .\GltfInstaller\Leia - glTF exporter 0.0.0.msi 86 | asset_name: Leia - glTF exporter 0.0.0.msi_testing.exe 87 | asset_content_type: application/zip 88 | 89 | -------------------------------------------------------------------------------- /.github/workflows/dev_pull_request.yml: -------------------------------------------------------------------------------- 1 | name: Check pull request 2 | on: 3 | pull_request: 4 | # we'll also run this when pull requests to develop are opened 5 | branches: [ develop ] 6 | 7 | jobs: 8 | Build: 9 | # The type of runner that the job will run on 10 | runs-on: windows-latest 11 | env: 12 | Solution_Name: Revit_glTF_Exporter.sln 13 | outputs: 14 | Version: ${{ steps.gitversion.outputs.nuGetVersionV2 }} 15 | CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }} 16 | 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v2 20 | with: 21 | fetch-depth: 0 22 | 23 | - name: Setup MSBuild.exe 24 | uses: microsoft/setup-msbuild@v1.0.2 25 | 26 | - name: Setup NuGet 27 | uses: NuGet/setup-nuget@v1.0.5 28 | 29 | - name: Restore nuGet packages 30 | run: nuget restore Revit_glTF_Exporter.sln 31 | 32 | - name: Run MSBuild 33 | id: run-msbuild 34 | run: | 35 | msbuild Revit_glTF_Exporter.sln /t:Clean,Build /p:platform="Any CPU" /p:Configuration=Release -m 36 | 37 | - name: Run tests 38 | id: run-tests 39 | run: | 40 | dotnet test 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Common_glTF_Exporter.shproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 0aabf61a-0caa-4e92-b73e-580821532556 5 | 14.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Core/GLTFAccessor.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Core 2 | { 3 | using System.Collections.Generic; 4 | using Revit_glTF_Exporter; 5 | 6 | /// 7 | /// A reference to a subsection of a BufferView containing a particular data type 8 | /// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#accessors. 9 | /// 10 | public class GLTFAccessor 11 | { 12 | public GLTFAccessor(int bufferView, int byteOffset, ComponentType componentType, int count, string type, List max, List min, string name) 13 | { 14 | this.bufferView = bufferView; 15 | this.byteOffset = byteOffset; 16 | this.componentType = componentType; 17 | this.count = count; 18 | this.type = type; 19 | this.max = max; 20 | this.min = min; 21 | this.name = name; 22 | } 23 | 24 | /// 25 | /// Gets or sets the index of the bufferView. 26 | /// 27 | public int bufferView { get; set; } 28 | 29 | /// 30 | /// Gets or sets the offset relative to the start of the bufferView in bytes. 31 | /// 32 | public int byteOffset { get; set; } 33 | 34 | /// 35 | /// Gets or sets the datatype of the components in the attribute. 36 | /// 37 | public ComponentType componentType { get; set; } 38 | 39 | /// 40 | /// Gets or sets the number of attributes referenced by this accessor. 41 | /// 42 | public int count { get; set; } 43 | 44 | /// 45 | /// Gets or sets the specifies if the attribute is a scala, vector, or matrix. 46 | /// 47 | public string type { get; set; } 48 | 49 | /// 50 | /// Gets or sets the maximum value of each component in this attribute. 51 | /// 52 | public List max { get; set; } 53 | 54 | /// 55 | /// Gets or sets the minimum value of each component in this attribute. 56 | /// 57 | public List min { get; set; } 58 | 59 | /// 60 | /// Gets or sets a user defined name for this accessor. 61 | /// 62 | public string name { get; set; } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Core/GLTFAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Core 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | /// 8 | /// The list of accessors available to the renderer for a particular mesh 9 | /// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#meshes. 10 | /// 11 | public class GLTFAttribute 12 | { 13 | /// 14 | /// Gets or sets the index of the accessor for position data. 15 | /// 16 | public int POSITION { get; set; } 17 | 18 | /// 19 | /// Gets or sets the index of the accessor for normal data. 20 | /// 21 | public int NORMAL { get; set; } 22 | 23 | /// 24 | /// Gets or sets the index of the accessor for batchId data. 25 | /// 26 | public int _BATCHID { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Core/GLTFBinaryData.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Core 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | /// 8 | /// A binary data store serialized to a *.bin file 9 | /// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#binary-data-storage. 10 | /// 11 | public class GLTFBinaryData 12 | { 13 | public List vertexBuffer { get; set; } = new List(); 14 | 15 | public List normalBuffer { get; set; } = new List(); 16 | 17 | public List indexBuffer { get; set; } = new List(); 18 | 19 | public List batchIdBuffer { get; set; } = new List(); 20 | 21 | public int vertexAccessorIndex { get; set; } 22 | 23 | public int normalsAccessorIndex { get; set; } 24 | 25 | public int indexAccessorIndex { get; set; } 26 | 27 | public int batchIdAccessorIndex { get; set; } 28 | 29 | public string name { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Core/GLTFBuffer.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Core 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | /// 8 | /// A reference to the location and size of binary data 9 | /// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#buffers-and-buffer-views. 10 | /// 11 | public class GLTFBuffer 12 | { 13 | /// 14 | /// Gets or sets the uri of the buffer. 15 | /// 16 | public string uri { get; set; } 17 | 18 | /// 19 | /// Gets or sets the total byte length of the buffer. 20 | /// 21 | public int byteLength { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Core/GLTFBufferView.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Core 2 | { 3 | using Revit_glTF_Exporter; 4 | 5 | /// 6 | /// A reference to a subsection of a buffer containing either vector or scalar data 7 | /// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#buffers-and-buffer-views. 8 | /// 9 | public class GLTFBufferView 10 | { 11 | public GLTFBufferView(int buffer, int byteOffset, int byteLength, Targets target, string name) 12 | { 13 | this.buffer = buffer; 14 | this.byteOffset = byteOffset; 15 | this.byteLength = byteLength; 16 | this.target = target; 17 | this.name = name; 18 | } 19 | 20 | /// 21 | /// Gets or sets the index of the buffer. 22 | /// 23 | public int buffer { get; set; } 24 | 25 | /// 26 | /// Gets or sets the offset into the buffer in bytes. 27 | /// 28 | public int byteOffset { get; set; } 29 | 30 | /// 31 | /// Gets or sets the length of the bufferView in bytes. 32 | /// 33 | public int byteLength { get; set; } 34 | 35 | /// 36 | /// Gets or sets the target that the GPU buffer should be bound to. 37 | /// 38 | public Targets target { get; set; } 39 | 40 | /// 41 | /// Gets or sets a user defined name for this view. 42 | /// 43 | public string name { get; set; } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Core/GLTFExtras.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Core 2 | { 3 | using System.Collections.Generic; 4 | using Common_glTF_Exporter.Export; 5 | using Revit_glTF_Exporter; 6 | 7 | public class GLTFExtras 8 | { 9 | /// 10 | /// Gets or sets the Revit created UniqueId for this object. 11 | /// 12 | public string uniqueId { get; set; } 13 | 14 | public RevitGridParametersObject gridParameters { get; set; } 15 | 16 | public Dictionary parameters { get; set; } 17 | 18 | public long elementId { get; set; } 19 | 20 | public string elementCategory { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Core/GLTFMaterial.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Core 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | using Revit_glTF_Exporter; 7 | 8 | /// 9 | /// The glTF PBR Material format 10 | /// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#materials. 11 | /// 12 | public class GLTFMaterial 13 | { 14 | public string alphaMode { get; set; } 15 | 16 | public float? alphaCutoff { get; set; } 17 | 18 | public string name { get; set; } 19 | 20 | public GLTFPBR pbrMetallicRoughness { get; set; } 21 | 22 | public bool doubleSided { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Core/GLTFMesh.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Core 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | using Revit_glTF_Exporter; 7 | 8 | /// 9 | /// The array of primitives defining the mesh of an object 10 | /// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#meshes. 11 | /// 12 | public class GLTFMesh 13 | { 14 | public List primitives { get; set; } 15 | 16 | public string name { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Core/GLTFMeshPrimitive.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Core 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | using static Revit_glTF_Exporter.GLTF; 7 | 8 | /// 9 | /// Properties defining where the GPU should look to find the mesh and material data 10 | /// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#meshes. 11 | /// 12 | public class GLTFMeshPrimitive 13 | { 14 | public GLTFAttribute attributes { get; set; } = new GLTFAttribute(); 15 | 16 | public int indices { get; set; } 17 | 18 | public int? material { get; set; } = null; 19 | 20 | public int mode { get; set; } = 4; // 4 is triangles 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Core/GLTFNode.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Core 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | using Revit_glTF_Exporter; 7 | 8 | /// 9 | /// The nodes defining individual (or nested) elements in the scene 10 | /// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#nodes-and-hierarchy. 11 | /// 12 | public class GLTFNode 13 | { 14 | /// 15 | /// Gets or sets the user-defined name of this object. 16 | /// 17 | public string name { get; set; } 18 | 19 | /// 20 | /// Gets or sets the index of the mesh in this node. 21 | /// 22 | public int? mesh { get; set; } = null; 23 | 24 | /// 25 | /// Gets or sets a floating-point 4x4 transformation matrix stored in column major order. 26 | /// 27 | public List matrix { get; set; } 28 | 29 | /// 30 | /// Gets or sets the indices of this node's children. 31 | /// 32 | public List children { get; set; } 33 | 34 | /// 35 | /// Gets or sets the extras describing this node. 36 | /// 37 | public GLTFExtras extras { get; set; } 38 | 39 | /// 40 | /// Gets or sets rotation of the node. 41 | /// 42 | public List rotation { get; set; } 43 | 44 | /// 45 | /// Gets or sets translation of the node. 46 | /// 47 | public List translation { get; set; } 48 | 49 | /// 50 | /// Gets or sets scale of the node. 51 | /// 52 | public List scale { get; set; } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Core/GLTFScene.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Core 2 | { 3 | using System.Collections.Generic; 4 | 5 | /// 6 | /// The scenes available to render 7 | /// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#scenes. 8 | /// 9 | public class GLTFScene 10 | { 11 | public List nodes = new List(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Core/GLTFVersion.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Core 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | /// 8 | /// Required glTF asset information 9 | /// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#asset. 10 | /// 11 | public class GLTFVersion 12 | { 13 | public string version = "2.0"; 14 | public string generator = "e-verse custom generator"; 15 | public string copyright = "free tool created by e-verse"; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Core/glTF.cs: -------------------------------------------------------------------------------- 1 | namespace Revit_glTF_Exporter 2 | { 3 | using System.Collections.Generic; 4 | using Common_glTF_Exporter.Core; 5 | 6 | /// 7 | /// Magic numbers to differentiate scalar and vector array buffers 8 | /// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#buffers-and-buffer-views. 9 | /// 10 | public enum Targets 11 | { 12 | ARRAY_BUFFER = 34962, // signals vertex data 13 | ELEMENT_ARRAY_BUFFER = 34963, // signals index or face data 14 | } 15 | 16 | /// 17 | /// Magic numbers to differentiate array buffer component types 18 | /// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#accessor-element-size. 19 | /// 20 | public enum ComponentType 21 | { 22 | BYTE = 5120, 23 | UNSIGNED_BYTE = 5121, 24 | SHORT = 5122, 25 | UNSIGNED_SHORT = 5123, 26 | UNSIGNED_INT = 5125, 27 | FLOAT = 5126, 28 | } 29 | 30 | /// 31 | /// The json serializable glTF file format 32 | /// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0. 33 | /// 34 | public struct GLTF 35 | { 36 | public GLTFVersion asset; 37 | public List scenes; 38 | public List nodes; 39 | public List meshes; 40 | public List buffers; 41 | public List bufferViews; 42 | public List accessors; 43 | public List materials; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Core/glTFPBR.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Core 2 | { 3 | using System.Collections.Generic; 4 | 5 | public class GLTFPBR 6 | { 7 | public List baseColorFactor { get; set; } 8 | 9 | public float metallicFactor { get; set; } 10 | 11 | public float roughnessFactor { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Export/BinFile.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Export 2 | { 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Text; 6 | using Common_glTF_Exporter.Core; 7 | 8 | public static class BinFile 9 | { 10 | /// 11 | /// Create a new .bin file. 12 | /// 13 | /// .bin file name. 14 | /// binary file data. 15 | /// export normals. 16 | /// export BatchId. 17 | public static void Create(string filename, List binaryFileData, 18 | bool exportNormals, bool exportBatchId) 19 | { 20 | using (FileStream f = File.Create(filename)) 21 | using (var writer = new BinaryWriter(new BufferedStream(f), Encoding.UTF8)) 22 | { 23 | foreach (var bin in binaryFileData) 24 | { 25 | for (int i = 0; i < bin.vertexBuffer.Count; i++) 26 | { 27 | writer.Write((float)bin.vertexBuffer[i]); 28 | } 29 | 30 | if (exportNormals) 31 | { 32 | for (int i = 0; i < bin.normalBuffer.Count; i++) 33 | { 34 | writer.Write((float)bin.normalBuffer[i]); 35 | } 36 | } 37 | 38 | if (exportBatchId) 39 | { 40 | for (int i = 0; i < bin.batchIdBuffer.Count; i++) 41 | { 42 | writer.Write((float)bin.batchIdBuffer[i]); 43 | } 44 | } 45 | 46 | for (int i = 0; i < bin.indexBuffer.Count; i++) 47 | { 48 | writer.Write((int)bin.indexBuffer[i]); 49 | } 50 | } 51 | 52 | writer.Flush(); 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Export/BufferConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Common_glTF_Exporter.Core; 5 | using Common_glTF_Exporter.Windows.MainWindow; 6 | 7 | namespace Common_glTF_Exporter.Export 8 | { 9 | public static class BufferConfig 10 | { 11 | const string BIN = ".bin"; 12 | 13 | public static void Run(List bufferViews, List buffers, 14 | Preferences preferences) 15 | { 16 | int bytePosition = 0; 17 | int currentBuffer = 0; 18 | 19 | foreach (var view in bufferViews) 20 | { 21 | if (view.buffer.Equals(0)) 22 | { 23 | bytePosition += view.byteLength; 24 | continue; 25 | } 26 | 27 | if (view.buffer != currentBuffer) 28 | { 29 | view.buffer = 0; 30 | view.byteOffset = bytePosition; 31 | bytePosition += view.byteLength; 32 | } 33 | } 34 | 35 | GLTFBuffer buffer = new GLTFBuffer(); 36 | 37 | if (preferences.format == FormatEnum.gltf) 38 | { 39 | string bufferUri = string.Concat(preferences.fileName, BIN); 40 | buffer.uri = bufferUri; 41 | } 42 | 43 | buffer.byteLength = bytePosition; 44 | buffers.Clear(); 45 | buffers.Add(buffer); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Export/Compression.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Export 2 | { 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using Common_glTF_Exporter.Windows.MainWindow; 6 | using dracowrapper; 7 | 8 | public class Compression 9 | { 10 | /// 11 | /// Run compression. 12 | /// 13 | /// preferences. 14 | public static void Run(Preferences preferences, Common_glTF_Exporter.ViewModel.ProgressBarWindowViewModel progressBar) 15 | { 16 | switch (preferences.compression) 17 | { 18 | case CompressionEnum.ZIP: 19 | progressBar.Message = "Compressing to ZIP"; 20 | ZIP.Compress(preferences); 21 | break; 22 | case CompressionEnum.Draco: 23 | progressBar.Message = "Compressing to Draco"; 24 | Draco.Compress(preferences); 25 | break; 26 | case CompressionEnum.Meshopt: 27 | progressBar.Message = "Compressing to MeshOpt"; 28 | MeshOpt.Compress(preferences); 29 | break; 30 | default: 31 | break; 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Export/Draco.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Reflection; 5 | using System.Windows; 6 | using Common_glTF_Exporter.Model; 7 | using Common_glTF_Exporter.Windows.MainWindow; 8 | using dracowrapper; 9 | 10 | namespace Common_glTF_Exporter.Export 11 | { 12 | public static class Draco 13 | { 14 | public static void Compress(Preferences preferences) 15 | { 16 | List files = new List(); 17 | string fileToCompress; 18 | string fileToCompressTemp; 19 | 20 | if (preferences.format == FormatEnum.gltf) 21 | { 22 | fileToCompress = string.Concat(preferences.path, ".gltf"); 23 | fileToCompressTemp = string.Concat(preferences.path, "Temp.gltf"); 24 | 25 | files.Add(string.Concat(preferences.path, ".bin")); 26 | files.Add(fileToCompress); 27 | } 28 | else 29 | { 30 | fileToCompress = string.Concat(preferences.path, ".glb"); 31 | fileToCompressTemp = string.Concat(preferences.path, "Temp.glb"); 32 | files.Add(fileToCompress); 33 | } 34 | 35 | #if REVIT2025 36 | 37 | var loadContext = new NonCollectibleAssemblyLoadContext(); 38 | 39 | string programDataPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData); 40 | string assemblyPath = Path.Combine(programDataPath, "Autodesk", "ApplicationPlugins", "leia.bundle", "Contents", "2025", "DracoWrapper.dll"); 41 | 42 | Assembly mixedModeAssembly = loadContext.LoadFromAssemblyPath(assemblyPath); 43 | 44 | var gltfDecoderType = mixedModeAssembly.GetType("dracowrapper.GltfDecoder"); 45 | var gltfDecoderInstance = Activator.CreateInstance(gltfDecoderType); 46 | 47 | var decodeFromFileToSceneMethod = gltfDecoderType.GetMethod("DecodeFromFileToScene"); 48 | var res = decodeFromFileToSceneMethod.Invoke(gltfDecoderInstance, new object[] { fileToCompress }); 49 | var resType = res.GetType(); 50 | var valueMethod = resType.GetMethod("Value"); 51 | var scene = valueMethod.Invoke(res, null); 52 | 53 | var dracoCompressionOptionsType = mixedModeAssembly.GetType("dracowrapper.DracoCompressionOptions"); 54 | var dracoCompressionOptionsInstance = Activator.CreateInstance(dracoCompressionOptionsType); 55 | 56 | var sceneUtilsType = mixedModeAssembly.GetType("dracowrapper.SceneUtils"); 57 | var setDracoCompressionOptionsMethod = sceneUtilsType.GetMethod("SetDracoCompressionOptions"); 58 | setDracoCompressionOptionsMethod.Invoke(null, new object[] { dracoCompressionOptionsInstance, scene }); 59 | 60 | var gltfEncoderType = mixedModeAssembly.GetType("dracowrapper.GltfEncoder"); 61 | var gltfEncoderInstance = Activator.CreateInstance(gltfEncoderType); 62 | var encodeSceneToFileMethod = gltfEncoderType.GetMethod("EncodeSceneToFile"); 63 | encodeSceneToFileMethod.Invoke(gltfEncoderInstance, new object[] { scene, fileToCompressTemp }); 64 | 65 | #else 66 | 67 | var decoder = new GltfDecoder(); 68 | var res = decoder.DecodeFromFileToScene(fileToCompress); 69 | var scene = res.Value(); 70 | DracoCompressionOptions options = new DracoCompressionOptions(); 71 | SceneUtils.SetDracoCompressionOptions(options, scene); 72 | var encoder = new GltfEncoder(); 73 | encoder.EncodeSceneToFile(scene, fileToCompressTemp); 74 | 75 | #endif 76 | 77 | files.ForEach(x => File.Delete(x)); 78 | File.Move(fileToCompressTemp, fileToCompress); 79 | 80 | if (preferences.format == FormatEnum.gltf) 81 | { 82 | string binToReplace = fileToCompressTemp.Replace(".gltf", ".bin"); 83 | string binFinalName = fileToCompressTemp.Replace("Temp.gltf", ".bin"); 84 | File.Move(binToReplace, binFinalName); 85 | 86 | string text = File.ReadAllText(fileToCompress); 87 | text = text.Replace(Path.GetFileName(binToReplace), Path.GetFileName(binFinalName)); 88 | File.WriteAllText(fileToCompress, text); 89 | } 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Export/FileExport.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using Autodesk.Revit.DB; 7 | using Common_glTF_Exporter.Core; 8 | using Common_glTF_Exporter.Windows.MainWindow; 9 | using Newtonsoft.Json; 10 | using Revit_glTF_Exporter; 11 | 12 | namespace Common_glTF_Exporter.Export 13 | { 14 | public static class FileExport 15 | { 16 | const string BIN = ".bin"; 17 | const string GLTF = ".gltf"; 18 | 19 | public static void Run( 20 | Preferences preferences, 21 | List bufferViews, 22 | List buffers, 23 | List binaryFileData, List scenes, 24 | IndexedDictionary nodes, 25 | IndexedDictionary meshes, 26 | IndexedDictionary materials, 27 | List accessors) 28 | { 29 | if (preferences.format == FormatEnum.gltf) 30 | { 31 | BufferConfig.Run(bufferViews, buffers, preferences); 32 | string fileDirectory = string.Concat(preferences.path, BIN); 33 | BinFile.Create(fileDirectory, binaryFileData, preferences.normals, preferences.batchId); 34 | 35 | string gltfJson = GltfJson.Get(scenes, nodes.List, meshes.List, materials.List, buffers, 36 | bufferViews, accessors, preferences); 37 | 38 | string gltfName = string.Concat(preferences.path, GLTF); 39 | File.WriteAllText(gltfName, gltfJson, Encoding.UTF8); 40 | } 41 | else 42 | { 43 | BufferConfig.Run(bufferViews, buffers, preferences); 44 | 45 | string gltfJson = GltfJson.Get(scenes, nodes.List, meshes.List, materials.List, buffers, 46 | bufferViews, accessors, preferences); 47 | 48 | GlbFile.Create(preferences, binaryFileData, gltfJson); 49 | } 50 | 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Export/GlbBinInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Common_glTF_Exporter.Core; 6 | using Common_glTF_Exporter.Model; 7 | 8 | namespace Common_glTF_Exporter.Export 9 | { 10 | public static class GlbBinInfo 11 | { 12 | public static byte[] Get(List binaryFileData, bool exportNormals, bool exportBatchId) 13 | { 14 | List binData = new List(); 15 | 16 | foreach (var bin in binaryFileData) 17 | { 18 | foreach (var coord in bin.vertexBuffer) 19 | { 20 | List vertex = BitConverter.GetBytes((float)coord).ToList(); 21 | binData.AddRange(vertex); 22 | } 23 | 24 | if (exportNormals) 25 | { 26 | foreach (var normal in bin.normalBuffer) 27 | { 28 | List normalBuffer = BitConverter.GetBytes((float)normal).ToList(); 29 | binData.AddRange(normalBuffer); 30 | } 31 | } 32 | 33 | if (exportBatchId) 34 | { 35 | foreach (var batchId in bin.batchIdBuffer) 36 | { 37 | List batchIdBuffer = BitConverter.GetBytes((float)batchId).ToList(); 38 | binData.AddRange(batchIdBuffer); 39 | } 40 | } 41 | 42 | foreach (var index in bin.indexBuffer) 43 | { 44 | List indexIdBuffer = BitConverter.GetBytes((int)index).ToList(); 45 | binData.AddRange(indexIdBuffer); 46 | } 47 | } 48 | 49 | if (binData.Count % 4 != 0) 50 | { 51 | int missingNumbers = 4 - (binData.Count % 4); 52 | for (int i = 0; i < missingNumbers; i++) 53 | { 54 | byte emptyByte = (byte)00; 55 | List zeros = new List { emptyByte }; 56 | binData.AddRange(zeros); 57 | } 58 | } 59 | 60 | GlbBin glbBin = new GlbBin(); 61 | glbBin.ChunkData = binData.ToArray(); 62 | glbBin.Length = BitConverter.GetBytes(Convert.ToUInt32(glbBin.ChunkData.Length)); 63 | 64 | byte[] result = new byte[] { }; 65 | result = result.Concat(glbBin.Length).ToArray(); 66 | result = result.Concat(glbBin.ChunkType()).ToArray(); 67 | result = result.Concat(glbBin.ChunkData).ToArray(); 68 | 69 | return result; 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Export/GlbFile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Windows.Forms; 7 | using Common_glTF_Exporter.Core; 8 | using Common_glTF_Exporter.Windows.MainWindow; 9 | 10 | namespace Common_glTF_Exporter.Export 11 | { 12 | internal class GlbFile 13 | { 14 | public static void Create(Preferences preferences, List binaryFileData, string json) 15 | { 16 | byte[] jsonChunk = GlbJsonInfo.Get(json); 17 | byte[] binChunk = GlbBinInfo.Get(binaryFileData, preferences.normals, preferences.batchId); 18 | byte[] headerChunk = GlbHeaderInfo.Get(jsonChunk, binChunk); 19 | 20 | string fileDirectory = string.Concat(preferences.path, ".glb"); 21 | byte[] exportArray = headerChunk.Concat(jsonChunk).Concat(binChunk).ToArray(); 22 | 23 | File.WriteAllBytes(fileDirectory, exportArray); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Export/GlbHeaderInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Common_glTF_Exporter.Model; 6 | 7 | namespace Common_glTF_Exporter.Export 8 | { 9 | public static class GlbHeaderInfo 10 | { 11 | public static byte[] Get(byte[] json, byte[] bin) 12 | { 13 | GlbHeader glbHeader = new GlbHeader(); 14 | glbHeader.Length = BitConverter.GetBytes(Convert.ToUInt32(json.Length + bin.Length + 12)); 15 | 16 | byte[] result = new byte[] { }; 17 | result = result.Concat(glbHeader.Magic()).ToArray(); 18 | result = result.Concat(glbHeader.Version()).ToArray(); 19 | result = result.Concat(glbHeader.Length).ToArray(); 20 | 21 | return result; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Export/GlbJsonInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Common_glTF_Exporter.Model; 6 | 7 | namespace Common_glTF_Exporter.Export 8 | { 9 | public static class GlbJsonInfo 10 | { 11 | public static byte[] Get(string json) 12 | { 13 | GlbJson glbJson = new GlbJson(); 14 | 15 | if (json.Length % 4 != 0) 16 | { 17 | int missingNumbers = 4 - (json.Length % 4); 18 | json = json.PadRight(json.Length + missingNumbers); 19 | } 20 | 21 | glbJson.ChunkData = Encoding.UTF8.GetBytes(json); 22 | glbJson.Length = BitConverter.GetBytes(Convert.ToUInt32(glbJson.ChunkData.Length)); 23 | 24 | byte[] result = new byte[] { }; 25 | result = result.Concat(glbJson.Length).ToArray(); 26 | result = result.Concat(glbJson.ChunkType()).ToArray(); 27 | result = result.Concat(glbJson.ChunkData).ToArray(); 28 | 29 | return result; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Export/GltfJson.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Autodesk.Revit.DB; 6 | using Common_glTF_Exporter.Core; 7 | using Common_glTF_Exporter.Windows.MainWindow; 8 | using Newtonsoft.Json; 9 | using Revit_glTF_Exporter; 10 | 11 | namespace Common_glTF_Exporter.Export 12 | { 13 | public static class GltfJson 14 | { 15 | public static string Get( 16 | List scenes, 17 | List nodes, 18 | List meshes, 19 | List materials, 20 | List buffers, 21 | List bufferViews, 22 | List accessors, 23 | Preferences preferences) 24 | { 25 | // Package the properties into a serializable container 26 | GLTF model = new GLTF 27 | { 28 | asset = new GLTFVersion(), 29 | scenes = scenes, 30 | nodes = nodes, 31 | meshes = meshes, 32 | }; 33 | 34 | if (materials.Any()) 35 | { 36 | model.materials = materials; 37 | } 38 | 39 | model.buffers = buffers; 40 | model.bufferViews = bufferViews; 41 | model.accessors = accessors; 42 | 43 | // Write the *.gltf file 44 | string serializedModel = JsonConvert.SerializeObject( 45 | model, 46 | new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }); 47 | 48 | 49 | if (!preferences.batchId) 50 | { 51 | serializedModel = serializedModel.Replace(",\"_BATCHID\":0", string.Empty); 52 | } 53 | 54 | if (!preferences.normals) 55 | { 56 | serializedModel = serializedModel.Replace(",\"NORMAL\":0", string.Empty); 57 | } 58 | 59 | return serializedModel; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Export/MeshOpt.cs: -------------------------------------------------------------------------------- 1 | using Common_glTF_Exporter.Model; 2 | using Common_glTF_Exporter.Windows.MainWindow; 3 | using System.IO; 4 | using System.Reflection; 5 | using System.Collections.Generic; 6 | using Autodesk.Revit.DB; 7 | using System; 8 | 9 | namespace Common_glTF_Exporter.Export 10 | { 11 | public static class MeshOpt 12 | { 13 | public static void Compress(Preferences preferences) 14 | { 15 | List files = new List(); 16 | string fileToCompress; 17 | string fileToCompressTemp; 18 | 19 | if (preferences.format == FormatEnum.gltf) 20 | { 21 | fileToCompress = string.Concat(preferences.path, ".gltf"); 22 | fileToCompressTemp = string.Concat(preferences.path, "Temp.gltf"); 23 | 24 | files.Add(string.Concat(preferences.path, ".bin")); 25 | files.Add(fileToCompress); 26 | } 27 | else 28 | { 29 | fileToCompress = string.Concat(preferences.path, ".glb"); 30 | fileToCompressTemp = string.Concat(preferences.path, "Temp.glb"); 31 | files.Add(fileToCompress); 32 | } 33 | 34 | #if REVIT2025 35 | 36 | var loadContext = new NonCollectibleAssemblyLoadContext(); 37 | 38 | string programDataPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData); 39 | string meshOptPath = Path.Combine(programDataPath, "Autodesk", "ApplicationPlugins", "leia.bundle", "Contents", "2025", "MeshOpt.dll"); 40 | Assembly mixedModeAssembly = loadContext.LoadFromAssemblyPath(meshOptPath); 41 | MethodInfo defaultSettings = mixedModeAssembly.GetType("Gltf.GltfSettings").GetMethod("defaults"); 42 | 43 | var settings = defaultSettings.Invoke(null, null); 44 | MethodInfo gltfpack = mixedModeAssembly.GetType("Gltf.GltfPack").GetMethod("gltfpack"); 45 | object[] parameters = new object[4]; 46 | parameters[0] = fileToCompress; 47 | parameters[1] = fileToCompressTemp; 48 | parameters[2] = "report.txt"; 49 | parameters[3] = settings; 50 | 51 | gltfpack.Invoke(null, parameters); 52 | 53 | #else 54 | 55 | Gltf.GltfSettings settings = Gltf.GltfSettings.defaults(); 56 | 57 | Gltf.GltfPack.gltfpack(fileToCompress, 58 | fileToCompressTemp, "report.txt", settings); 59 | 60 | #endif 61 | 62 | if (File.Exists(fileToCompressTemp)) 63 | { 64 | files.ForEach(x => File.Delete(x)); 65 | File.Move(fileToCompressTemp, fileToCompress); 66 | } 67 | else 68 | { 69 | Console.WriteLine("The Compression didn't work"); 70 | } 71 | 72 | 73 | if (preferences.format == FormatEnum.gltf) 74 | { 75 | string binToReplace = fileToCompressTemp.Replace(".gltf", ".bin"); 76 | string binFinalName = fileToCompressTemp.Replace("Temp.gltf", ".bin"); 77 | File.Move(binToReplace, binFinalName); 78 | 79 | string text = File.ReadAllText(fileToCompress); 80 | text = text.Replace(Path.GetFileName(binToReplace), Path.GetFileName(binFinalName)); 81 | File.WriteAllText(fileToCompress, text); 82 | } 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Export/RevitGrids.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Export 2 | { 3 | using System.Collections.Generic; 4 | using Autodesk.Revit.DB; 5 | using Common_glTF_Exporter.Core; 6 | using Common_glTF_Exporter.Windows.MainWindow; 7 | using Revit_glTF_Exporter; 8 | 9 | /// 10 | /// Revit grids. 11 | /// 12 | public static class RevitGrids 13 | { 14 | /// 15 | /// Export Revit grids. 16 | /// 17 | /// Revit document. 18 | /// Nodes. 19 | /// root node. 20 | /// preferences. 21 | public static void Export(Document doc, ref IndexedDictionary nodes, ref GLTFNode rootNode, Preferences preferences) 22 | { 23 | using (FilteredElementCollector col = new FilteredElementCollector(doc).OfClass(typeof(Grid))) 24 | { 25 | var grids = col.ToElements(); 26 | for (int i = 0; i < grids.Count; i++) 27 | { 28 | Grid g = grids[i] as Grid; 29 | Line l = g.Curve as Line; 30 | 31 | // TODO: handle Arc, not only Line 32 | if (l == null) 33 | { 34 | continue; 35 | } 36 | 37 | var origin = l.Origin; 38 | var direction = l.Direction; 39 | var length = l.Length; 40 | 41 | var xtras = new GLTFExtras(); 42 | var grid = new RevitGridParametersObject(); 43 | 44 | grid.origin = new List() { origin.X, origin.Y, origin.Z }; 45 | 46 | grid.direction = new List() { direction.X, direction.Y, direction.Z, }; 47 | grid.length = length; 48 | 49 | xtras.gridParameters = grid; 50 | xtras.uniqueId = g.UniqueId; 51 | 52 | if (preferences.properties) 53 | { 54 | xtras.parameters = Util.GetElementParameters(g, true); 55 | } 56 | 57 | var gridNode = new GLTFNode(); 58 | gridNode.name = g.Name; 59 | gridNode.extras = xtras; 60 | 61 | nodes.AddOrUpdateCurrent(g.UniqueId, gridNode); 62 | rootNode.children.Add(nodes.CurrentIndex); 63 | } 64 | } 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Export/RevitMaterials.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Export 2 | { 3 | using System.Collections.Generic; 4 | using Autodesk.Revit.DB; 5 | using Common_glTF_Exporter.Core; 6 | using Revit_glTF_Exporter; 7 | 8 | public static class RevitMaterials 9 | { 10 | const string BLEND = "BLEND"; 11 | const string OPAQUE = "OPAQUE"; 12 | const int ONEINTVALUE = 1; 13 | 14 | /// 15 | /// Container for material names (Local cache to avoid Revit API I/O) 16 | /// 17 | static Dictionary MaterialNameContainer = new Dictionary(); 18 | 19 | /// 20 | /// Export Revit materials. 21 | /// 22 | /// node. 23 | /// Revit document. 24 | /// Materials. 25 | public static void Export(MaterialNode node, Document doc, ref IndexedDictionary materials) 26 | { 27 | ElementId id = node.MaterialId; 28 | GLTFMaterial gl_mat = new GLTFMaterial(); 29 | float opacity = ONEINTVALUE - (float)node.Transparency; 30 | 31 | // Validate if the material is valid because for some reason there are 32 | // materials with invalid Ids 33 | if (id != ElementId.InvalidElementId) 34 | { 35 | string uniqueId; 36 | if (!MaterialNameContainer.TryGetValue(node.MaterialId, out var materialElement)) 37 | { 38 | // construct a material from the node 39 | var m = doc.GetElement(node.MaterialId); 40 | gl_mat.name = m.Name; 41 | uniqueId = m.UniqueId; 42 | MaterialNameContainer.Add(node.MaterialId, new MaterialCacheDTO(m.Name, m.UniqueId)); 43 | } 44 | else 45 | { 46 | var elementData = MaterialNameContainer[node.MaterialId]; 47 | gl_mat.name = elementData.MaterialName; 48 | uniqueId = elementData.UniqueId; 49 | } 50 | 51 | GLTFPBR pbr = new GLTFPBR(); 52 | SetMaterialsProperties(node, opacity, ref pbr, ref gl_mat); 53 | 54 | materials.AddOrUpdateCurrentMaterial(uniqueId, gl_mat, false); 55 | } 56 | } 57 | 58 | private static void SetMaterialsProperties(MaterialNode node, float opacity, ref GLTFPBR pbr, ref GLTFMaterial gl_mat) 59 | { 60 | pbr.baseColorFactor = new List(4) { node.Color.Red / 255f, node.Color.Green / 255f, node.Color.Blue / 255f, opacity }; 61 | pbr.metallicFactor = 0f; 62 | pbr.roughnessFactor = opacity != 1 ? 0.5f : 1f; 63 | gl_mat.pbrMetallicRoughness = pbr; 64 | 65 | // TODO: Implement MASK alphamode for elements like leaves or wire fences 66 | gl_mat.alphaMode = opacity != 1 ? BLEND : OPAQUE; 67 | gl_mat.alphaCutoff = null; 68 | } 69 | } 70 | 71 | public class MaterialCacheDTO 72 | { 73 | public MaterialCacheDTO(string materialName, string uniqueId) 74 | { 75 | MaterialName = materialName; 76 | UniqueId = uniqueId; 77 | } 78 | 79 | public string MaterialName { get; set; } 80 | 81 | public string UniqueId { get; set; } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Export/ZIP.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Export 2 | { 3 | using Common_glTF_Exporter.Windows.MainWindow; 4 | using System.Collections.Generic; 5 | using System.IO; 6 | using System.IO.Compression; 7 | 8 | public static class ZIP 9 | { 10 | /// 11 | /// Compress ZIP file. 12 | /// 13 | /// ZIP file name. 14 | /// Files. 15 | public static void Compress(Preferences preferences) 16 | { 17 | List files = new List(); 18 | try 19 | { 20 | string zipFile = string.Concat(preferences.path, ".zip"); 21 | 22 | if (preferences.format == FormatEnum.gltf) 23 | { 24 | string gltfFile = string.Concat(preferences.path, ".gltf"); 25 | string binFile = string.Concat(preferences.path, ".bin"); 26 | 27 | files.Add(gltfFile); 28 | files.Add(binFile); 29 | } 30 | else 31 | { 32 | string glbFile = string.Concat(preferences.path, ".glb"); 33 | files.Add(glbFile); 34 | } 35 | 36 | // Validate if there is an existing ZIP 37 | if (File.Exists(zipFile)) 38 | { 39 | File.Delete(zipFile); 40 | } 41 | 42 | zipAction(zipFile, files); 43 | } 44 | finally 45 | { 46 | // -- always delete files in finally to ensure the cleanup if some error exists 47 | files.ForEach(x => File.Delete(x)); 48 | } 49 | } 50 | 51 | private static void zipAction(string zipName, List files) 52 | { 53 | var zip = ZipFile.Open(zipName, ZipArchiveMode.Create); 54 | 55 | foreach (var file in files) 56 | { 57 | // Add the entry for each file 58 | zip.CreateEntryFromFile(file, Path.GetFileName(file), CompressionLevel.Optimal); 59 | } 60 | 61 | // Dispose of the object when we are done 62 | zip.Dispose(); 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/ExternalCommand.cs: -------------------------------------------------------------------------------- 1 | namespace Revit_glTF_Exporter 2 | { 3 | using Autodesk.Revit.ApplicationServices; 4 | using Autodesk.Revit.Attributes; 5 | using Autodesk.Revit.DB; 6 | using Autodesk.Revit.UI; 7 | using System; 8 | using Common_glTF_Exporter.Utils; 9 | 10 | [Transaction(TransactionMode.Manual)] 11 | [Regeneration(RegenerationOption.Manual)] 12 | public class ExternalCommand : IExternalCommand 13 | { 14 | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) 15 | { 16 | try 17 | { 18 | UIApplication uiapp = commandData.Application; 19 | UIDocument uidoc = uiapp.ActiveUIDocument; 20 | Application app = uiapp.Application; 21 | Document doc = uidoc.Document; 22 | 23 | View view = doc.ActiveView; 24 | 25 | SettingsConfig.SetValue("user", app.Username); 26 | SettingsConfig.SetValue("release", app.VersionName); 27 | 28 | if (view.GetType().Name != "View3D") 29 | { 30 | MessageWindow.Show("Wrong View", "You must be in a 3D view to export"); 31 | return Result.Succeeded; 32 | } 33 | 34 | MainWindow mainWindow = new MainWindow(doc, view); 35 | mainWindow.ShowDialog(); 36 | 37 | return Result.Succeeded; 38 | } 39 | catch (Exception ex) 40 | { 41 | Analytics.Send("Error", ex.Message).GetAwaiter(); 42 | MessageWindow.Show("Error", ex.Message); 43 | return Result.Failed; 44 | } 45 | } 46 | } 47 | 48 | [Transaction(TransactionMode.Manual)] 49 | [Regeneration(RegenerationOption.Manual)] 50 | public class AboutUs : IExternalCommand 51 | { 52 | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) 53 | { 54 | try 55 | { 56 | var mainWindow = new AboutUsWindow(); 57 | mainWindow.ShowDialog(); 58 | 59 | return Result.Succeeded; 60 | } 61 | catch (Exception ex) 62 | { 63 | Analytics.Send("Error", ex.Message).GetAwaiter(); 64 | MessageWindow.Show("Error", ex.Message); 65 | return Result.Failed; 66 | } 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /Common_glTF_Exporter/Fonts/NeuzeitGrotesk-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Common_glTF_Exporter/Fonts/NeuzeitGrotesk-Black.ttf -------------------------------------------------------------------------------- /Common_glTF_Exporter/Fonts/NeuzeitGrotesk-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Common_glTF_Exporter/Fonts/NeuzeitGrotesk-Bold.ttf -------------------------------------------------------------------------------- /Common_glTF_Exporter/Fonts/NeuzeitGrotesk-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Common_glTF_Exporter/Fonts/NeuzeitGrotesk-Light.ttf -------------------------------------------------------------------------------- /Common_glTF_Exporter/Fonts/NeuzeitGrotesk-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Common_glTF_Exporter/Fonts/NeuzeitGrotesk-Regular.ttf -------------------------------------------------------------------------------- /Common_glTF_Exporter/Images/Heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Common_glTF_Exporter/Images/Heart.png -------------------------------------------------------------------------------- /Common_glTF_Exporter/Images/ScreenshotRevit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Common_glTF_Exporter/Images/ScreenshotRevit.png -------------------------------------------------------------------------------- /Common_glTF_Exporter/Images/e-verse-isologo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Common_glTF_Exporter/Images/e-verse-isologo.png -------------------------------------------------------------------------------- /Common_glTF_Exporter/Images/e-verse-logo-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Common_glTF_Exporter/Images/e-verse-logo-1.png -------------------------------------------------------------------------------- /Common_glTF_Exporter/Images/gltf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Common_glTF_Exporter/Images/gltf.png -------------------------------------------------------------------------------- /Common_glTF_Exporter/Images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Common_glTF_Exporter/Images/logo.png -------------------------------------------------------------------------------- /Common_glTF_Exporter/Leia_glTF_Exporter.addin: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Leia_glTF_Exporter 5 | Leia_glTF_Exporter.dll 6 | Revit_glTF_Exporter.ExternalApplication 7 | Leia_glTF_Exporter 8 | Leia glTF Exporter 9 | AlwaysVisible 10 | 11 | 3c679028-b7ed-4cd7-9307-0e9760e7ea8f 12 | 13 | EVRS 14 | e-verse, www.e-verse.com 15 | 16 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Model/FixedObject.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Model 2 | { 3 | using Autodesk.Revit.DB; 4 | 5 | public class FixedObject : IObject 6 | { 7 | public Category Category { get; set; } 8 | 9 | public string FamilySymbol { get; set; } 10 | 11 | public string ElementName { get; set; } 12 | 13 | public ElementId EId { get; set; } 14 | 15 | public Location Location { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Model/FixedObjects.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Model 2 | { 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using Autodesk.Revit.DB; 6 | 7 | public class FixedObjects 8 | { 9 | public FixedObjects() 10 | { 11 | this.ObjectsList = new List(); 12 | } 13 | 14 | public List ObjectsList { get; set; } 15 | 16 | public int Count 17 | { 18 | get { return this.Count; } 19 | set { this.Count = this.ObjectsList.Count(); } 20 | } 21 | 22 | public Category Category 23 | { 24 | get { return this.Category; } 25 | set { this.Category = this.ObjectsList.FirstOrDefault().Category; } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Model/GeometryDataObject.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Model 2 | { 3 | using System.Collections.Generic; 4 | 5 | /// 6 | /// Intermediate data format for converting between Revit Polymesh and glTF buffers. 7 | /// 8 | public class GeometryDataObject 9 | { 10 | public List Vertices { get; set; } = new List(); 11 | 12 | public List Normals { get; set; } = new List(); 13 | 14 | public List Uvs { get; set; } = new List(); 15 | 16 | public List Faces { get; set; } = new List(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Model/GlbComponents.cs: -------------------------------------------------------------------------------- 1 | using Autodesk.Revit.DB; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace Common_glTF_Exporter.Model 7 | { 8 | public class GlbHeader 9 | { 10 | public byte[] Magic() 11 | { 12 | return new byte[] { 0x67, 0x6C, 0x54, 0x46, }; 13 | } 14 | 15 | public byte[] Version() 16 | { 17 | return new byte[] { 0x02, 0x00, 0x00, 0x00, }; 18 | } 19 | 20 | public byte[] Length { get; set; } 21 | 22 | } 23 | 24 | public class GlbJson 25 | { 26 | public byte[] Length { get; set; } 27 | 28 | public byte[] ChunkType() 29 | { 30 | return new byte[] { 0x4a, 0x53, 0x4f, 0x4e, }; 31 | } 32 | 33 | public byte[] ChunkData { get; set; } 34 | 35 | } 36 | 37 | public class GlbBin 38 | { 39 | public byte[] Length { get; set; } 40 | 41 | public byte[] ChunkType() 42 | { 43 | return new byte[] { 0x42, 0x49, 0x4e, 0x00, }; 44 | } 45 | 46 | public byte[] ChunkData { get; set; } 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Model/IObject.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Model 2 | { 3 | using Autodesk.Revit.DB; 4 | 5 | public interface IObject 6 | { 7 | Category Category { get; set; } 8 | 9 | string FamilySymbol { get; set; } 10 | 11 | string ElementName { get; set; } 12 | 13 | ElementId EId { get; set; } 14 | 15 | Location Location { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Model/IObjects.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Model 2 | { 3 | using System.Collections.Generic; 4 | using Autodesk.Revit.DB; 5 | 6 | public interface IObjects 7 | { 8 | List ObjectsList { get; set; } 9 | 10 | int Count { get; set; } 11 | 12 | Category Category { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Model/Links.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using static System.Net.WebRequestMethods; 5 | 6 | namespace Common_glTF_Exporter 7 | { 8 | public class Links 9 | { 10 | public static string contactLink = "https://e-verse.com/contact/"; 11 | public static string everseWebsite = "https://e-verse.com"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Model/LoadContext.cs: -------------------------------------------------------------------------------- 1 | #if REVIT2025 2 | using System.Runtime.Loader; 3 | 4 | namespace Common_glTF_Exporter.Model 5 | { 6 | public class NonCollectibleAssemblyLoadContext : AssemblyLoadContext 7 | { 8 | public NonCollectibleAssemblyLoadContext() : base(isCollectible: false) 9 | { 10 | } 11 | } 12 | 13 | } 14 | #endif -------------------------------------------------------------------------------- /Common_glTF_Exporter/Model/MovableObject.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Model 2 | { 3 | using Autodesk.Revit.DB; 4 | 5 | public class MovableObject : IObject 6 | { 7 | public Category Category { get; set; } 8 | 9 | public string FamilySymbol { get; set; } 10 | 11 | public string ElementName { get; set; } 12 | 13 | public ElementId EId { get; set; } 14 | 15 | public Location Location { get; set; } 16 | 17 | public ElementId RoomId { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Model/MovableObjects.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Model 2 | { 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using Autodesk.Revit.DB; 6 | 7 | public class MovableObjects 8 | { 9 | public MovableObjects() 10 | { 11 | this.ObjectsList = new List(); 12 | } 13 | 14 | public List ObjectsList { get; set; } 15 | 16 | public int Count 17 | { 18 | get { return this.Count; } 19 | set { this.Count = this.ObjectsList.Count(); } 20 | } 21 | 22 | public Category Category 23 | { 24 | get { return this.Category; } 25 | set { this.Category = this.ObjectsList.FirstOrDefault().Category; } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Model/Payload.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Common_glTF_Exporter.Model 8 | { 9 | public class Payload 10 | { 11 | public string Key { get; set; } 12 | 13 | public string Version { get; set; } 14 | 15 | public bool Update { get; set; } 16 | 17 | public int NumberVersion { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Model/PointIntObject.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Model 2 | { 3 | using System; 4 | using Autodesk.Revit.DB; 5 | using Common_glTF_Exporter.Windows.MainWindow; 6 | using Revit_glTF_Exporter; 7 | 8 | /// 9 | /// From Jeremy Tammik's RvtVa3c exporter: 10 | /// https://github.com/va3c/RvtVa3c 11 | /// An integer-based 3D point class. 12 | /// 13 | public class PointIntObject : IComparable 14 | { 15 | public PointIntObject(XYZ p) 16 | { 17 | this.X = p.X; 18 | this.Y = p.Y; 19 | this.Z = p.Z; 20 | } 21 | 22 | public double X { get; set; } 23 | 24 | public double Y { get; set; } 25 | 26 | public double Z { get; set; } 27 | 28 | public int CompareTo(PointIntObject a) 29 | { 30 | double d = this.X - a.X; 31 | if (d == 0) 32 | { 33 | d = this.Y - a.Y; 34 | if (d == 0) 35 | { 36 | d = this.Z - a.Z; 37 | } 38 | } 39 | 40 | return (d == 0) ? 0 : ((d > 0) ? 1 : -1); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Model/RevitGridParametersObject.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Export 2 | { 3 | using System.Collections.Generic; 4 | 5 | public class RevitGridParametersObject 6 | { 7 | public List origin { get; set; } 8 | 9 | public List direction { get; set; } 10 | 11 | public double length { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Model/Room.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Model 2 | { 3 | using System.Collections.Generic; 4 | using Autodesk.Revit.DB; 5 | 6 | public class Room 7 | { 8 | public string Name { get; set; } 9 | 10 | public Element Element { get; set; } 11 | 12 | public ElementId ElementId { get; set; } 13 | 14 | public List ElementList { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Model/UnitObject.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Model 2 | { 3 | using Autodesk.Revit.DB; 4 | 5 | public class UnitObject 6 | { 7 | public UnitObject( 8 | #if REVIT2019 || REVIT2020 9 | DisplayUnitType displayUnitType) 10 | #else 11 | ForgeTypeId forgeTypeId) 12 | #endif 13 | { 14 | #if REVIT2019 || REVIT2020 15 | 16 | this.DisplayUnitType = displayUnitType; 17 | this.Label = LabelUtils.GetLabelFor(DisplayUnitType); 18 | 19 | #else 20 | 21 | ForgeTypeId = forgeTypeId; 22 | Label = LabelUtils.GetLabelForUnit(forgeTypeId).ToString(); 23 | 24 | #endif 25 | } 26 | 27 | #if REVIT2019 || REVIT2020 28 | public DisplayUnitType DisplayUnitType { get; internal set; } 29 | 30 | #else 31 | public ForgeTypeId ForgeTypeId { get; internal set; } 32 | 33 | #endif 34 | public string Label { get; internal set; } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Model/VertexLookupIntObject.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Model 2 | { 3 | using System.Collections.Generic; 4 | 5 | /// 6 | /// From Jeremy Tammik's RvtVa3c exporter: 7 | /// https://github.com/va3c/RvtVa3c 8 | /// A vertex lookup class to eliminate duplicate vertex definitions. 9 | /// 10 | public class VertexLookupIntObject : Dictionary 11 | { 12 | /// 13 | /// Return the index of the given vertex, 14 | /// adding a new entry if required. 15 | /// 16 | /// PointIntObject. 17 | /// Key position. 18 | public int AddVertex(PointIntObject p) 19 | { 20 | return this.ContainsKey(p) 21 | ? this[p] 22 | : this[p] = this.Count; 23 | } 24 | 25 | /// 26 | /// Define equality for integer-based PointInt. 27 | /// 28 | public class PointIntEqualityComparer : IEqualityComparer 29 | { 30 | public bool Equals(PointIntObject p, PointIntObject q) 31 | { 32 | return p.CompareTo(q) == 0; 33 | } 34 | 35 | public int GetHashCode(PointIntObject p) 36 | { 37 | return string.Concat(p.X.ToString(), ",", p.Y.ToString(), ",", p.Z.ToString()).GetHashCode(); 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/PackageContents.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Transform/ModelRotation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Common_glTF_Exporter.Transform 6 | { 7 | internal class ModelRotation 8 | { 9 | public static List Get(bool flipAxis) 10 | { 11 | if (flipAxis) 12 | { 13 | return new List { 0.7071, 0, 0, -0.7071 }; 14 | } 15 | else 16 | { 17 | return new List { 0, 0, 0, 1}; 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Transform/ModelScale.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Windows.Forms; 5 | using Common_glTF_Exporter.Windows.MainWindow; 6 | using Revit_glTF_Exporter; 7 | 8 | namespace Common_glTF_Exporter.Transform 9 | { 10 | public static class ModelScale 11 | { 12 | public static List Get(Preferences preferences) 13 | { 14 | double scale = Util.ConvertFeetToUnitTypeId(preferences); 15 | return new List { scale, scale, scale }; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Transform/ModelTraslation.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Windows.MainWindow 2 | { 3 | using System.Collections.Generic; 4 | using Autodesk.Revit.DB; 5 | using Common_glTF_Exporter.Utils; 6 | using Revit_glTF_Exporter; 7 | 8 | public static class ModelTraslation 9 | { 10 | public static List GetPointToRelocate(Document doc, double scale, Preferences preferences, bool isRfa) 11 | { 12 | 13 | if (preferences.relocateTo0) 14 | { 15 | List elementsOnActiveView = new List(); 16 | if (isRfa) 17 | { 18 | elementsOnActiveView = Collectors.AllVisibleElementsByViewRfa(doc, doc.ActiveView); 19 | } 20 | else 21 | { 22 | elementsOnActiveView = Collectors.AllVisibleElementsByView(doc, doc.ActiveView); 23 | } 24 | 25 | var bb = Util.GetElementsBoundingBox(doc.ActiveView, elementsOnActiveView); 26 | 27 | if (preferences.flipAxis) 28 | { 29 | double pointX = -scale * ((bb.Min.X + bb.Max.X) / 2); 30 | double pointy = -scale * bb.Min.Z; 31 | double pointz = -scale * ((bb.Min.Y + bb.Max.Y) / 2); 32 | return new List { (float)pointX, (float)pointy, -(float)pointz }; 33 | } 34 | else 35 | { 36 | double pointX = -scale * ((bb.Min.X + bb.Max.X) / 2); 37 | double pointy = -scale * ((bb.Min.Z + bb.Max.Z) / 2); 38 | double pointz = -scale * bb.Min.Y; 39 | return new List { (float)pointX, (float)pointz, (float)pointy }; 40 | } 41 | } 42 | 43 | return new List { 0, 0, 0 }; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Utils/Analytics.cs: -------------------------------------------------------------------------------- 1 | using Autodesk.Revit.DB; 2 | using System; 3 | using System.Globalization; 4 | using System.Net.Http; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Common_glTF_Exporter.Utils 9 | { 10 | public class Analytics 11 | { 12 | private static string apiUrl = "https://expoterAPI"; 13 | 14 | public static async Task Send(string action, string details) 15 | { 16 | DateTime currentDate = DateTime.Now; 17 | string date = currentDate.ToString("MM/dd/yyyy HH:mm:ss"); 18 | 19 | RegionInfo currentRegion = new RegionInfo(CultureInfo.CurrentCulture.Name); 20 | string location = currentRegion.EnglishName.ToString(); 21 | 22 | string user = SettingsConfig.GetValue("user"); 23 | string software = SettingsConfig.GetValue("release"); 24 | string version = SettingsConfig.GetValue("version"); 25 | 26 | // Use string interpolation to incorporate variables into the JSON string 27 | string json = $@"{{ 28 | ""User"": ""{user}"", 29 | ""Location"": ""{location}"", 30 | ""Software"": ""{software}"", 31 | ""Date"": ""{date}"", 32 | ""Action"": ""{action}"", 33 | ""Details"": ""{details}"", 34 | ""Version"": ""{version}"" 35 | }}"; 36 | 37 | try 38 | { 39 | var content = new StringContent(json, Encoding.UTF8, "application/json"); 40 | 41 | string apiKey = SettingsConfig.GetValue("apikey"); 42 | 43 | using (HttpClient client = new HttpClient()) 44 | { 45 | client.DefaultRequestHeaders.Add("x-api-key", apiKey); 46 | 47 | var response = await client.PostAsync(apiUrl, content); 48 | 49 | if (response.IsSuccessStatusCode) 50 | { 51 | Console.WriteLine("Request successful"); 52 | } 53 | else 54 | { 55 | Console.WriteLine($"Request failed with status code: {response.StatusCode}"); 56 | } 57 | } 58 | } 59 | catch (Exception ex) 60 | { 61 | Console.WriteLine(ex.Message); 62 | } 63 | } 64 | } 65 | } 66 | 67 | 68 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Utils/Collectors.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Utils 2 | { 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using Autodesk.Revit.DB; 6 | 7 | internal class Collectors 8 | { 9 | public static Material GetRandomMaterial(Document doc) 10 | { 11 | using (var collector = new FilteredElementCollector(doc)) 12 | { 13 | return collector.OfCategory(BuiltInCategory.OST_Materials) 14 | .WhereElementIsNotElementType() 15 | .ToElements() 16 | .Cast() 17 | .FirstOrDefault(); 18 | } 19 | } 20 | 21 | public static List AllVisibleElementsByView(Document doc, View view) 22 | { 23 | using (var collector = new FilteredElementCollector(doc, view.Id)) 24 | { 25 | return collector.WhereElementIsNotElementType() 26 | .ToElements() 27 | .Cast() 28 | .Where(e => e.CanBeHidden(doc.ActiveView) && e.Category != null) 29 | .ToList(); 30 | } 31 | } 32 | 33 | public static List AllVisibleElementsByViewRfa(Document doc, View view) 34 | { 35 | using (var collector = new FilteredElementCollector(doc, view.Id)) 36 | { 37 | return collector.WhereElementIsNotElementType() 38 | .ToElements() 39 | .Cast() 40 | .Where(e => e.CanBeHidden(doc.ActiveView)) 41 | .ToList(); 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Utils/DirectoryUtils.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Common_glTF_Exporter.Utils 4 | { 5 | public static class DirectoryUtils 6 | { 7 | /// 8 | /// Create Directory if it does not exists 9 | /// 10 | public static bool CreateDirectoryIfNotExists(string folder) 11 | { 12 | if (!Directory.Exists(folder)) 13 | { 14 | Directory.CreateDirectory(folder); 15 | return true; 16 | } 17 | else 18 | { 19 | return false; 20 | } 21 | } 22 | 23 | /// 24 | /// Delete Directory if it does exists 25 | /// 26 | public static void DeleteDirectoryIfExists(string folder) 27 | { 28 | if (Directory.Exists(folder)) 29 | { 30 | Directory.Delete(folder, true); 31 | } 32 | } 33 | 34 | public static void DeleteFilesInDirectoyy(string path) 35 | { 36 | string[] files = Directory.GetFiles(path); 37 | foreach (string file in files) 38 | { 39 | File.Delete(file); 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Utils/FilesHelper.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Utils 2 | { 3 | using System.IO; 4 | using System.Windows.Forms; 5 | using Autodesk.Revit.UI; 6 | using Revit_glTF_Exporter; 7 | 8 | internal class FilesHelper 9 | { 10 | public static bool AskToSave(ref string filename, string filter, string defaultExt, string initialDirectory = null) 11 | { 12 | using (System.Windows.Forms.SaveFileDialog saveDialog = new System.Windows.Forms.SaveFileDialog()) 13 | { 14 | saveDialog.Filter = filter; 15 | saveDialog.DefaultExt = defaultExt; 16 | saveDialog.FileName = filename; 17 | 18 | // -- Optional initial directory 19 | if (initialDirectory != null) 20 | { 21 | saveDialog.InitialDirectory = initialDirectory; 22 | } 23 | 24 | DialogResult resultDialog = saveDialog.ShowDialog(); 25 | filename = saveDialog.FileName; 26 | if (resultDialog != System.Windows.Forms.DialogResult.OK) 27 | { 28 | return false; 29 | } 30 | } 31 | 32 | if (File.Exists(filename) && FileIsLocked(filename, FileAccess.ReadWrite)) 33 | { 34 | MessageWindow.Show("Error", "The file is opened by another process, please close it and try again"); 35 | return false; 36 | } 37 | 38 | return true; 39 | } 40 | 41 | internal static bool FileIsLocked(string filename, FileAccess file_access) 42 | { 43 | if (!File.Exists(filename)) 44 | { 45 | return false; 46 | } 47 | 48 | // Try to open the file with the indicated access. 49 | try 50 | { 51 | FileStream fs = new FileStream(filename, FileMode.Open, file_access); 52 | fs.Close(); 53 | return false; 54 | } 55 | catch (IOException) 56 | { 57 | return true; 58 | } 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Utils/GeometryUtils.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Utils 2 | { 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using Autodesk.Revit.DB; 6 | 7 | public class GeometryUtils 8 | { 9 | public static List GetMeshes(Document doc, Element element) 10 | { 11 | var geoEle = GetGeometryElement(doc, element); 12 | 13 | List meshes = new List(); 14 | foreach (GeometryInstance geoObject in geoEle.OfType()) 15 | { 16 | foreach (var geoObj in geoObject.GetInstanceGeometry().OfType()) 17 | { 18 | Mesh mesh = geoObj; 19 | meshes.Add(mesh); 20 | } 21 | } 22 | 23 | return meshes; 24 | } 25 | 26 | /// 27 | /// Get the GeometryElement leveraging preset options to Compute References on Active View. 28 | /// 29 | /// Revit Document. 30 | /// Revit Element. 31 | /// The GeometryElement. 32 | public static GeometryElement GetGeometryElement(Document doc, Element element) 33 | { 34 | GeometryElement result; 35 | try 36 | { 37 | Options opt = new Options 38 | { 39 | ComputeReferences = true, 40 | View = doc.ActiveView, 41 | }; 42 | result = element.get_Geometry(opt); 43 | } 44 | catch 45 | { 46 | Options opt = new Options 47 | { 48 | ComputeReferences = true, 49 | }; 50 | result = element.get_Geometry(opt); 51 | } 52 | 53 | return result; 54 | } 55 | 56 | 57 | public static XYZ GetNormal(MeshTriangle triangle) 58 | { 59 | var vertex0 = triangle.get_Vertex(0); 60 | XYZ side1 = triangle.get_Vertex(1) - vertex0; 61 | XYZ side2 = triangle.get_Vertex(2) - vertex0; 62 | XYZ normal = side1.CrossProduct(side2); 63 | return normal.Normalize(); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Utils/Hyperlink.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Text; 5 | 6 | namespace Common_glTF_Exporter.Utils 7 | { 8 | public static class Hyperlink 9 | { 10 | public static void Run(string url) 11 | { 12 | try 13 | { 14 | Process.Start(new ProcessStartInfo(url) { UseShellExecute = true }); 15 | } 16 | catch (Exception ex) 17 | { 18 | Console.WriteLine($"An error occurred: {ex.Message}"); 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Utils/IsDocumentRFA.cs: -------------------------------------------------------------------------------- 1 | using Autodesk.Revit.DB; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using System.Windows.Controls; 6 | 7 | namespace Common_glTF_Exporter.Utils 8 | { 9 | class IsDocumentRFA 10 | { 11 | public static bool Check(Document doc) 12 | { 13 | if (doc.IsFamilyDocument) 14 | { 15 | SettingsConfig.SetValue("isRFA", "true"); 16 | return true; 17 | } 18 | else 19 | { 20 | SettingsConfig.SetValue("isRFA", "false"); 21 | return false; 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Utils/MaterialUtils.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Utils 2 | { 3 | using Autodesk.Revit.DB; 4 | using Common_glTF_Exporter.Core; 5 | using Common_glTF_Exporter.Windows.MainWindow; 6 | using Revit_glTF_Exporter; 7 | 8 | public class MaterialUtils 9 | { 10 | public static Material GetMeshMaterial(Document doc, Mesh mesh) 11 | { 12 | ElementId materialId = mesh.MaterialElementId; 13 | 14 | if (materialId != null) 15 | { 16 | return doc.GetElement(materialId) as Material; 17 | } 18 | else 19 | { 20 | return null; 21 | } 22 | } 23 | 24 | public static void SetMaterial(Document doc, Preferences preferences, Mesh mesh, IndexedDictionary materials, bool doubleSided) 25 | { 26 | GLTFMaterial gl_mat = new GLTFMaterial(); 27 | 28 | Material material = MaterialUtils.GetMeshMaterial(doc, mesh); 29 | 30 | if (preferences.materials) 31 | { 32 | if (material == null) 33 | { 34 | material = Collectors.GetRandomMaterial(doc); 35 | } 36 | 37 | gl_mat = GLTFExportUtils.GetGLTFMaterial(materials.List, material, doubleSided); 38 | 39 | materials.AddOrUpdateCurrentMaterial(material.UniqueId, gl_mat, doubleSided); 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Utils/SettingsConfig.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Utils 2 | { 3 | using Autodesk.Internal.InfoCenter; 4 | using System.Configuration; 5 | using System.IO; 6 | using System.Reflection; 7 | using Configuration = System.Configuration.Configuration; 8 | using Autodesk.Revit.DB; 9 | using System; 10 | using System.Xml; 11 | 12 | public static class SettingsConfig 13 | { 14 | #if REVIT2025 15 | 16 | private static string programDataLocation = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData); 17 | private static string appSettingsFile = string.Concat(programDataLocation, "\\Autodesk\\ApplicationPlugins\\leia.bundle\\Contents\\2025\\Leia_glTF_Exporter.dll.config"); 18 | 19 | public static string GetValue(string key) 20 | { 21 | try 22 | { 23 | XmlDocument doc = new XmlDocument(); 24 | doc.Load(appSettingsFile); 25 | 26 | XmlNode node = doc.SelectSingleNode($"//appSettings/add[@key='{key}']"); 27 | if (node != null) 28 | { 29 | return node.Attributes["value"].Value; 30 | } 31 | else 32 | { 33 | throw new KeyNotFoundException($"Key '{key}' not found in configuration file."); 34 | } 35 | } 36 | catch (Exception ex) 37 | { 38 | // Log or handle the exception as needed 39 | throw new InvalidOperationException($"Error retrieving value for key '{key}'", ex); 40 | } 41 | } 42 | 43 | public static void SetValue(string key, string value) 44 | { 45 | try 46 | { 47 | XmlDocument doc = new XmlDocument(); 48 | doc.Load(appSettingsFile); 49 | 50 | XmlNode node = doc.SelectSingleNode($"//appSettings/add[@key='{key}']"); 51 | if (node != null) 52 | { 53 | node.Attributes["value"].Value = value; 54 | } 55 | else 56 | { 57 | XmlNode appSettingsNode = doc.SelectSingleNode("//appSettings"); 58 | if (appSettingsNode == null) 59 | { 60 | appSettingsNode = doc.CreateElement("appSettings"); 61 | doc.DocumentElement.AppendChild(appSettingsNode); 62 | } 63 | 64 | XmlElement addElement = doc.CreateElement("add"); 65 | addElement.SetAttribute("key", key); 66 | addElement.SetAttribute("value", value); 67 | appSettingsNode.AppendChild(addElement); 68 | } 69 | 70 | doc.Save(appSettingsFile); 71 | } 72 | catch (Exception ex) 73 | { 74 | // Log or handle the exception as needed 75 | throw new InvalidOperationException($"Error setting value for key '{key}'", ex); 76 | } 77 | } 78 | 79 | #else 80 | 81 | private static readonly string BinaryLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); 82 | private static string appSettingsName = string.Concat(Assembly.GetExecutingAssembly().GetName().Name, ".dll.config"); 83 | private static string appSettingsFile = System.IO.Path.Combine(BinaryLocation, appSettingsName); 84 | 85 | public static string GetValue(string key) 86 | { 87 | try 88 | { 89 | Configuration configuration = ConfigurationManager.OpenMappedExeConfiguration(new ExeConfigurationFileMap { ExeConfigFilename = appSettingsFile }, ConfigurationUserLevel.None); 90 | return configuration.AppSettings.Settings[key].Value; 91 | } 92 | catch (Exception ex) 93 | { 94 | // Log or handle the exception as needed 95 | throw new InvalidOperationException($"Error retrieving value for key '{key}'", ex); 96 | } 97 | } 98 | 99 | public static void SetValue(string key, string value) 100 | { 101 | try 102 | { 103 | Configuration configuration = ConfigurationManager.OpenMappedExeConfiguration(new ExeConfigurationFileMap { ExeConfigFilename = appSettingsFile }, ConfigurationUserLevel.None); 104 | configuration.AppSettings.Settings[key].Value = value; 105 | configuration.Save(ConfigurationSaveMode.Modified, true); 106 | ConfigurationManager.RefreshSection("appSettings"); 107 | } 108 | catch (Exception ex) 109 | { 110 | // Log or handle the exception as needed 111 | throw new InvalidOperationException($"Error setting value for key '{key}'", ex); 112 | } 113 | } 114 | #endif 115 | 116 | private static string GetBinaryLocation() 117 | { 118 | string location = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); 119 | 120 | if (string.IsNullOrEmpty(location)) 121 | { 122 | UriBuilder uri = new UriBuilder(Assembly.GetExecutingAssembly().CodeBase); 123 | location = Path.GetDirectoryName(Uri.UnescapeDataString(uri.Path)); 124 | } 125 | 126 | return location; 127 | } 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Version/DownloadFile.cs: -------------------------------------------------------------------------------- 1 | using Autodesk.Revit.DB; 2 | using Autodesk.Revit.UI; 3 | using Common_glTF_Exporter.Utils; 4 | using Revit_glTF_Exporter; 5 | using System; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Net.Http; 9 | using System.Threading.Tasks; 10 | 11 | namespace Common_glTF_Exporter.Version 12 | { 13 | public static class DownloadFile 14 | { 15 | public static async Task FromServer(string pathFile, string installerName) 16 | { 17 | HttpClient client = new HttpClient(); 18 | client.BaseAddress = new Uri("https://vxfcsp1qu4.execute-api.us-east-1.amazonaws.com/Prod/LatestInstaller?bucketName=everse.assets&folderName=Installers"); 19 | 20 | string version = SettingsConfig.GetValue("version"); 21 | string urlParameters = "?inputVersion=" + version + 22 | "&&folderName=" + "e-verse/LeiaGltfExporter"; 23 | 24 | 25 | 26 | HttpResponseMessage result = client.GetAsync(urlParameters, HttpCompletionOption.ResponseHeadersRead).Result; 27 | HttpContent content = result.Content; 28 | string myContent = await content.ReadAsStringAsync(); 29 | 30 | if (!result.IsSuccessStatusCode) 31 | { 32 | return; 33 | } 34 | 35 | double fileSize = await getFileSize(myContent); 36 | if (fileSize == 0) 37 | { 38 | fileSize = 5; 39 | } 40 | 41 | string fileLocation = System.IO.Path.Combine(pathFile, installerName); 42 | 43 | ProgressBarWindow progressBar = 44 | ProgressBarWindow.Create(fileSize, 0, "Downloading Installer"); 45 | 46 | System.Timers.Timer aTimer = new System.Timers.Timer(500); 47 | 48 | // Hook up the Elapsed event for the timer. 49 | aTimer.Elapsed += (s, en) => 50 | { 51 | if (!File.Exists(fileLocation)) 52 | { 53 | return; 54 | } 55 | 56 | FileInfo info = new FileInfo(fileLocation); 57 | int currentMegas = (int)(info.Length / 1000000); 58 | ProgressBarWindow.ViewModel.ProgressBarValue = currentMegas; 59 | }; 60 | aTimer.AutoReset = true; 61 | aTimer.Enabled = true; 62 | 63 | await DownloadFileAsync(myContent, fileLocation); 64 | 65 | ProgressBarWindow.ViewModel.ProgressBarValue = 100 + 1; 66 | ProgressBarWindow.ViewModel.ProgressBarPercentage = 100; 67 | ProgressBarWindow.ViewModel.Message = "Download Complete!"; 68 | progressBar.Close(); 69 | 70 | aTimer.Dispose(); 71 | } 72 | 73 | static async Task DownloadFileAsync(string url, string filePath) 74 | { 75 | using (HttpClient client = new HttpClient()) 76 | { 77 | HttpResponseMessage response = await client.GetAsync(url); 78 | if (response.IsSuccessStatusCode) 79 | { 80 | using (FileStream fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.None)) 81 | { 82 | await response.Content.CopyToAsync(fileStream); 83 | } 84 | } 85 | else 86 | { 87 | Autodesk.Revit.UI.TaskDialog.Show("Title", $"Failed to download file. Status code: {response.StatusCode}"); 88 | Console.WriteLine($"Failed to download file. Status code: {response.StatusCode}"); 89 | } 90 | } 91 | } 92 | 93 | static async Task getFileSize(string signedUrl) 94 | { 95 | 96 | using (HttpClient client = new HttpClient()) 97 | { 98 | // Create a HttpRequestMessage for a HEAD request 99 | HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Head, signedUrl); 100 | 101 | // Send the request 102 | HttpResponseMessage response = await client.SendAsync(request); 103 | 104 | if (response.IsSuccessStatusCode) 105 | { 106 | // Get the Content-Length header value 107 | if (response.Headers.TryGetValues("Content-Length", out var values)) 108 | { 109 | string contentLength = values.FirstOrDefault(); 110 | if (long.TryParse(contentLength, out long fileSizeBytes)) 111 | { 112 | double fileSizeMegabytes = fileSizeBytes / 1024.0 / 1024.0; 113 | return fileSizeMegabytes; 114 | } 115 | } 116 | else 117 | { 118 | return 0; 119 | } 120 | } 121 | 122 | return 0; 123 | 124 | } 125 | } 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Version/InternetConnection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Text; 5 | 6 | namespace Common_glTF_Exporter.Version 7 | { 8 | public static class InternetConnection 9 | { 10 | /// 11 | /// Check if internet connection is available. 12 | /// 13 | /// 14 | public static bool Check() 15 | { 16 | try 17 | { 18 | using (System.Net.WebClient client = new System.Net.WebClient()) 19 | { 20 | using (Stream stream = client.OpenRead("https://www.google.com")) 21 | { 22 | return true; 23 | } 24 | } 25 | } 26 | catch (System.Net.WebException) 27 | { 28 | return false; 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Version/LatestVersion.cs: -------------------------------------------------------------------------------- 1 | using Autodesk.Revit.UI; 2 | using Common_glTF_Exporter.Model; 3 | using Common_glTF_Exporter.Utils; 4 | using Revit_glTF_Exporter; 5 | using System; 6 | using System.Net.Http; 7 | using System.Threading.Tasks; 8 | 9 | 10 | namespace Revit_glTF_Exporter 11 | { 12 | public static class LatestVersion 13 | { 14 | public static async Task Get() 15 | { 16 | HttpClient client = new HttpClient(); 17 | client.BaseAddress = new Uri("https://APIAutoUpdate"); 18 | 19 | string version = SettingsConfig.GetValue("version"); 20 | string urlParameters = "?inputVersion=" + version + 21 | "&&folderName=" + "e-verse/LeiaGltfExporter"; 22 | 23 | try { 24 | HttpResponseMessage result = client.GetAsync(urlParameters, HttpCompletionOption.ResponseHeadersRead).Result; 25 | 26 | if (result.IsSuccessStatusCode) 27 | { 28 | 29 | HttpContent content = result.Content; 30 | string myContent = await content.ReadAsStringAsync(); 31 | 32 | Payload payload = Newtonsoft.Json.JsonConvert.DeserializeObject(myContent); 33 | 34 | if (!payload.Update) 35 | { 36 | VersionWindow versionWindow = new VersionWindow(payload.Version); 37 | versionWindow.ShowDialog(); 38 | } 39 | 40 | content.Dispose(); 41 | } 42 | 43 | client.Dispose(); 44 | } 45 | catch (Exception ex) 46 | { 47 | Console.WriteLine(ex.Message); 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Version/RunLocalFile.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using Common_glTF_Exporter.Utils; 3 | 4 | namespace Common_glTF_Exporter.Version 5 | { 6 | public static class RunLocalFile 7 | { 8 | public static void Action(string pathFile) 9 | { 10 | if (File.Exists(pathFile)) 11 | { 12 | Hyperlink.Run(pathFile); 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Version/VersionValidate.cs: -------------------------------------------------------------------------------- 1 | using Common_glTF_Exporter.Version; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Revit_glTF_Exporter 8 | { 9 | public static class VersionValidation 10 | { 11 | /// 12 | /// Validate internet connection and version config enable 13 | /// 14 | public static async Task Run() 15 | { 16 | if (InternetConnection.Check()) 17 | { 18 | await LatestVersion.Get(); 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/ViewModel/ProgressBarWindowViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.ViewModel 2 | { 3 | using System.ComponentModel; 4 | using System.Runtime.CompilerServices; 5 | using System.Windows.Input; 6 | using Revit_glTF_Exporter; 7 | 8 | public class ProgressBarWindowViewModel : INotifyPropertyChanged 9 | { 10 | private double progressBarMax; 11 | private double progressBarPercentage; 12 | private double progressBarValue; 13 | private double progressBarGraphicValue; 14 | private string message; 15 | private string action; 16 | private ICommand closeWindowCommand; 17 | 18 | public event PropertyChangedEventHandler PropertyChanged; 19 | 20 | public double ProgressBarMax 21 | { 22 | get 23 | { 24 | return this.progressBarMax; 25 | } 26 | 27 | set 28 | { 29 | this.progressBarMax = value; 30 | this.OnPropertyChanged(); 31 | } 32 | } 33 | 34 | public double ProgressBarPercentage 35 | { 36 | get 37 | { 38 | return this.progressBarPercentage; 39 | } 40 | 41 | set 42 | { 43 | this.progressBarPercentage = value; 44 | this.OnPropertyChanged(); 45 | } 46 | } 47 | 48 | public double ProgressBarValue 49 | { 50 | get 51 | { 52 | return this.progressBarValue; 53 | } 54 | 55 | set 56 | { 57 | if (((value / ProgressBarMax) * 100) > 7) 58 | { 59 | ProgressBarGraphicValue = value; 60 | } 61 | 62 | this.progressBarValue = value; 63 | ProgressBarPercentage = (value / ProgressBarMax) * 100; 64 | if (ProgressBarPercentage > 100) 65 | ProgressBarPercentage = 100; 66 | this.OnPropertyChanged(); 67 | } 68 | } 69 | 70 | public double ProgressBarGraphicValue 71 | { 72 | get 73 | { 74 | return this.progressBarGraphicValue; 75 | } 76 | 77 | set 78 | { 79 | this.progressBarGraphicValue = value; 80 | this.OnPropertyChanged(); 81 | } 82 | } 83 | 84 | public string Message 85 | { 86 | get 87 | { 88 | return this.message; 89 | } 90 | 91 | set 92 | { 93 | this.message = value; 94 | this.OnPropertyChanged(); 95 | } 96 | } 97 | 98 | public string Action 99 | { 100 | get 101 | { 102 | return this.action; 103 | } 104 | 105 | set 106 | { 107 | this.action = value; 108 | this.OnPropertyChanged(); 109 | } 110 | } 111 | 112 | public ICommand CloseWindowCommand 113 | { 114 | get { return this.closeWindowCommand; } 115 | set { this.closeWindowCommand = value; } 116 | } 117 | 118 | protected void OnPropertyChanged([CallerMemberName] string name = null) 119 | { 120 | this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name)); 121 | System.Windows.Forms.Application.DoEvents(); 122 | ProgressBarWindow.MainView.Topmost = true; 123 | ProgressBarWindow.MainView.Activate(); 124 | } 125 | } 126 | } -------------------------------------------------------------------------------- /Common_glTF_Exporter/ViewModel/UnitsViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.ViewModel 2 | { 3 | using System.Collections.ObjectModel; 4 | using Autodesk.Revit.DB; 5 | using Common_glTF_Exporter.Model; 6 | 7 | public class UnitsViewModel : ViewModelBase 8 | { 9 | private UnitObject selectedUnit; 10 | private ObservableCollection units; 11 | private string version; 12 | 13 | public UnitsViewModel() 14 | { 15 | #if REVIT2019 || REVIT2020 16 | 17 | this.Units = new ObservableCollection 18 | { 19 | new UnitObject(DisplayUnitType.DUT_METERS), 20 | new UnitObject(DisplayUnitType.DUT_DECIMAL_INCHES), 21 | new UnitObject(DisplayUnitType.DUT_MILLIMETERS), 22 | new UnitObject(DisplayUnitType.DUT_DECIMAL_FEET), 23 | new UnitObject(DisplayUnitType.DUT_CENTIMETERS), 24 | }; 25 | 26 | #else 27 | 28 | this.Units = new ObservableCollection 29 | { 30 | new UnitObject(UnitTypeId.Meters), 31 | new UnitObject(UnitTypeId.Inches), 32 | new UnitObject(UnitTypeId.Millimeters), 33 | new UnitObject(UnitTypeId.Feet), 34 | new UnitObject(UnitTypeId.Centimeters), 35 | }; 36 | 37 | #endif 38 | } 39 | 40 | public UnitObject SelectedUnit 41 | { 42 | get 43 | { 44 | return this.selectedUnit; 45 | } 46 | 47 | set 48 | { 49 | this.selectedUnit = value; 50 | this.OnPropertyChanged(this.SelectedUnit); 51 | } 52 | } 53 | 54 | public ObservableCollection Units 55 | { 56 | get 57 | { 58 | return this.units; 59 | } 60 | 61 | set 62 | { 63 | this.units = value; 64 | this.OnPropertyChanged(); 65 | } 66 | } 67 | 68 | public string Version 69 | { 70 | get 71 | { 72 | return this.version; 73 | } 74 | 75 | set 76 | { 77 | this.version = value; 78 | this.OnPropertyChanged(); 79 | } 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/ViewModel/ViewModelBase.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.ViewModel 2 | { 3 | using System.ComponentModel; 4 | using System.Runtime.CompilerServices; 5 | using Common_glTF_Exporter.Model; 6 | using Common_glTF_Exporter.Utils; 7 | 8 | public class ViewModelBase : INotifyPropertyChanged 9 | { 10 | public event PropertyChangedEventHandler PropertyChanged; 11 | 12 | public virtual void Dispose() 13 | { 14 | } 15 | 16 | protected void OnPropertyChanged(UnitObject unitobject = null, [CallerMemberName] string propertyName = null) 17 | { 18 | this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 19 | if (unitobject != null) 20 | { 21 | #if REVIT2019 || REVIT2020 22 | 23 | SettingsConfig.SetValue("units", unitobject.DisplayUnitType.ToString()); 24 | 25 | #else 26 | 27 | SettingsConfig.SetValue("units", unitobject.ForgeTypeId.TypeId.ToString()); 28 | 29 | #endif 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Windows/AboutUsWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace Revit_glTF_Exporter 2 | { 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | using System.Windows.Input; 6 | using Common_glTF_Exporter; 7 | using Common_glTF_Exporter.Utils; 8 | using Common_glTF_Exporter.ViewModel; 9 | 10 | /// 11 | /// Feedback Window. 12 | /// 13 | public partial class AboutUsWindow : Window 14 | { 15 | public AboutUsWindow() 16 | { 17 | this.InitializeComponent(); 18 | this.DataContext = this; 19 | } 20 | 21 | private void Border_MouseDown(object sender, MouseButtonEventArgs e) 22 | { 23 | this.DragMove(); 24 | } 25 | 26 | private void CancelProcess_Click(object sender, RoutedEventArgs e) 27 | { 28 | this.Close(); 29 | } 30 | 31 | private void Title_Link(object sender, RoutedEventArgs e) 32 | { 33 | Hyperlink.Run(Links.contactLink); 34 | } 35 | private void everse_Link(object sender, RoutedEventArgs e) 36 | { 37 | Hyperlink.Run(Links.everseWebsite); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Windows/FeedbackWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace Revit_glTF_Exporter 2 | { 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | using System.Windows.Input; 6 | using Common_glTF_Exporter.Utils; 7 | using Common_glTF_Exporter.ViewModel; 8 | using Common_glTF_Exporter; 9 | 10 | /// 11 | /// Feedback Window. 12 | /// 13 | public partial class FeedbackWindow : Window 14 | { 15 | public FeedbackWindow() 16 | { 17 | this.InitializeComponent(); 18 | this.DataContext = this; 19 | } 20 | 21 | 22 | public static FeedbackWindow Create() 23 | { 24 | var progressBar = new FeedbackWindow(); 25 | progressBar.Show(); 26 | return progressBar; 27 | } 28 | 29 | private void CloseWindow(object sender, RoutedEventArgs e) 30 | { 31 | if (ProgressBarWindow.MainView != null && ProgressBarWindow.MainView.IsActive) 32 | { 33 | ProgressBarWindow.MainView.Close(); 34 | } 35 | } 36 | 37 | private void Border_MouseDown(object sender, MouseButtonEventArgs e) 38 | { 39 | this.DragMove(); 40 | } 41 | 42 | private void CancelProcess_Click(object sender, RoutedEventArgs e) 43 | { 44 | this.Close(); 45 | } 46 | 47 | private void Title_Link(object sender, RoutedEventArgs e) 48 | { 49 | Hyperlink.Run(Links.contactLink); 50 | } 51 | private void Leia_Link(object sender, RoutedEventArgs e) 52 | { 53 | Hyperlink.Run("https://e-verse.com/leia/"); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Windows/MainWindow/ComboUnits.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Windows.MainWindow 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | using System.Windows.Controls; 7 | using Autodesk.Revit.DB; 8 | using Common_glTF_Exporter.Model; 9 | using Common_glTF_Exporter.Utils; 10 | 11 | public static class ComboUnits 12 | { 13 | public static void Set(Document doc) 14 | { 15 | string initialUnits = SettingsConfig.GetValue("units"); 16 | 17 | #if REVIT2019 || REVIT2020 18 | 19 | if (initialUnits == "null") 20 | { 21 | DisplayUnitType unit = DisplayUnitType.DUT_METERS; 22 | SettingsConfig.SetValue("units", unit.ToString()); 23 | } 24 | 25 | #else 26 | 27 | if (initialUnits == "null") 28 | { 29 | ForgeTypeId unit = UnitTypeId.Meters; 30 | SettingsConfig.SetValue("units", unit.TypeId.ToString()); 31 | } 32 | 33 | #endif 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Windows/MainWindow/LabelVersion.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Windows.MainWindow 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | using System.Windows.Media; 10 | using Autodesk.Revit.UI; 11 | using Common_glTF_Exporter.Utils; 12 | using Common_glTF_Exporter.ViewModel; 13 | using Revit_glTF_Exporter; 14 | 15 | public class LabelVersion 16 | { 17 | public static void Update(UnitsViewModel unitsViewModel) 18 | { 19 | string version = SettingsConfig.GetValue("version"); 20 | 21 | unitsViewModel.Version = version; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Windows/MainWindow/Preferences.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Windows.MainWindow 2 | { 3 | using Autodesk.Revit.DB; 4 | 5 | public enum CompressionEnum 6 | { 7 | None, 8 | Meshopt, 9 | Draco, 10 | ZIP, 11 | } 12 | 13 | public enum FormatEnum 14 | { 15 | gltf, 16 | glb, 17 | } 18 | 19 | public class Preferences 20 | { 21 | public bool materials { get; set; } 22 | 23 | public FormatEnum format { get; set; } 24 | 25 | public bool normals { get; set; } 26 | 27 | public bool levels { get; set; } 28 | 29 | public bool grids { get; set; } 30 | 31 | public bool batchId { get; set; } 32 | 33 | public bool properties { get; set; } 34 | 35 | public bool relocateTo0 { get; set; } 36 | 37 | public bool flipAxis { get; set; } 38 | 39 | public CompressionEnum compression { get; set; } 40 | 41 | #if REVIT2019 || REVIT2020 42 | 43 | public DisplayUnitType units { get; set; } 44 | 45 | #else 46 | public ForgeTypeId units { get; set; } 47 | 48 | #endif 49 | 50 | public string path { get; set; } 51 | 52 | public string fileName { get; set; } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Windows/MainWindow/Settings.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Windows.MainWindow 2 | { 3 | using System; 4 | using System.Reflection; 5 | using Autodesk.Revit.DB; 6 | using Common_glTF_Exporter.Utils; 7 | 8 | public static class Settings 9 | { 10 | public static Preferences GetInfo() 11 | { 12 | Preferences preferences = new Preferences(); 13 | PropertyInfo[] properties = typeof(Preferences).GetProperties(); 14 | var preferenceType = typeof(Preferences); 15 | 16 | foreach (PropertyInfo property in properties) 17 | { 18 | string propertyName = property.Name; 19 | 20 | if (property.PropertyType == typeof(bool)) 21 | { 22 | var tempvalue = Convert.ToBoolean(SettingsConfig.GetValue(propertyName)); 23 | preferenceType.GetProperty(propertyName).SetValue(preferences, tempvalue); 24 | } 25 | 26 | if (property.PropertyType == typeof(CompressionEnum)) 27 | { 28 | string result = SettingsConfig.GetValue(propertyName).ToString(); 29 | Enum.TryParse(result, out CompressionEnum unitStatus); 30 | preferenceType.GetProperty(propertyName).SetValue(preferences, unitStatus); 31 | } 32 | 33 | if (property.PropertyType == typeof(FormatEnum)) 34 | { 35 | string result = SettingsConfig.GetValue(propertyName).ToString(); 36 | Enum.TryParse(result, out FormatEnum unitStatus); 37 | preferenceType.GetProperty(propertyName).SetValue(preferences, unitStatus); 38 | } 39 | 40 | if (property.PropertyType == typeof(string)) 41 | { 42 | var tempvalue = SettingsConfig.GetValue(propertyName).ToString(); 43 | preferenceType.GetProperty(propertyName).SetValue(preferences, tempvalue); 44 | } 45 | 46 | if ( 47 | #if REVIT2019 || REVIT2020 48 | property.PropertyType == typeof(DisplayUnitType)) 49 | #else 50 | property.PropertyType == typeof(ForgeTypeId)) 51 | #endif 52 | { 53 | string result = SettingsConfig.GetValue(propertyName).ToString(); 54 | 55 | #if REVIT2019 || REVIT2020 56 | Enum.TryParse(result, out DisplayUnitType unitStatus); 57 | #else 58 | ForgeTypeId unitStatus = new ForgeTypeId(result); 59 | #endif 60 | preferenceType.GetProperty(propertyName).SetValue(preferences, unitStatus); 61 | } 62 | 63 | if (property.PropertyType == typeof(int)) 64 | { 65 | var tempvalue = Convert.ToInt32(SettingsConfig.GetValue(propertyName).ToString()); 66 | preferenceType.GetProperty(propertyName).SetValue(preferences, tempvalue); 67 | } 68 | } 69 | 70 | return preferences; 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Windows/MainWindow/UpdateForm.cs: -------------------------------------------------------------------------------- 1 | namespace Common_glTF_Exporter.Windows.MainWindow 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Collections.ObjectModel; 6 | using System.Linq; 7 | using System.Reflection; 8 | using System.Windows; 9 | using System.Windows.Controls; 10 | using System.Windows.Media; 11 | using Autodesk.Revit.DB; 12 | using Common_glTF_Exporter.Model; 13 | using Control = System.Windows.Controls.Control; 14 | using ToggleButton = System.Windows.Controls.Primitives.ToggleButton; 15 | 16 | public static class UpdateForm 17 | { 18 | public static void Run(Border border) 19 | { 20 | Preferences preferences = Settings.GetInfo(); 21 | PropertyInfo[] properties = typeof(Preferences).GetProperties(); 22 | var preferenceType = typeof(Preferences); 23 | 24 | Dictionary controls = GetControls(border); 25 | 26 | foreach (PropertyInfo property in properties) 27 | { 28 | try 29 | { 30 | SetControlValue(property, preferences, preferenceType, controls); 31 | } 32 | catch (Exception ex) 33 | { 34 | throw ex; 35 | } 36 | } 37 | } 38 | 39 | private static Dictionary GetControls(Border border) 40 | { 41 | var controls = new Dictionary(); 42 | var children = AllChildren(border); 43 | 44 | foreach (var child in children) 45 | { 46 | controls[child.Name] = child; 47 | } 48 | 49 | return controls; 50 | } 51 | 52 | private static void SetControlValue(PropertyInfo property, Preferences preferences, Type preferenceType, Dictionary controls) 53 | { 54 | switch (property.PropertyType.Name) 55 | { 56 | case "Boolean": 57 | var button = controls[property.Name] as ToggleButton; 58 | if (button != null) 59 | { 60 | button.IsChecked = Convert.ToBoolean(preferenceType.GetProperty(property.Name).GetValue(preferences)); 61 | } 62 | 63 | break; 64 | case "CompressionEnum": 65 | case "FormatEnum": 66 | var radioButton = controls.Values.OfType().FirstOrDefault(t => t.Name.Equals(preferenceType.GetProperty(property.Name).GetValue(preferences).ToString())); 67 | if (radioButton != null) 68 | { 69 | radioButton.IsChecked = true; 70 | } 71 | 72 | break; 73 | case "Int32": 74 | var slider = controls[property.Name] as Slider; 75 | if (slider != null) 76 | { 77 | slider.Value = Convert.ToDouble(preferenceType.GetProperty(property.Name).GetValue(preferences)); 78 | } 79 | 80 | break; 81 | case "DisplayUnitType": 82 | case "ForgeTypeId": 83 | var comboBox = controls[property.Name] as System.Windows.Controls.ComboBox; 84 | 85 | #if REVIT2019 || REVIT2020 86 | var itemSource = comboBox.ItemsSource as ObservableCollection; 87 | var value = preferenceType.GetProperty(property.Name).GetValue(preferences).ToString(); 88 | Enum.TryParse(value, out DisplayUnitType unitType); 89 | var elementSel = itemSource.First(x => x.DisplayUnitType == unitType); 90 | comboBox.SelectedIndex = comboBox.Items.IndexOf(elementSel); 91 | #else 92 | ForgeTypeId forgeTypeId = preferenceType.GetProperty(property.Name).GetValue(preferences) as ForgeTypeId; 93 | UnitObject newObjt = new UnitObject(forgeTypeId); 94 | var itemSource = comboBox.ItemsSource as ObservableCollection; 95 | UnitObject elementSel = itemSource.First(x => x.ForgeTypeId == forgeTypeId); 96 | comboBox.SelectedIndex = comboBox.Items.IndexOf(elementSel); 97 | #endif 98 | break; 99 | } 100 | } 101 | 102 | private static List AllChildren(DependencyObject parent) 103 | { 104 | var list = new List { }; 105 | for (int count = 0; count < VisualTreeHelper.GetChildrenCount(parent); count++) 106 | { 107 | var child = VisualTreeHelper.GetChild(parent, count); 108 | 109 | if (child is System.Windows.Controls.Control) 110 | { 111 | list.Add(child as System.Windows.Controls.Control); 112 | } 113 | 114 | list.AddRange(AllChildren(child)); 115 | } 116 | 117 | return list; 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /Common_glTF_Exporter/Windows/MessageWindow.xaml: -------------------------------------------------------------------------------- 1 |  21 | 22 | 23 | 25 | 27 | 28 | 29 | 30 | 32 | 34 | 35 | 36 | 44 | 45 | 50 | 51 | 52 | 53 | 62 | Message Here 63 | 64 | 65 | 92 | 93 | 99 | 100 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /GltfInstaller/Dialogs/InstallDirDialog.xaml.cs: -------------------------------------------------------------------------------- 1 | using Caliburn.Micro; 2 | using System.Windows.Forms; 3 | using System.Windows.Media.Imaging; 4 | using WixSharp; 5 | using WixSharp.UI.Forms; 6 | using WixSharp.UI.WPF; 7 | 8 | namespace GltfInstaller 9 | { 10 | /// 11 | /// The standard InstallDirDialog. 12 | /// Follows the design of the canonical Caliburn.Micro View (MVVM). 13 | /// See https://caliburnmicro.com/documentation/cheat-sheet 14 | /// 15 | /// 16 | /// 17 | /// 18 | public partial class InstallDirDialog : WpfDialog, IWpfDialog 19 | { 20 | /// 21 | /// Initializes a new instance of the class. 22 | /// 23 | public InstallDirDialog() 24 | { 25 | InitializeComponent(); 26 | } 27 | 28 | /// 29 | /// This method is invoked by WixSHarp runtime when the custom dialog content is internally fully initialized. 30 | /// This is a convenient place to do further initialization activities (e.g. localization). 31 | /// 32 | public void Init() 33 | { 34 | ViewModelBinder.Bind(new InstallDirDialogModel { Host = ManagedFormHost, }, this, null); 35 | } 36 | } 37 | 38 | /// 39 | /// ViewModel for standard InstallDirDialog. 40 | /// Follows the design of the canonical Caliburn.Micro ViewModel (MVVM). 41 | /// See https://caliburnmicro.com/documentation/cheat-sheet 42 | /// 43 | internal class InstallDirDialogModel : Caliburn.Micro.Screen 44 | { 45 | public ManagedForm Host; 46 | ISession session => Host?.Runtime.Session; 47 | IManagedUIShell shell => Host?.Shell; 48 | 49 | public BitmapImage Banner => session?.GetResourceBitmap("WixUI_Bmp_Banner").ToImageSource(); 50 | 51 | string installDirProperty => session?.Property("WixSharp_UI_INSTALLDIR"); 52 | 53 | public string InstallDirPath 54 | { 55 | get 56 | { 57 | if (Host != null) 58 | { 59 | string installDirPropertyValue = session.Property(installDirProperty); 60 | 61 | if (installDirPropertyValue.IsEmpty()) 62 | { 63 | // We are executed before any of the MSI actions are invoked so the INSTALLDIR (if set to absolute path) 64 | // is not resolved yet. So we need to do it manually 65 | var installDir = session.GetDirectoryPath(installDirProperty); 66 | 67 | if (installDir == "ABSOLUTEPATH") 68 | installDir = session.Property("INSTALLDIR_ABSOLUTEPATH"); 69 | 70 | return installDir; 71 | } 72 | else 73 | { 74 | //INSTALLDIR set either from the command line or by one of the early setup events (e.g. UILoaded) 75 | return installDirPropertyValue; 76 | } 77 | } 78 | else 79 | return null; 80 | } 81 | 82 | set 83 | { 84 | session[installDirProperty] = value; 85 | base.NotifyOfPropertyChange(() => InstallDirPath); 86 | } 87 | } 88 | 89 | public void ChangeInstallDir() 90 | { 91 | using (var dialog = new FolderBrowserDialog { SelectedPath = InstallDirPath }) 92 | { 93 | if (dialog.ShowDialog() == DialogResult.OK) 94 | InstallDirPath = dialog.SelectedPath; 95 | } 96 | } 97 | 98 | public void GoPrev() 99 | => shell?.GoPrev(); 100 | 101 | public void GoNext() 102 | => shell?.GoNext(); 103 | 104 | public void Cancel() 105 | => shell?.Cancel(); 106 | } 107 | } -------------------------------------------------------------------------------- /GltfInstaller/Dialogs/Resources.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace Revit_glTF_Exporter 2 | { 3 | using System.Windows; 4 | 5 | /// 6 | /// Resources. 7 | /// 8 | public partial class Resources : ResourceDictionary 9 | { 10 | private void EngworksLink(object sender, System.Windows.Input.MouseButtonEventArgs e) 11 | { 12 | System.Diagnostics.Process.Start("https://e-verse.com/"); 13 | } 14 | 15 | private void AddInLink(object sender, System.Windows.Input.MouseButtonEventArgs e) 16 | { 17 | System.Diagnostics.Process.Start("https://e-verse.com"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /GltfInstaller/Dialogs/SetupTypeDialog.xaml.cs: -------------------------------------------------------------------------------- 1 | using Caliburn.Micro; 2 | using System.Linq; 3 | using System.Windows.Media.Imaging; 4 | using WixSharp; 5 | using WixSharp.UI.Forms; 6 | using WixSharp.UI.WPF; 7 | 8 | namespace GltfInstaller 9 | { 10 | /// 11 | /// The standard SetupTypeDialog. 12 | /// Follows the design of the canonical Caliburn.Micro View (MVVM). 13 | /// See https://caliburnmicro.com/documentation/cheat-sheet 14 | /// 15 | /// 16 | /// 17 | /// 18 | public partial class SetupTypeDialog : WpfDialog, IWpfDialog 19 | { 20 | /// 21 | /// Initializes a new instance of the class. 22 | /// 23 | public SetupTypeDialog() 24 | { 25 | InitializeComponent(); 26 | } 27 | 28 | /// 29 | /// This method is invoked by WixSHarp runtime when the custom dialog content is internally fully initialized. 30 | /// This is a convenient place to do further initialization activities (e.g. localization). 31 | /// 32 | public void Init() 33 | { 34 | ViewModelBinder.Bind(new SetupTypeDialogModel { Host = ManagedFormHost, }, this, null); 35 | } 36 | } 37 | 38 | /// 39 | /// ViewModel for standard SetupTypeDialog. 40 | /// Follows the design of the canonical Caliburn.Micro ViewModel (MVVM). 41 | /// See https://caliburnmicro.com/documentation/cheat-sheet 42 | /// 43 | /// 44 | internal class SetupTypeDialogModel : Caliburn.Micro.Screen 45 | { 46 | public ManagedForm Host; 47 | 48 | ISession session => Host?.Runtime.Session; 49 | IManagedUIShell shell => Host?.Shell; 50 | 51 | public BitmapImage Banner => session?.GetResourceBitmap("WixUI_Bmp_Banner").ToImageSource(); 52 | 53 | /// 54 | /// Initializes a new instance of the class. 55 | /// 56 | void JumpToProgressDialog() 57 | { 58 | int index = shell.Dialogs.IndexOfDialogImplementing(); 59 | if (index != -1) 60 | shell.GoTo(index); 61 | else 62 | shell.GoNext(); // if user did not supply progress dialog then simply go next 63 | } 64 | 65 | public void DoTypical() 66 | { 67 | if (shell != null) 68 | JumpToProgressDialog(); 69 | } 70 | 71 | public void DoComplete() 72 | { 73 | if (shell != null) 74 | { 75 | // mark all features to be installed 76 | string[] names = session.Features.Select(x => x.Name).ToArray(); 77 | session["ADDLOCAL"] = names.JoinBy(","); 78 | 79 | JumpToProgressDialog(); 80 | } 81 | } 82 | 83 | public void DoCustom() 84 | => shell?.GoNext(); // let the dialog flow through 85 | 86 | public void GoPrev() 87 | => shell?.GoPrev(); 88 | 89 | public void GoNext() 90 | => shell?.GoNext(); 91 | 92 | public void Cancel() 93 | => shell?.Cancel(); 94 | } 95 | } -------------------------------------------------------------------------------- /GltfInstaller/Dialogs/WelcomeDialog.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | using System.Runtime.InteropServices; 4 | using System.Windows; 5 | using System.Windows.Forms; 6 | using System.Windows.Media.Imaging; 7 | using Caliburn.Micro; 8 | using WixSharp; 9 | using WixSharp.UI.Forms; 10 | using WixSharp.UI.WPF; 11 | using MessageBox = System.Windows.Forms.MessageBox; 12 | 13 | namespace GltfInstaller 14 | { 15 | /// 16 | /// The standard WelcomeDialog. 17 | /// Follows the design of the canonical Caliburn.Micro View (MVVM). 18 | /// See https://caliburnmicro.com/documentation/cheat-sheet 19 | /// 20 | /// 21 | /// 22 | /// 23 | public partial class WelcomeDialog : WpfDialog, IWpfDialog, IDialog 24 | { 25 | /// 26 | /// Initializes a new instance of the class. 27 | /// 28 | public WelcomeDialog() 29 | { 30 | InitializeComponent(); 31 | } 32 | 33 | private System.Windows.Point _dragStartPoint; 34 | private bool _isDragging; 35 | 36 | /// 37 | /// This method is invoked by WixSHarp runtime when the custom dialog content is internally fully initialized. 38 | /// This is a convenient place to do further initialization activities (e.g. localization). 39 | /// 40 | public void Init() 41 | { 42 | var container = ManagedFormHost; 43 | var parent = container.Parent as Form; 44 | parent.FormBorderStyle = FormBorderStyle.None; 45 | 46 | var view = parent as IShellView; 47 | view?.SetSize(510, 424); 48 | 49 | //container.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 50 | //parent.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 51 | 52 | PreviewMouseLeftButtonDown += (s, e) => 53 | { 54 | _dragStartPoint = e.GetPosition(this); 55 | _isDragging = true; 56 | }; 57 | 58 | PreviewMouseLeftButtonUp += (s, e) => _isDragging = false; 59 | PreviewMouseMove += (s, e) => 60 | { 61 | if (!_isDragging) 62 | return; 63 | 64 | System.Windows.Point currentPoint = e.GetPosition(this); 65 | double deltaX = currentPoint.X - _dragStartPoint.X; 66 | double deltaY = currentPoint.Y - _dragStartPoint.Y; 67 | 68 | parent.Left += Convert.ToInt32(deltaX); 69 | parent.Top += Convert.ToInt32(deltaY); 70 | }; 71 | container.BackColor = System.Drawing.ColorTranslator.FromHtml("#e8e3df"); 72 | 73 | parent.Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, parent.Width, parent.Height, 20, 20)); 74 | var host = new WelcomeDialogModel { Host = ManagedFormHost }; 75 | ViewModelBinder.Bind(host, this, null); 76 | } 77 | 78 | [DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")] 79 | private static extern IntPtr CreateRoundRectRgn 80 | ( 81 | int nLeftRect, // x-coordinate of upper-left corner 82 | int nTopRect, // y-coordinate of upper-left corner 83 | int nRightRect, // x-coordinate of lower-right corner 84 | int nBottomRect, // y-coordinate of lower-right corner 85 | int nWidthEllipse, // height of ellipse 86 | int nHeightEllipse // width of ellipse 87 | ); 88 | 89 | private void Title_Link(object sender, RoutedEventArgs e) 90 | { 91 | System.Diagnostics.Process.Start("https://e-verse.com/"); 92 | } 93 | 94 | private void Contact_Link(object sender, System.Windows.RoutedEventArgs e) 95 | { 96 | System.Diagnostics.Process.Start("https://e-verse.com/contact/"); 97 | } 98 | } 99 | 100 | /// 101 | /// ViewModel for standard WelcomeDialog. 102 | /// Follows the design of the canonical Caliburn.Micro ViewModel (MVVM). 103 | /// See https://caliburnmicro.com/documentation/cheat-sheet 104 | /// 105 | /// 106 | internal class WelcomeDialogModel : Caliburn.Micro.Screen 107 | { 108 | public ManagedForm Host; 109 | ISession session => Host?.Runtime.Session; 110 | IManagedUIShell shell => Host?.Shell; 111 | 112 | public BitmapImage Banner => session?.GetResourceBitmap("WixUI_Bmp_Dialog").ToImageSource(); 113 | 114 | public bool CanGoPrev => false; 115 | 116 | public void GoPrev() 117 | => shell?.GoPrev(); 118 | 119 | public void GoNext() 120 | => shell?.GoNext(); 121 | 122 | public void Cancel() 123 | => shell?.Cancel(); 124 | } 125 | } -------------------------------------------------------------------------------- /GltfInstaller/GltfInstaller.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | net48 6 | $(MSBuildProjectName.Replace(" ", "_").Replace("-", "_")) 7 | GltfInstaller 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | Designer 50 | MSBuild:Compile 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | Resources.xaml 66 | 67 | 68 | True 69 | True 70 | Resources.resx 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | ResXFileCodeGenerator 81 | Resources.Designer.cs 82 | 83 | 84 | -------------------------------------------------------------------------------- /GltfInstaller/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace GltfInstaller.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GltfInstaller.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Byte[]. 65 | /// 66 | internal static byte[] ahronbd { 67 | get { 68 | object obj = ResourceManager.GetObject("ahronbd", resourceCulture); 69 | return ((byte[])(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Drawing.Bitmap. 75 | /// 76 | internal static System.Drawing.Bitmap gltf { 77 | get { 78 | object obj = ResourceManager.GetObject("gltf", resourceCulture); 79 | return ((System.Drawing.Bitmap)(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// Looks up a localized resource of type System.Drawing.Bitmap. 85 | /// 86 | internal static System.Drawing.Bitmap Heart { 87 | get { 88 | object obj = ResourceManager.GetObject("Heart", resourceCulture); 89 | return ((System.Drawing.Bitmap)(obj)); 90 | } 91 | } 92 | 93 | /// 94 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). 95 | /// 96 | internal static System.Drawing.Icon logo { 97 | get { 98 | object obj = ResourceManager.GetObject("logo", resourceCulture); 99 | return ((System.Drawing.Icon)(obj)); 100 | } 101 | } 102 | 103 | /// 104 | /// Looks up a localized resource of type System.Byte[]. 105 | /// 106 | internal static byte[] NeuzeitGro_Reg { 107 | get { 108 | object obj = ResourceManager.GetObject("NeuzeitGro-Reg", resourceCulture); 109 | return ((byte[])(obj)); 110 | } 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /GltfInstaller/Resources/Heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/GltfInstaller/Resources/Heart.png -------------------------------------------------------------------------------- /GltfInstaller/Resources/gltf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/GltfInstaller/Resources/gltf.png -------------------------------------------------------------------------------- /GltfInstaller/Resources/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/GltfInstaller/Resources/logo.ico -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 e-verse 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Revit glTF exporter 2 | 3 | [](https://github.com/EverseDevelopment/revit-glTF-exporter/wiki) 4 |
5 | 6 | 7 | This addin allow you can export glTF out of Revit 8 |
9 | 10 | If you appreciate the work put into this free add-in, please give a review on the Autodesk AppStore. 11 | 12 | ## Getting Started 13 | 14 | 1. Go to a 3D View 15 | 16 | 2. Hide the elements you dont want to exporter 17 | 18 | 3. Select the properties to export 19 | 20 | 4. Hit export button 21 | 22 | 23 | You are done! 24 | 25 | ## Current Version 26 | glTF exporter is currently built against Revit 2019,2020,2021,2022,2023 and 2024 27 | 28 | ## Contributors 29 | This package is primarily managed by [E-verse](https://www.e-verse.co/) and by [People Like You™](https://github.com/EverseDevelopment/revit-glTF-exporter/pulse). 30 | 31 | ## Help improve glTF exporter 32 | If you're interested in contributing to glTF exporter, just submit a [pull request](https://github.com/EverseDevelopment/revit-glTF-exporter/pulls) or a [feature request](https://github.com/EverseDevelopment/revit-glTF-exporter/issues) . 33 | 34 | ## Installation 35 | Looking to get the revit-glTF-exporter add-in? Check out [Autodesk app store](https://apps.autodesk.com/RVT/es/Detail/Index?id=492952120634946986&appLang=en&os=Win64). 36 | 37 | ## About us ## 38 | 39 | We are an international mix of AEC professionals, product designers, and software developers. We work together to transform construction requirements into accurate and partnership-driven technological solutions. 40 | 41 |

42 | 43 | 44 | 45 |

46 | -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2019/.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | _pkginfo.txt 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.jfm 193 | *.pfx 194 | *.publishsettings 195 | node_modules/ 196 | orleans.codegen.cs 197 | 198 | # Since there are multiple workflows, uncomment next line to ignore bower_components 199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 200 | #bower_components/ 201 | 202 | # RIA/Silverlight projects 203 | Generated_Code/ 204 | 205 | # Backup & report files from converting an old project file 206 | # to a newer Visual Studio version. Backup files are not needed, 207 | # because we have git ;-) 208 | _UpgradeReport_Files/ 209 | Backup*/ 210 | UpgradeLog*.XML 211 | UpgradeLog*.htm 212 | 213 | # SQL Server files 214 | *.mdf 215 | *.ldf 216 | 217 | # Business Intelligence projects 218 | *.rdl.data 219 | *.bim.layout 220 | *.bim_*.settings 221 | 222 | # Microsoft Fakes 223 | FakesAssemblies/ 224 | 225 | # GhostDoc plugin setting file 226 | *.GhostDoc.xml 227 | 228 | # Node.js Tools for Visual Studio 229 | .ntvs_analysis.dat 230 | 231 | # Visual Studio 6 build log 232 | *.plg 233 | 234 | # Visual Studio 6 workspace options file 235 | *.opt 236 | 237 | # Visual Studio LightSwitch build output 238 | **/*.HTMLClient/GeneratedArtifacts 239 | **/*.DesktopClient/GeneratedArtifacts 240 | **/*.DesktopClient/ModelManifest.xml 241 | **/*.Server/GeneratedArtifacts 242 | **/*.Server/ModelManifest.xml 243 | _Pvt_Extensions 244 | 245 | # Paket dependency manager 246 | .paket/paket.exe 247 | paket-files/ 248 | 249 | # FAKE - F# Make 250 | .fake/ 251 | 252 | # JetBrains Rider 253 | .idea/ 254 | *.sln.iml 255 | 256 | # CodeRush 257 | .cr/ 258 | 259 | # Python Tools for Visual Studio (PTVS) 260 | __pycache__/ 261 | *.pyc -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2019/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) PlaceholderCompany. All rights reserved. 3 | // 4 | 5 | using System.Reflection; 6 | using System.Runtime.CompilerServices; 7 | using System.Runtime.InteropServices; 8 | 9 | // General Information about an assembly is controlled through the following 10 | // set of attributes. Change these attribute values to modify the information 11 | // associated with an assembly. 12 | [assembly: AssemblyTitle("Revit_glTF_Exporter")] 13 | [assembly: AssemblyDescription("")] 14 | [assembly: AssemblyConfiguration("")] 15 | [assembly: AssemblyCompany("")] 16 | [assembly: AssemblyProduct("Revit_glTF_Exporter")] 17 | [assembly: AssemblyCopyright("Copyright © 2020")] 18 | [assembly: AssemblyTrademark("")] 19 | [assembly: AssemblyCulture("")] 20 | 21 | // Setting ComVisible to false makes the types in this assembly not visible 22 | // to COM components. If you need to access a type in this assembly from 23 | // COM, set the ComVisible attribute to true on that type. 24 | [assembly: ComVisible(false)] 25 | 26 | // The following GUID is for the ID of the typelib if this project is exposed to COM 27 | [assembly: Guid("3c679028-b7ed-4cd7-9307-0e9760e7ea8f")] 28 | 29 | // Version information for an assembly consists of the following four values: 30 | // 31 | // Major Version 32 | // Minor Version 33 | // Build Number 34 | // Revision 35 | // 36 | // You can specify all the values or you can default the Build and Revision Numbers 37 | // by using the '*' as shown below: 38 | // [assembly: AssemblyVersion("1.0.*")] 39 | [assembly: AssemblyVersion("1.0.0")] 40 | [assembly: AssemblyFileVersion("1.0.0")] 41 | -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2019/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Revit_glTF_Exporter.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Revit_glTF_Exporter.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap Heart { 67 | get { 68 | object obj = ResourceManager.GetObject("Heart", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2019/Resources/Heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2019/Resources/Heart.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2019/Resources/e-verse-isologo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2019/Resources/e-verse-isologo.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2019/Resources/e-verse-logo-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2019/Resources/e-verse-logo-1.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2019/Resources/gltf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2019/Resources/gltf.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2020/.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | _pkginfo.txt 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.jfm 193 | *.pfx 194 | *.publishsettings 195 | node_modules/ 196 | orleans.codegen.cs 197 | 198 | # Since there are multiple workflows, uncomment next line to ignore bower_components 199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 200 | #bower_components/ 201 | 202 | # RIA/Silverlight projects 203 | Generated_Code/ 204 | 205 | # Backup & report files from converting an old project file 206 | # to a newer Visual Studio version. Backup files are not needed, 207 | # because we have git ;-) 208 | _UpgradeReport_Files/ 209 | Backup*/ 210 | UpgradeLog*.XML 211 | UpgradeLog*.htm 212 | 213 | # SQL Server files 214 | *.mdf 215 | *.ldf 216 | 217 | # Business Intelligence projects 218 | *.rdl.data 219 | *.bim.layout 220 | *.bim_*.settings 221 | 222 | # Microsoft Fakes 223 | FakesAssemblies/ 224 | 225 | # GhostDoc plugin setting file 226 | *.GhostDoc.xml 227 | 228 | # Node.js Tools for Visual Studio 229 | .ntvs_analysis.dat 230 | 231 | # Visual Studio 6 build log 232 | *.plg 233 | 234 | # Visual Studio 6 workspace options file 235 | *.opt 236 | 237 | # Visual Studio LightSwitch build output 238 | **/*.HTMLClient/GeneratedArtifacts 239 | **/*.DesktopClient/GeneratedArtifacts 240 | **/*.DesktopClient/ModelManifest.xml 241 | **/*.Server/GeneratedArtifacts 242 | **/*.Server/ModelManifest.xml 243 | _Pvt_Extensions 244 | 245 | # Paket dependency manager 246 | .paket/paket.exe 247 | paket-files/ 248 | 249 | # FAKE - F# Make 250 | .fake/ 251 | 252 | # JetBrains Rider 253 | .idea/ 254 | *.sln.iml 255 | 256 | # CodeRush 257 | .cr/ 258 | 259 | # Python Tools for Visual Studio (PTVS) 260 | __pycache__/ 261 | *.pyc -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2020/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Revit_glTF_Exporter")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Revit_glTF_Exporter")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("3c679028-b7ed-4cd7-9307-0e9760e7ea8f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0")] 37 | -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2020/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Revit_glTF_Exporter.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Revit_glTF_Exporter.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap Heart { 67 | get { 68 | object obj = ResourceManager.GetObject("Heart", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2020/Resources/Heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2020/Resources/Heart.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2020/Resources/e-verse-isologo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2020/Resources/e-verse-isologo.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2020/Resources/e-verse-logo-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2020/Resources/e-verse-logo-1.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2020/Resources/gltf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2020/Resources/gltf.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2021/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Revit_glTF_Exporter")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Revit_glTF_Exporter")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("3c679028-b7ed-4cd7-9307-0e9760e7ea8f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0")] 37 | -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2021/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Revit_glTF_Exporter.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Revit_glTF_Exporter.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap Heart { 67 | get { 68 | object obj = ResourceManager.GetObject("Heart", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2021/Resources/Heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2021/Resources/Heart.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2021/Resources/e-verse-isologo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2021/Resources/e-verse-isologo.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2021/Resources/e-verse-logo-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2021/Resources/e-verse-logo-1.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2021/Resources/gltf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2021/Resources/gltf.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2022/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Revit_glTF_Exporter")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Revit_glTF_Exporter")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("3c679028-b7ed-4cd7-9307-0e9760e7ea8f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0")] 37 | -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2022/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Revit_glTF_Exporter.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Revit_glTF_Exporter.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap Heart { 67 | get { 68 | object obj = ResourceManager.GetObject("Heart", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2022/Resources/Heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2022/Resources/Heart.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2022/Resources/e-verse-isologo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2022/Resources/e-verse-isologo.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2022/Resources/e-verse-logo-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2022/Resources/e-verse-logo-1.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2022/Resources/gltf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2022/Resources/gltf.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2023/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Revit_glTF_Exporter")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Revit_glTF_Exporter")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("3c679028-b7ed-4cd7-9307-0e9760e7ea8f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0")] 37 | -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2023/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Revit_glTF_Exporter.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Revit_glTF_Exporter.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap gltf { 67 | get { 68 | object obj = ResourceManager.GetObject("gltf", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Drawing.Bitmap. 75 | /// 76 | internal static System.Drawing.Bitmap Heart { 77 | get { 78 | object obj = ResourceManager.GetObject("Heart", resourceCulture); 79 | return ((System.Drawing.Bitmap)(obj)); 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2023/Resources/Heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2023/Resources/Heart.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2023/Resources/e-verse-isologo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2023/Resources/e-verse-isologo.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2023/Resources/e-verse-logo-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2023/Resources/e-verse-logo-1.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2023/Resources/gltf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2023/Resources/gltf.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2024/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Revit_glTF_Exporter")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Revit_glTF_Exporter")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("3c679028-b7ed-4cd7-9307-0e9760e7ea8f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0")] 37 | -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2024/Resources/Heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2024/Resources/Heart.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2024/Resources/e-verse-isologo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2024/Resources/e-verse-isologo.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2024/Resources/e-verse-logo-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2024/Resources/e-verse-logo-1.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2024/Resources/gltf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2024/Resources/gltf.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2025/DracoWrapper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2025/DracoWrapper.dll -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2025/MeshOpt.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2025/MeshOpt.dll -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2025/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Revit_glTF_Exporter_2025 8 | { 9 | internal class Program 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2025/Properties/PublishProfiles/FolderProfile.pubxml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 7 | Release 8 | Any CPU 9 | bin\Release\net8.0-windows\publish\ 10 | FileSystem 11 | <_TargetId>Folder 12 | 13 | -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2025/Resources/Heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2025/Resources/Heart.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2025/Resources/e-verse-isologo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2025/Resources/e-verse-isologo.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2025/Resources/e-verse-logo-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2025/Resources/e-verse-logo-1.png -------------------------------------------------------------------------------- /Revit_glTF_Exporter_2025/Resources/gltf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EverseDevelopment/revit-glTF-exporter/6aafbea00d85090b8f0be757003c242d2aef3a5f/Revit_glTF_Exporter_2025/Resources/gltf.png --------------------------------------------------------------------------------